I am making a health regeneration that will hopefully work like this (this isnt fpi, its a mix of fpi and english lol)
state=0,plrhealthless<100 (not equal to):variable=player's health,start timer,state=1
state=1,timergreater=1000,plrhealth = (equal to) variable:state=2
state=1,timergreater=1000,plrhealth != (not equal to) variable:state=0
state=2,plrhealth<100:plraddhealth=1,timerstart,state=3
state=2,plrhealth=100:state=0
state=3,timergreater=50:state=2
Pretty much, I want it to set the variable to the players health to detect if after one second whether their health has changed. If it hasn't, it will add one health twenty times a second.
So, effectively, so long as the players health doesnt change in one second, (as unlikely as it is that they will lose and gain the same amount of health in one second) it will add the health until the player has full health, and then it will continue to run.
Windows 7 ultimate x64, Intel i7, 4 GB RAM, NVIDIA GEFORCE 330m 1GB
Flash Star Game Creations