- Joined
- Jun 14, 2008
- Messages
- 72
Hello i need a trigger that makes it when a type of unit loses life it does more damage, i cant figure out how to make it for every 4 life it loses it does 1 extra damage.
Events
Unit enters playable map area
Actions
Add the event "(Entering unit) Takes damage" to <YOUR TRIGGER>
Events
Map initialization
Actions
Set Temp_Group = Units in (Playable map area)
Unit Group - Pick every unit in Temp_Group and do:
Loop - (Actions):
Add the event "(Entering unit) Takes damage" to <YOUR TRIGGER>
Custom Script: call DestroyGroup(udg_Temp_Group)
Events
(none, because it is added through another trigger)
Conditions
Level of <ABILITY> for (Damage source) Greater than or Equal to 1
Actions
Cause (Damage source) to damage (Triggering unit) for (((Max life of (Damage source)) - (Current life of (Damage source)) / 4)
There is a simplier way
You need a unit ability, damage bonus (item ability), make it 100 levels, each level with 1 damage increment
You need a trigger that activates Trigger2
Then
Trigger2(disabled at start)
Every 0.5 seconds of the game
local int life = 0
local real lifemissing = 0
set lifemissing = unit maxlife - unit currentlife
life = converttoINT(lifemissing/4)
if (level of item damage bonus <1)
add item damage bonus to unit
endif
set damage bonus of unit to life
Hope you get it, sorry about no trigger tags =(