limiting moves

2 replies [Last post]
hairybiker's picture
User offline. Last seen 18 weeks 5 days ago. Offline
Joined: 12/18/2009
GBPs: 331

The effect needed player presses cntrl player chacter can run chacter runs for a limited time gets tired and the run must be recharged in order to run again.

Cecil's picture
User offline. Last seen 16 weeks 6 days ago. Offline
Joined: 11/07/2008
GBPs: 1468

you can have an alterable value in the player object that is the players stamina. while running it goes down. when not running it goes up. if the players stamina reaches a critical zone, like maybe you have 100 stamina and it gets under 10, switch a flag on, and when that flag is on, dont allow the player to run until the stamina is full again, or above a certain point.

+player wants to run
+flag 1 of player is off
-decrease stamina
-do running crap

+player does not want to run
+stamina is < 100
-increase stamina

+stamina is < 10
-set flag 1 of player on

+stamina is > 90
-set flag 1 of player off

hairybiker's picture
User offline. Last seen 18 weeks 5 days ago. Offline
Joined: 12/18/2009
GBPs: 331

thanks Cecil i finaly got it to work