this conditional branch wont work?

ok so, im making a horse riding thing, i got the mounting to work but, the dismounting is not working as planned.


i wanted to make it so when you press L you dismount.


i made a common even for this


this is made with graphics


since i dont know how t make the main horse event ridable


[event:001 is the horse)


ignore the screen keyboard i had to use it to take the screenshot since my main keyboard's print scr is on the delete button and i cant get it to work problem event.png
This might not be what you are looking for but i used Vlues script for simple mount system on my game, it basically calls another graphics with notetags, http://steamcommunity.com/sharedfiles/filedetails/?id=423639290
From memory: I don't think self switches work on common events.
what do you intend to have that self-switch do? that command makes absolutely no sense in that event.
@Andar i got confused i thought i needed a switch for the auto-running, so the event doesnt repeat
You cannot use self switches on common events or they'll be completely useless. I think to achieve what you're trying to do here, you may have to drop the switch, then in your map event, make a conditional branch like: if the L button is being pressed, call common event 1. Because the problem with self switches is that they only work on map events, and they only work inside that one event. 
There are a few logic errors you have there.


The common event is on parallel process and is controlled by switch 2 (dismounted).


You turn off switch 1 (mounted) before you even check if the button is being pressed.  But you never turn off switch 2, so that common event will always be running.


If you're controlling them by common events and you have switch 1 = mounted and switch 2 = dismounted, then you'll probably want switch 2 on at the start (meaning they're on foot, and you're waiting to see if they mount).  Within the 'true' branch of the Button is being Pressed condition, you want to change the graphic AND turn on switch 1 AND turn off switch 2.  That will make it stop checking for when they mount, and start checking for when they dismount.  The other common event would be conditioned by switch 1, and in the 'true' branch of the Button is being Pressed condition, you'll change the graphic, turn on switch 2 and turn off switch 1.  No self switches needed here.


However, what happens if they're inside a building, or in a cave?  Are you going to let them get on their horses then?  You might need some kind of check to see if they CAN mount depending on the map id.
@HexMozart88


ok ill do that , and i aint sure yet on the buildings thing yet.
There are a few logic errors you have there.


The common event is on parallel process and is controlled by switch 2 (dismounted).


You turn off switch 1 (mounted) before you even check if the button is being pressed.  But you never turn off switch 2, so that common event will always be running.


If you're controlling them by common events and you have switch 1 = mounted and switch 2 = dismounted, then you'll probably want switch 2 on at the start (meaning they're on foot, and you're waiting to see if they mount).  Within the 'true' branch of the Button is being Pressed condition, you want to change the graphic AND turn on switch 1 AND turn off switch 2.  That will make it stop checking for when they mount, and start checking for when they dismount.  The other common event would be conditioned by switch 1, and in the 'true' branch of the Button is being Pressed condition, you'll change the graphic, turn on switch 2 and turn off switch 1.  No self switches needed here.


However, what happens if they're inside a building, or in a cave?  Are you going to let them get on their horses then?  You might need some kind of check to see if they CAN mount depending on the map id.

actually.. dismounted is activated in another event... besides if i keep mounted on the player glitches from horse riding to walking stance/standing repeatedly, but ok ill change it                                                                                                                                                                                           
I wondered where you set it.  If you've got a horse event or something that triggers the first change, don't worry what I said about the other common event.  The switching from one pose to another repeatedly is probably because there's a switch being changed when it shouldn't be (or not being changed when it should be).


We probably need to see all the events that affect it if you're still having troubles.


Normally I'd also recommend putting a Wait in there, so the looping doesn't cause the game to lag.


To get a screenprint with your main keyboard, you probably need to hold down the Function key while pressing print screen / delete.  On my keyboard that's called Fn and is between the Alt and Control keys on the right hand side of the spacebar.  A good giveaway is if PrtScn is in a different color - look for a 'function' key in the same color, which means that key activates the same colored commands on other keys.
This might not be what you are looking for but i used Vlues script for simple mount system on my game, it basically calls another graphics with notetags, http://steamcommunity.com/sharedfiles/filedetails/?id=423639290

  i tried it, and used vlues script, but it didnt work on my game...


probably cause his actor's different.


i retried my  game i sort of fixed it but you have to keep holding the D button to stay  in horse riding.. [tried to make it so you can go back and forth from horse riding and walking... didnt work well but at least i was able to create something                                                                                                                                                                                                               
@Shaz i sort of got rid of the horse event, and the switches... instead i added a branch using the z button and added the graphic change, then i added another one on the else part and added the normal graphic, it works sort of other then it takes a few times to change, and you cant leave the room.... once your out you change to normal and the event stops, [since the event is bound to the room]


ill re-add it though
sasha2cool, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


If you want to reply to 2 people, either use the multiquote button or use the @username convention to make clear who you are replying to.  If you just want to add something, use the edit button and add it to the bottom of your previous post.


Thanks.

Original thread: https://forums.rpgmakerweb.com/threads/this-conditional-branch-wont-work.67933/