Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

SOLVED! Drunk or confused movement. SOLVED!

I was attempting to make it so that when the player is drunk or confused the directional movement of the player is altered but when the player is sober then directional movement returns to normal. So if the player is drunk then when left button is pushed the player moves up, when up button is pushed the player moves down, and so forth making a very confused movement but when player is not drunk then the movent returns to the default such as when up button pushed the player moves up etc. I used a common event set to parallel and with a condition switch.

screenshot_01.jpg


This works fine as far as causing the altered movement to happen when the drunk switch is on, but when I turn the drunk switch off instead of reverting back to the default movement the player doesn't move at all. Is there a process that I need to include that would revert the players movement back to the default movement? I have a demo if that would help.

http://www.mediafire.com/?sharekey=f8dd226a1f3a49cae62ea590dc5e5dbbe04e75f6e8ebb871

Any help would be greatly appreciated.

UPDATE! Problem solved below and here is the finished demo...

http://www.mediafire.com/?sharekey=f8dd226a1f3a49cae62ea590dc5e5dbbe04e75f6e8ebb871
 
In the common event move routes select "Ignore when can't move". If you don't the program will just keep trying to move past the event when it can't.
The "When button is pressed" option is very sensitive, when you press a direction once it'll actually moves you twice. You can put in a short wait, like 2 frames, after the move route to slow it down.
 
Rutabaga, I owe you a big thank you. You pointed out the simple over site that I had made. Works like a charm now! This explains why it worked with an invisible event as well. And great advice on the wait to slow down movement. :thumb:
I will edit post as solved and supply finished demo as well in first post.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top