User Tools

Site Tools


4rpl:commands:while

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
4rpl:commands:while [2024/06/05 22:23] – [Examples] LiteralNoob4rpl:commands:while [2024/06/11 12:16] (current) Kalli
Line 29: Line 29:
 # Health regen rate or "GetUnitHealRate(self)". # Health regen rate or "GetUnitHealRate(self)".
  
-while(GetUnitHealth(self) GetUnitMaxHealth(self) eq)        #If unit's current health is equal to it's max health...+while eq(GetUnitHealth(self) GetUnitMaxHealth(self))        #If unit's current health is equal to it's max health...
     repeat                                                              #...repeat this section of code.     repeat                                                              #...repeat this section of code.
     SetUnitMaxHealth(self GetUnitMaxHealth 0.5 add)                     #Add 0.5 points of max health to the unit     SetUnitMaxHealth(self GetUnitMaxHealth 0.5 add)                     #Add 0.5 points of max health to the unit
4rpl/commands/while.txt · Last modified: 2024/06/11 12:16 by Kalli