Trigger for living units on damage upon blighted ground.

Status
Not open for further replies.
Level 5
Joined
Sep 24, 2015
Messages
13
Hi. I am in the middle of making a map called The Desolation of the Scourge and am reaching the final stages of development. One of the aspects of the map is to make human units take damage while on blighted ground. I have tried to give them a negative health regeneration while on blight but it seems that it disables healing regeneration such as healing wards and fountain of health, which I assume is based on there initial regeneration.
So here is my request. I would love someone to help me create a trigger in GUI or Jass that will allow me to make all living units take damage while on blighted ground. If anyone can help me post on the thread or Personal Message me. I would be grateful and you will receive special credits.
 
Level 7
Joined
Jan 23, 2011
Messages
350
How about using the damage aura from the tornado? You just change the objectives of the aura. You could create a dummy on the center of the blight with the aura.
If you have too many interactions with the blight you can detect it with triggers. Just setting a group with the humans units, then checking if the terrain is blighted and causing damage or adding the aura
 
Level 25
Joined
May 11, 2007
Messages
4,650
One way you can test before doing all of this, does adding the ring of regeneration ability to a human unit (while keeping the negative reg on blight) solve this?
Otherwise, pseudo code cuz I'm lazy:

----Trigger 1
unit enters entire map
check if unit is human, ground unit and organic

Add it to "HumanUnits"

----Trigger 2
Every 0.25 second
pick every unit in HumanUnits
set TempPoint1 = position of picked unit
Check if terrain at temppoint1 == blight!
if true: set picked unit health -= 2
cleanup tempPoint1

----Trigger 3
A unit dies
Check if unit is in HumanUnits
Remove unit from HumanUnits
 
Level 5
Joined
Sep 24, 2015
Messages
13
One way you can test before doing all of this, does adding the ring of regeneration ability to a human unit (while keeping the negative reg on blight) solve this?
Otherwise, pseudo code cuz I'm lazy:

----Trigger 1
unit enters entire map
check if unit is human, ground unit and organic

Add it to "HumanUnits"

----Trigger 2
Every 0.25 second
pick every unit in HumanUnits
set TempPoint1 = position of picked unit
Check if terrain at temppoint1 == blight!
if true: set picked unit health -= 2
cleanup tempPoint1

----Trigger 3
A unit dies
Check if unit is in HumanUnits
Remove unit from HumanUnits


Thanks for the suggestion ill give both a try and see what happens.
 
Status
Not open for further replies.
Top