- Joined
- Dec 12, 2012
- Messages
- 96
I'm kinda tired so i can't get this thing right. How do you take inflicted damage on unit or received damage from a unit as variables? Can anyone guide me? Thanks.
Temp
Events
Unit - A unit enters (Playable map area)
Conditions
Actions
Trigger - Add to Temp 2 <gen> the event (Unit - (Triggering unit) Takes damage)
Temp 2
Events
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Damage taken) Greater than 1.00
Then - Actions
Set DamageTakenVariable = (Damage taken)
Else - Actions
You must use Bribe's
Bribe's Damage Engine
Where can i get that?
now the variable which detects the amount of damage is DamageEventAmount.
if you want to specify the attacked unit, then..
the footman is the unit that receive the damage.
Damage
Events
Game - DamageEvent becomes Equal to 1.00
Conditions
(Unit-type of DamageEventTarget) Equal to Footman
Actions
if you want to specify the attacking unit, then...
the footman is the unit that deals the damage.
Damage
Events
Game - DamageEvent becomes Equal to 1.00
Conditions
(Unit-type of DamageEventSource) Equal to Footman
Actions
remember to turn off the trigger first before you deal damage.. or else it will create an infinite loop..
pretty easy, right ?
Can't find DamageEventSource nor DamageEventTarget in condition triggers. :/ I only found this
That system is kinda hard to grasp.
(Unit-type of (Damage source)) Equal to Footman
Oh God Why ????
anyway, Bribe's GUI Damage Engine v2.2.1.0 is a system which you must import to your map if you want to use them (Damage Engine and Unit Indexer) and these system provide you some Variables (DamageEventSource, DamageEventTarget, DamageEventAmount, DamageEvent, DamageModifierEvent).
download the test map on the link provided on the thread and copy the Damage Engine and Unit Indexer trigger... also remember to copy the Cheat Death Ability + 500000 from the test map...
when you import the Damage Engine, some of the actions will be disabled, just double click on the disabled actions and press enter then everything should be good..
if you think this is hard to understand, then go to the thread and read the tutorials there...
that variable will always be 0 because the event 'Unit - Unit is Attacked' is when the unit swings their weapon, therefore there is no damage yet on that time...
Set GS_Dmg_Rec = (Damage taken)
to answer your question for En_Tropy, you can find this actions
in the 'Trigger - Add New Event', when you click on this, it will display :
Trigger - Add to Temp 2 <gen> the event (Unit - (Triggering unit) Takes damage)
Add to (this trigger) the event Event
don't quote before i finish editing my post ! you're too fast !
you can see the answer on my last post...
not that, but this :
Time - Elapsed game time is 1.00 seconds
Unit - A unit enter Playable Map Area
you have to make sure that the trigger meet it's condition, in your case it's :
who is GS_Hero ?
(Damage source) Equal to GS_Hero
It's a summoned hero when Time - game elapsed 1 second of game.
could you show the trigger ?
hmmm, could you post the map or send them via PM ?