RPG Maker VX Ace

RPG Maker VX Ace

View Stats:
Lung Eater Apr 24, 2018 @ 6:12am
How to check if button is being held down?
I want to make an event where the player moves slower if shift is being held down but the "if button is being pressed" conditional branch doesn't seem to work since I want the player to return to normal speed once the shift button is no longer being held down but with this conditional branch, the player speed is just slowed when shift is pressed and does NOT return to normal speed when shift is released.

Any solutions?
< >
Showing 1-4 of 4 comments
Have you actually set a condition to set the speed to normal again for that?
AceHangman Apr 24, 2018 @ 9:31am 
Assuming you have the Conditional Branch set up to work how you want it, you could have it turn a Switch On or trigger a Common Event that does a Set Move Route and sets the PC's Movement speed to a lower number (I think it's normally 4 for PCs, 3 for NPCs). Then you just have that same branch check if the switch is On when they press Shift next and, if it is, Set Move Route to put the PC's speed back to normal (and turn off any switches).

You could also use Conditional Branches that check if that Switch is On for events or scenes to check whether the PC is 'sneaking' or moving slowly and stealthily, like past a guard, across a narrow beam, or over a creaky floor.
Last edited by AceHangman; Apr 24, 2018 @ 9:33am
Lung Eater Apr 24, 2018 @ 7:38pm 
Originally posted by kittylitterproduction:
Have you actually set a condition to set the speed to normal again for that?
I tried to set the "else" to make the player's speed go back to 4 but for some reason adding this as part of the branch seems to cause an issue as I can't move the player at all when putting this in.
Hajami Apr 25, 2018 @ 2:25am 
Didnt read all, but the following would be one of 2 ways this could be set up in Theory.

Conditional Branch Shift pressed?
-If yes
-Conditional Branch Switch1 is Off?
--If yes
--Turn Switch1 On(This makes that the Speed only gets changed once, performance safing)
--Set Move Route Player Change Speed to faster.
else (Shift is not pressed)
-Conditional Branch Switch1 is On?
--If Yes
--Turn Switch1 Off
--Set Move Route Player Speed back to normal.
end
end ...
Last edited by Hajami; Apr 25, 2018 @ 2:25am
< >
Showing 1-4 of 4 comments
Per page: 1530 50