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.

running script

vipet2

Member

i would like a script were you push a button to run, and after say, 10 seconds of running you run out of energy and have to wait untill ur enegy is back befor running again (or use enegy potions). if this is posible please add in a bar in the bottom right corner that tells you how much energy you have left. and this isnt need much but would still be cool, and thats if you have running exp and running lvls, and after each running lvl gained, you can run for an extra say, 2-3 seconds.

credit will be given to anyone who can do this for me:)
 
the best way is something similar to the movement enhance ment in the letter mini game. in common events make a parallel process with a switch
then in that parallel process make it look like this.
1st common event
Control Switches [10] on

2ed common event
Control variables 127 =6
Script:$game_player.move_speed=:game_variables[127]
wait 100 frames
Control variables 127 =3
Script:$game_player.move_speed=:game_variables[127]
Control Switches [10] off

And there you go easy as that.
 

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