• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Movement reduction and Regeneration based on Health Percentage Request

Status
Not open for further replies.
Level 9
Joined
Apr 7, 2010
Messages
480
Systems

1. Movement Reduction - for all units, Reduce 1% of units movement speed by every 1% health missing

2. Regeneration - for all units, regenerate .5% of his maximum health per second after not receiving damage for 7 seconds.

anyone able to Trigger/Script this out?
 
First, add the units to the group UNITS in whatever manner you like
  • Events
    • Time - every .03 seconds of game time
  • Actions
    • Unit Group - Pick every unit in UNITS and do
      • Do - Actions
        • Unit - Set movement speed of picked unit to (Default movespeed of (Picked Unit))*(Current health of picked unit/Max health of picked unit)
 
Level 9
Joined
Apr 7, 2010
Messages
480
how about this.
every 1 sec
set timer = timer+1
if timer = 7
then action
regen

but, i dont know how to determine if unit is not being attacked
 
Status
Not open for further replies.
Top