Victor Koulikov
Veteran
- Messages
- 17
- Reaction score
- 3
- Points
- 558
- Thread starter
- #21
It doesn't work :/ I have tested with and without the other self.health. Without the other self health code, It takes 2 hits to get down on all maps. Is there something I need to put in inti() to make the function active?Yes, the health is automatically reset back to 100 when a player enters afterlife mode.
Here you go.
Code:healthLoop() { self.isHealthSet = undefined; while( true ) { if(!self.afterlife && !isDefined(self.isHealthSet)) { self.isHealthSet = true; self.health = 400; self.maxhealth = self.health; } else if(self.afterlife && isDefined(self.isHealthSet)) self.isHealthSet = undefined; wait .05; } }