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.

Forcing A character to move while still being able to control them?

Ive seen a few minigames where a character or event is continously pushed in a certain direction, but you still can controll direction by pressing left/right keys. For example, Master of The Wind's Floating Jar, You must get it around obstacles without hitting anthing, yet it floats downward. Wondering if anyone can help.
 
hmmm, something like this?

@>Conditional Branch: The left button is being pressed
..@> Set move route: player (Ignore if can't move)
....$> Move Left
Else
..Conditional Branch: Rgw right button is being pressed
..@> Set move route: player (Ignore if can't move)
....$> Move Right
..Branch End
Branch End
@> Wait for move's completion
 
I think WildCard means, the event moves regardless of button pressing.

What you could do is set the event to move "1 Step Forward, Repeat Processing, Ignore if Can't Move." Then create a Parallel Processing with "Conditional Branch: Right button is Pressed, Set Move Route: Event: Turn Right", and repeat with all the buttons. That should do the trick.

EDIT:
Well, that's for all 4 directions. If you want it to move in only one direction, have the Custom Move Route be "Move Down, Repeat Processing, Ignore if Can't Move." Then use 007snicker's commands.
 

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