Mythes
Member
- Reaction score
- 7
I'm trying to make a Laser Charging Spell...
So, the idea is, the hero starts the effect of the ability, and a countdown fires.
The longer he holds the countdown (meaning, he stands still), the farther the laser hits.
I made 4 triggers for that, as follows:
The Start of the ability (ONLY TRIGGER ENABLED FROM START)
The Laser Counting (quite fast, up to 2 seconds..)
Canceling the charging, and releasing the laser...
The actual laser effect (just testing w/ thunderclap)
My problem is only with the effect part... It doesn't appear... I have no idea why..
Help here?
Myt.
So, the idea is, the hero starts the effect of the ability, and a countdown fires.
The longer he holds the countdown (meaning, he stands still), the farther the laser hits.
I made 4 triggers for that, as follows:
The Start of the ability (ONLY TRIGGER ENABLED FROM START)
Trigger:
- Lasers
- Events
- Unit - A unit Starts the effect of an ability
- Conditions
- (Ability being cast) Equal to I'm Chargin Ma Lazerz
- Actions
- Set LaserCount = 0
- Set LaserCaster = (Triggering unit)
- Set LaserCasterLoc = (Position of LaserCaster)
- Set LaserTargetLoc = (Target point of ability being cast)
- Unit - Make LaserCaster face LaserCasterLoc over 0.01 seconds
- Set LaserFacing = (Facing of LaserCaster)
- Trigger - Turn on Laser Charge <gen>
- Trigger - Turn on Laser Cancel <gen>
- Custom script: call RemoveLocation (udg_LaserCasterLoc)
- Custom script: call RemoveLocation (udg_LaserTargetLoc)
- Events
The Laser Counting (quite fast, up to 2 seconds..)
Trigger:
- Laser Charge
- Events
- Time - Every 0.20 seconds of game time
- Conditions
- Actions
- Set LaserCount = (LaserCount + 1)
- Floating Text - Create floating text that reads (String(LaserCount)) at (Position of LaserCaster) with Z offset 0.00, using font size 18.00, color (100.00%, 100.00%, 0.00%), and 25.00% transparency
- Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
- Floating Text - Change (Last created floating text): Disable permanence
- Floating Text - Change the fading age of (Last created floating text) to 0.10 seconds
- Floating Text - Change the lifespan of (Last created floating text) to 0.20 seconds
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- LaserCount Equal to 10
- Then - Actions
- Trigger - Turn off (This trigger)
- Trigger - Turn on Laser Effect <gen>
- Else - Actions
- If - Conditions
- Events
Canceling the charging, and releasing the laser...
Trigger:
- Laser Cancel
- Events
- Unit - A unit Is issued an order targeting an object
- Unit - A unit Is issued an order targeting a point
- Unit - A unit Is issued an order with no target
- Conditions
- (Triggering unit) Equal to LaserCaster
- Actions
- Trigger - Turn off Laser Charge <gen>
- Trigger - Turn off (This trigger)
- Trigger - Turn on Laser Effect <gen>
- Events
The actual laser effect (just testing w/ thunderclap)
Trigger:
- Laser Effect
- Events
- Conditions
- Actions
- Set LaserPosition2 = LaserCasterLoc
- For each (Integer A) from 1 to LaserCount, do (Actions)
- Loop - Actions
- Special Effect - Create a special effect at (LaserPosition2 offset by ((Real(LaserCount)) x 100.00) towards 0.00 degrees) using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Loop - Actions
- Trigger - Turn off (This trigger)
My problem is only with the effect part... It doesn't appear... I have no idea why..
Help here?
Myt.