Exide
I am amazingly focused right now!
- Reaction score
- 448
Hi.
I couldn't find a better name for the thread title.
Anyway.. I have a trigger that:
1. A unit destroys an explosive barrel near the boss.
2. The boss takes additional damage, depending on how close he is to the barrel.
3. The barrels are standing four-by-four so the trigger fires four times each time a barrel dies.
Here is my trigger:
What happens is: the trigger seems to ignore my If/Then/Else -condition.
It also seems to deal about 320-340 damage to the boss (Odin), no matter how close or far away he is from the barrels.
The idea is to deal maximum 350 damage to Odin (if he's standing on top of the barrel), and deal less damage the further away he is.
Bonus question: is "head" a valid attachment for my explosion?
I couldn't find a better name for the thread title.
Anyway.. I have a trigger that:
1. A unit destroys an explosive barrel near the boss.
2. The boss takes additional damage, depending on how close he is to the barrel.
3. The barrels are standing four-by-four so the trigger fires four times each time a barrel dies.
Here is my trigger:
Code:
Sector3_ExplosiveBarrels
Events
Unit - Any Unit dies
Local Variables
dist = 0.0 <Real>
r = 0.0 <Real>
Conditions
(Unit type of (Triggering unit)) == Explosives
Actions
Variable - Set dist = (Distance between (Position of (Triggering unit)) and (Position of Odin))
General - If (Conditions) then do (Actions) else do (Actions)
If
dist < 351.0
Then
Environment - Create a Small Terran explosion at (Position of (Triggering unit))
Environment - Create a Small Terran explosion at (Odin attachment point ("head"))
Variable - Set r = (350.0 - dist)
Unit - Set Odin Life to ((Odin Life (Current)) - r)
Debug - Display ("Damage Dealt: " + (Text(r) with Any Precision decimal places)) as debug output using Type 1, and Do display it in the game window
Else
What happens is: the trigger seems to ignore my If/Then/Else -condition.
It also seems to deal about 320-340 damage to the boss (Odin), no matter how close or far away he is from the barrels.
The idea is to deal maximum 350 damage to Odin (if he's standing on top of the barrel), and deal less damage the further away he is.
Bonus question: is "head" a valid attachment for my explosion?