sentrywiz
New Member
- Reaction score
- 25
I'm doing some fun map and this is one of the item abilities there. It works for the most part, but the part that REALLY needs to work, doesn't.
Here is the trigger:
So what its supposed to do?
-a 7% chance on spell cast to pick units that are alive and enemy, see if their health is 50% or lower and if it is, to kill it.
I did notice two things about it. Unit is Alive doesn't cope with the condition if unit has 50% of lower health or vice versa. If you put those two in condition, trigger doesn't kill the unit. So its either alive or has 50% lower health. This wouldn't be a problem... but due to testing, if there are corpses around the trigger picks the corpses and applies the kill trigger to them.
Ideas, suggestions and fixes.
Here is the trigger:
Trigger:
- Touch of Death
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- ((Casting unit) has an item of type Touch of Death) Equal to True
- Actions
- Set DeathLoc = ((Position of (Casting unit)) offset by 100.00 towards (Facing of (Casting unit)) degrees)
- Game - Display to (All players) for 1.00 seconds the text: Death Location
- Wait 0.05 seconds
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Random real number between 1.00 and 100.00) Less than or equal to 7.00
- Then - Actions
- Unit Group - Pick every unit in (Units within 400.00 of DeathLoc matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) is alive) Equal to True))) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Life of (Picked unit)) Less than or equal to ((Life of (Picked unit)) / 2.00)
- Then - Actions
- Special Effect - Create a special effect at (Position of (Picked unit)) using Objects\Spawnmodels\Undead\UndeadDissipate\UndeadDissipate.mdl
- Special Effect - Destroy (Last created special effect)
- Unit - Kill (Picked unit)
- Game - Display to (All players) for 5.00 seconds the text: ((Name of (Owner of (Picked unit))) + just tasted the Grim Reaper's Scythe!)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Unit Group - Pick every unit in (Units within 400.00 of DeathLoc matching ((((Matching unit) belongs to an enemy of (Owner of (Casting unit))) Equal to True) and (((Matching unit) is alive) Equal to True))) and do (Actions)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation(udg_DeathLoc)
- Game - Display to (All players) for 1.00 seconds the text: Removing Death
- Events
So what its supposed to do?
-a 7% chance on spell cast to pick units that are alive and enemy, see if their health is 50% or lower and if it is, to kill it.
I did notice two things about it. Unit is Alive doesn't cope with the condition if unit has 50% of lower health or vice versa. If you put those two in condition, trigger doesn't kill the unit. So its either alive or has 50% lower health. This wouldn't be a problem... but due to testing, if there are corpses around the trigger picks the corpses and applies the kill trigger to them.
Ideas, suggestions and fixes.