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.

Universal vehicle system?

I have a question that may solve a lot of problems in my game. I believe, in others too =] Im thinking about universal vehicle system, so it can fit for any object - rail, ship, brach in the water, etc.

Let's say I want to do a rail system so when a train is stopped the player can go inside and then when it starts to move (after x frames) the player must follow the train. I can change player's graphic into no picture but how should i make player follow the train? I can set the same route as a train, enable always on top and through, but there is one problem: how to set that player will start to move at the same time as a train?

The same problem looks more clearly in another example: i want to have a branch that is in the water and repeatedly goes from one border to another. But then I want to let the player use the branch to go over the water. I can do that with setting route - when player touches the branch he goes the same way as the branch. But because the branch is waiting for few frames in the border, the player often goes too early or too late. Result - the player goes on water like Jesus instead of going on the branch.

Is there any way i can solve that problem? Is there any sript or event command that orders for player to wait exactly the same time of frames as another npc left to wait (after touching that npc)? Maybe the system itself that i described is not good so anyone may recommend something else?

P.S.: Sorry for my English. If you wont understand what i wanted to say, i can try again =]
 
Maybe change the player's sprite to a man on a branch, etc?
You can then change the branch event to no graphic + through until player finished moving (wait for move's completion, or a simple wait command).
Edit: Forget it, this isn't a universal solution..
 

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