Picture Center Problem

HeroofTime123

Veteran
Veteran
Joined
Aug 14, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
I am trying to make a picture appear on screen and I have the picture set to be centered with the player's position on the screen. However, when I erase the picture. the game crashes and says "Script Sprite_Picture' line 54: NoMethodError occurred. Undefined method 'width' for nil:NilClass" I have no idea what this means or why it's doing that. It works fine if the picture is set to appear in the Upper Left, but then I cant make it work right. I included a picture of the event for reference.

Picture.png

Erase.png
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
Please show your erase picture command as well.


Are both picture commands targeted on the same number? those numbers you assign give the pictures their IDs.


What could happen is that you accidentially set two different pictures to the same number, and then the second erase picture tries to erase a picture that no longer exists.
 

HeroofTime123

Veteran
Veteran
Joined
Aug 14, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
The picture ID's are the same; they're both 1. I don't know what else could be happening. Like I said, the whole event works fine if I have it set to Upper Left, so I don't  know what happens when I set it to Center. I added the picture of the other page to the original post.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
the problem is the parallel process - all parallel processes repeat indefinitely, which means the second event calls the command to erase the picture sixty times per second...


And sorry that I didn't see it in the first picture - that also needs to be something different than parallel process, because it's also repeating sixty times per second.


Please state more in detail what and when you want the picture to appear, then we can tell you how to trigger it in the correct way.
 

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
That seems like an old outdated bug. Is your vxace version the latest?
 

HeroofTime123

Veteran
Veteran
Joined
Aug 14, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
the problem is the parallel process - all parallel processes repeat indefinitely, which means the second event calls the command to erase the picture sixty times per second...

And sorry that I didn't see it in the first picture - that also needs to be something different than parallel process, because it's also repeating sixty times per second.

Please state more in detail what and when you want the picture to appear, then we can tell you how to trigger it in the correct way.
I want it to be so that the picture appears when the player enters the room. and is erased when the player leaves the room and it also stays centered over the players position in the screen. It's supposed to be a black picture with a transparent center so that the player can only see a little bit in front of them.. I have the switch turning on and off as part of the Transfer event going in and out of the map. I'd show you a picture of that but I'm not at my computer right now. If you need it, let me know.

That seems like an old outdated bug. Is your vxace version the latest?
I just bought and downloaded VX Ace less than a month ago, This happened even when I had the trial version and the lite version.
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,676
First Language
German
Primarily Uses
RMMV
I have the switch turning on and off as part of the Transfer event going in and out of the map.
At the place where you switch off, add a single command to erase the picture. completely remove/delete the event page with the current erase picture command.
 

HeroofTime123

Veteran
Veteran
Joined
Aug 14, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
At the place where you switch off, add a single command to erase the picture. completely remove/delete the event page with the current erase picture command.
That still didn't work. It came up as the same error

What version is your VXace?
1.02a If I looked in the right spot for that.
 
Last edited by a moderator:

HeroofTime123

Veteran
Veteran
Joined
Aug 14, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
For some reason in a new project this works fine. It's only in my actual project that it crashes. I've included a demo of the event just in case with the project file. It has the events in the same set up as they are in my actual game.

Project1.zip
 

Attachments

Last edited by a moderator:

Archeia

Level 99 Demi-fiend
Developer
Joined
Mar 1, 2012
Messages
15,141
Reaction score
15,473
First Language
Filipino
Primarily Uses
RMMZ
Last edited by a moderator:

HeroofTime123

Veteran
Veteran
Joined
Aug 14, 2014
Messages
42
Reaction score
3
First Language
English
Primarily Uses
I'm using a script that fixes a picture's position on a map, but that only applies to pictures with [FIXED] in the file name, which the picture I'm using does not have.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
If you want to make a dark map with a limited visibility range, drop all the eventing stuff, there are several scripts made to do exactly this.


I recommend Dekita's "Pokemon 'Flash' Style Lights" for this, or if you want a more serious and realistic looking light effect script, you can try Khas's "Awesome Light Effects" script.


Both goes well with Dekita's "Character Lanterns" script, which can make a simple lantern graphic in the hand of the character.


You already use a script, might as well save yourself from unnecessary and troublesome eventing and just get a cool script for it. :p
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,072
Members
137,578
Latest member
JamesLightning
Top