Does anyone know why this event isn't working?

Bridgeman

Veteran
Veteran
Joined
Aug 10, 2014
Messages
121
Reaction score
18
First Language
Dutch
So I have this window that you can open and close. At first I had a switch for the closed and open state, but I'm trying to come up with creative ways to do things different so I don't have to waste a lot of switches on minor things.


Here's what I have now. The closed window sprite is on the "facing down" slot of the charset, and the open window is "facing right". In my head, this event should execute the commands in the top part of the branch until the window event is not facing down, in which case it should execute the bottom part. But the problem is, it doesn't work. Whenever I stand in front of the window and press the action key, it just executes the top part, even though the sprite does change to the open window and so I know it's facing right. 


Anyone know what I'm missing?


Knipsel.PNG
 
Last edited by a moderator:

Makio-Kuta

Canadian Goose
Veteran
Joined
Jul 28, 2012
Messages
1,910
Reaction score
2,364
First Language
English
Primarily Uses
Try changing the Animation Type to Direction Fix/Inanimate. The sprite is probably turning when you press on it and ruining your conditional branch.
 
Last edited by a moderator:

Bridgeman

Veteran
Veteran
Joined
Aug 10, 2014
Messages
121
Reaction score
18
First Language
Dutch
Oh God, ofcourse. I knew the solution would be something stupidly simple that I missed. Completely forgot to change that. Thanks for helping out. 
 

Liak

Veteran
Veteran
Joined
Mar 13, 2012
Messages
1,788
Reaction score
270
First Language
German
Primarily Uses
That's a clever use of the conditional branches there! I think I would have used a switch, but your solution is pretty elegant. :)  I guess the absence of self switches makes you more creative with alternatives.
 
Last edited by a moderator:

Bridgeman

Veteran
Veteran
Joined
Aug 10, 2014
Messages
121
Reaction score
18
First Language
Dutch
Yeah, it doesn't come without its limitations. Initially, I had the open window on the right frame of the "facing down" slot. But, in a "Set move route" event command, you can't change the graphic of a sprite to the "stepping left" or "stepping right" frame, only the four stationary directions. So for all of the sprites like this window, I can only use the middle frames. But I still like that better than making a crapload of switches for everything. 


Edit: I actually realized that you can. When you create an event, you can set the event graphic to "stepping right" or "stepping left". Then you can use the Set move route event command to make it face in any direction, and it will stay on the same stepping frame. So basically, when making your sprites, as long as you make sure that all sprites of the same "type" (e.g. window open and closed) are on vertical rows only, you can utilize every frame of your sprite sets. 


This also works for treasure chests for example. I think every game I've come across used switches to change the treasure chest graphic when opened, but that's not even needed. Just change the facing of the treasure chest, and make it so you only get the item if it's facing in its "closed" position. 
 
Last edited by a moderator:

Kamillo

Veteran
Veteran
Joined
Mar 1, 2014
Messages
96
Reaction score
31
First Language
polish
Primarily Uses
Refresh map and this way is to rubbish.
 

Bridgeman

Veteran
Veteran
Joined
Aug 10, 2014
Messages
121
Reaction score
18
First Language
Dutch
Yeah, found that out myself last night too. Apparently if you change maps the sprite will go back to its original facing. So I guess you still need to use switches for stuff you wanna change permanently. Oh well, it was a cool experiment  B)
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Frostorm wrote on Featherbrain's profile.
Hey, so what species are your raptors? Any of these?
... so here's my main characters running around inside "Headspace", a place people use as a safe place away from anxious/panic related thinking.
Stream will be live shortly! I will be doing some music tonight! Feel free to drop by!
Made transition effects for going inside or outside using zoom, pixi filter, and a shutter effect
I have gathered enough feedback from a few selected people. But it is still available if you want to sign up https://forums.rpgmakerweb.com/index.php?threads/looking-for-testers-a-closed-tech-demo.130774/

Forum statistics

Threads
105,992
Messages
1,018,195
Members
137,773
Latest member
Kirakirna
Top