Quote: "I'm not seeing a decent way to accomplish the "PlrHit=X" with the standard script commands... maybe have to wait until CE comes back in."
I don't think I could a timer for when the player was last damaged easily, BUT you could easily do when the player was last shot at.
Use multiple timers based on a main timer script that increments multiple variables each second in a one second loop.
Now each of those multiple variables can be used as a timer.
Simply set the timer variables value to zero to start the timer and the main timer script does the rest.
Reading the value will tell you how many seconds have elapsed since the variable was reset.
Now all we have to do is set one of those variable to zero in every enemy script right after the useweapon action.
Now every time a enemy shoots at the player the 'shot at timer' is reset.
Again, reading that variable's value is your shot at timer.
I could do the player damage thing, but it woulld entail copying the player's health to a variable and then doing it again so the two could be compared.
That sounds silly but you have to emulate the value in order to work with it or you would be affecting the players health in the process.
I can do addition and subtraction and a few other things with those variables, but it is complicated. (adding two variables not adding to a variable)
Look at the cash scripts for examples of playing with the numbers.
So, in order to copy the players health to a global variable we can store we have to increase the health while incrementing two variables.
Then one variable would be used to restore the player's health. (decrement the variable while decrementing health)
Leaving the other variable as our stored player health value.
Then that process would be done again later (each second maybe)using two other variables so we store it again.
Then we compare the two stored variables by decrementing each together until one equals zero.
The difference if any is the value of the other variable.
If it equals zero then no player damage has been attained and the shot timer variable would be incremented by one for that one second loop.
If the variable was greater than zero then the player did take damage and we would reset the shot timer variable.
So, bottom line is ...it can be done but not easily.
PS
We would increment the players health to an even hundred higher than they start at rather than decrementing it to zero.
Then we would return it with that second variable I was talking about.
That way we don't kill the player when determining their health's value.
Quote: "i know plystire is thebest scripter around here on the forums(at leat i think he is)"
Yeah, he reminds me of Merranvo
, and Merranvo is the best.
Quote: "I'm not seeing a decent way to accomplish the "PlrHit=X" with the standard script commands... maybe have to wait until CE comes back in."
I know you were sticking it to me, but that's ok because it can be done.