- Joined
- Sep 3, 2006
- Messages
- 1,738
Hello GUI trigger wizzes. I have a challenge for you. I made this spell for my map a few months ago, and I've decided that I want to make it MUI. I know it's possible, because I already use hashtables and they can very easily store the real values. My challenge to you is: what's the most effective way to make this MUI?
The only thing that bugs is the boolean and the reals (meaning they're the only non-MUI things). Also, I'd like some feedback on my beam trigger, mainly whether it leaks or not.
The only thing that bugs is the boolean and the reals (meaning they're the only non-MUI things). Also, I'd like some feedback on my beam trigger, mainly whether it leaks or not.
-
Galick Gun
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Galick Gun
-
-
Actions
-
Set Distance = 0.00
-
Set ChargeTime = 0.00
-
Set EnergySize = 100.00
-
Set Vegeta = (Triggering unit)
-
Set VegetaHandle = (Triggering unit)
-
Hashtable - Save Handle OfVegeta as 0 of (Key VegetaHandle) in GalickGunHash
-
Set VegetaPoint = (Position of (Load 0 of (Key VegetaHandle) in GalickGunHash))
-
Hashtable - Save Handle OfVegetaPoint as 1 of (Key VegetaHandle) in GalickGunHash
-
Animation - Change (Load 0 of (Key VegetaHandle) in GalickGunHash)'s animation speed to 0.00% of its original speed
-
Unit - Create 1 for (Owner of (Load 0 of (Key VegetaHandle) in GalickGunHash)) at VegetaPoint facing Default building facing degrees
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Unit - Add Ensnare to (Last created unit)
-
Unit - Order (Last created unit) to Orc Raider - Ensnare (Load 0 of (Key VegetaHandle) in GalickGunHash)
-
Unit - Create 1 for (Owner of (Load 0 of (Key VegetaHandle) in GalickGunHash)) at VegetaPoint facing Default building facing degrees
-
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
-
Trigger - Turn on Energy Charge <gen>
-
Trigger - Turn on Energy Cancel <gen>
-
Wait until (EnergyCharged Equal to True), checking every 1.00 seconds
-
Trigger - Turn on Energy Beam <gen>
-
Trigger - Turn off Energy Charge <gen>
-
Trigger - Turn off Energy Cancel <gen>
-
Set EnergyCharged = False
-
Wait 1.00 seconds
-
Animation - Change (Load 0 of (Key VegetaHandle) in GalickGunHash)'s animation speed to 100.00% of its original speed
-
Unit - Order (Load 0 of (Key VegetaHandle) in GalickGunHash) to Stop
-
Hashtable - Clear all child hashtables of child (Key VegetaHandle) in GalickGunHash
-
Trigger - Turn off Energy Beam <gen>
-
Unit Group - Remove all units of AlreadyDamaged from AlreadyDamaged
-
Custom script: call RemoveLocation(udg_BeamLine)
-
Custom script: call RemoveLocation(udg_VegetaPoint)
-
-
-
Energy Charge
-
Events
-
Time - Every 0.20 seconds of game time
-
-
Conditions
-
Actions
-
Unit - Create 1 for (Owner of (Load 0 of (Key VegetaHandle) in GalickGunHash)) at (Load 1 of (Key VegetaHandle) in GalickGunHash) facing Default building facing degrees
-
Unit - Add a 0.20 second Generic expiration timer to (Last created unit)
-
Set EnergySize = (EnergySize + 15.00)
-
Set ChargeTime = (ChargeTime + 0.20)
-
Animation - Change (Last created unit)'s size to (EnergySize%, EnergySize%, EnergySize%) of its original size
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChargeTime Greater than or equal to 5.00
-
-
Then - Actions
-
Set EnergyCharged = True
-
-
Else - Actions
-
-
-
-
Energy Cancel
-
Events
-
Unit - A unit Is issued an order with no target
-
-
Conditions
-
(Issued order) Equal to (Order(stop))
-
(Unit-type of (Load 0 of (Key VegetaHandle) in GalickGunHash)) Equal to (Unit-type of (Ordered unit))
-
((Load 0 of (Key VegetaHandle) in GalickGunHash) has buff Ensnare (Ground)) Equal to True
-
-
Actions
-
Set EnergyCharged = True
-
Wait 1.00 seconds
-
Unit - Remove Ensnare (Ground) buff from (Load 0 of (Key VegetaHandle) in GalickGunHash)
-
-
-
Energy Beam
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChargeTime Less than or equal to 1.00
-
-
Then - Actions
-
Set Distance = (Distance + 6.60)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChargeTime Greater than 1.00
-
ChargeTime Less than 2.00
-
-
Then - Actions
-
Set Distance = (Distance + 11.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChargeTime Greater than 2.00
-
ChargeTime Less than or equal to 3.00
-
-
Then - Actions
-
Set Distance = (Distance + 16.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChargeTime Greater than 3.00
-
ChargeTime Less than or equal to 4.00
-
-
Then - Actions
-
Set Distance = (Distance + 19.00)
-
-
Else - Actions
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
ChargeTime Greater than 4.00
-
-
Then - Actions
-
Set Distance = (Distance + 27.00)
-
-
Else - Actions
-
-
Set EndPoint = ((Position of (Load 0 of (Key VegetaHandle) in GalickGunHash)) offset by (Facing of (Load 0 of (Key VegetaHandle) in GalickGunHash)) towards (Facing of (Load 0 of (Key VegetaHandle) in GalickGunHash)) degrees)
-
Hashtable - Save Handle OfEndPoint as 2 of (Key VegetaHandle) in GalickGunHash
-
Set BeamLine = ((Position of (Load 0 of (Key VegetaHandle) in GalickGunHash)) offset by Distance towards (Distance between (Load 1 of (Key VegetaHandle) in GalickGunHash) and (Load 2 of (Key VegetaHandle) in GalickGunHash)) degrees)
-
Unit - Create 1 for (Owner of (Load 0 of (Key VegetaHandle) in GalickGunHash)) at BeamLine facing Default building facing degrees
-
Unit - Add a 0.80 second Generic expiration timer to (Last created unit)
-
Set DamageGroup = (Units within 250.00 of BeamLine matching ((((Matching unit) belongs to an enemy of (Owner of (Load 0 of (Key VegetaHandle) in GalickGunHash))) Equal to True) and ((((Matching unit) is in AlreadyDamaged) Equal to False) and (((Matching unit) is A structure) E
-
Unit Group - Pick every unit in DamageGroup and do (Actions)
-
Loop - Actions
-
Unit - Cause (Load 0 of (Key VegetaHandle) in GalickGunHash) to damage (Picked unit), dealing ((ChargeTime x (Real((Level of Charging Energy for (Load 0 of (Key VegetaHandle) in GalickGunHash))))) x 25.00) damage of attack type Spells and damage type Normal
-
Unit Group - Add (Picked unit) to AlreadyDamaged
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Undead\DeathandDecay\DeathandDecayTarget.mdl
-
Special Effect - Destroy (Last created special effect)
-
Special Effect - Create a special effect attached to the origin of (Picked unit) using Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
-
Special Effect - Destroy (Last created special effect)
-
-
-
Destructible - Pick every destructible within 256.00 of BeamLine and do (Actions)
-
Loop - Actions
-
Destructible - Kill (Picked destructible)
-
-
-
Custom script: call DestroyGroup(udg_DamageGroup)
-
Custom script: call RemoveLocation(udg_BeamLine)
-
Custom script: call RemoveLocation(udg_EndPoint)
-
-