This requires Low level, so my idea is to make a script that recharges your health (in my case shield attribute) to full if the player's health attribute has stayed at one value for some time.
OK, so for this I'll need a variable that get's the value of the player's health attribute, let's call it
health_watch
so this variable has to get the health attribute:
Code: Select all
health_watch = GetAttribute("health","Player");
than the script has to check if the health has lowered
Code: Select all
if (GetAttribute("health", "Player") < health_watch)
{
}
...ok, that actually was stupid, the whole thing could be done with just
Code: Select all
if (GetAttribute("health", "Player") <100)
{
}
Than goes to another order, which would be something like this:
Code: Select all
ModifyAttribute("health", 1, "Player");
if (GetAttribute("health", "Player") >= health_watch)
{
}
And goes back to the begining, but how can I make a timer order,that will check if several seconds have passed since the last injury and check if the health has lowered (the one with the health and the lowering actually I did first, so I know how to do it, but how about a timer?). I want if the player recieves an injury during the delat befor the health/shield starts refilling, the timer to start again, but how to make the timer? Would Jay's timer thing be a good idea?
http://www.realityfactory.info/forum/vi ... fdf#p28715