DM Cross
You want to see a magic trick?
- Reaction score
- 568
I'm having a problem with this trigger I'm using to pick all units in the map at casting so that number will determine how much damage an ability does. Here's the code I tried:
BombTarget is a Point variable.
BombDamage is a Real variable. (Should I be using an Integer?)
The special effects work fine. It's the damage that seems to be screwed up, since that's the part my computer froze until I restarted it at.
Also, is it alright that I didn't set the Infernal special effect to a variable, and simply destroyed it 2 seconds after I created it?
I figured this was easier, but didn't know if it was a good or bad idea...
Any help, guys?
Code:
Bomb
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Bomb
Actions
Set BombDamage = ((Real((Number of units in (Units in (Playable map area))))) x 10.00)
Set BombTarget = (Target point of ability being cast)
Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
Loop - Actions
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\DarkRitual\DarkRitualTarget.mdl
Wait 9.75 seconds
Special Effect - Create a special effect at BombTarget using Units\Demon\Infernal\InfernalBirth.mdl
Wait 2.00 seconds
Special Effect - Destroy (Last created special effect)
Special Effect - Destroy BombEffect
Unit Group - Pick every unit in (Units within 500.00 of BombTarget) and do (Actions)
Loop - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - BombDamage)
BombTarget is a Point variable.
BombDamage is a Real variable. (Should I be using an Integer?)
The special effects work fine. It's the damage that seems to be screwed up, since that's the part my computer froze until I restarted it at.
Also, is it alright that I didn't set the Infernal special effect to a variable, and simply destroyed it 2 seconds after I created it?
I figured this was easier, but didn't know if it was a good or bad idea...
Any help, guys?


