Hi there, I have got stuck while making this ability, it's a "beam" ability based on dummys making 5 shockwaves:
Help anyone?
Oh and btw, the first dummy is created but he doesn't get removed and the others isn't created. Also they don't shoot the spell :banghead:.
Code:
Beam of justice
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Beam of justice
Actions
Set BeamCaster = (Triggering unit)
Set BeamCasterPos = ((Position of BeamCaster) offset by 50.00 towards (Facing of BeamCaster) degrees)
Floating Text - Create floating text that reads Kaaa... at BeamCasterPos with Z offset 0.00, using font size 12.00, color (100.00%, 0.00%, 0.00%), and 0.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 lifespan of (Last created floating text) to 5.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
Unit - Create 1 Beam dummy for (Owner of BeamCaster) at BeamCasterPos facing Default building facing degrees
Set BeamDummy = (Last created unit)
Unit - Add Beam of justice dummy to BeamDummy
Unit - Set level of Beam of justice dummy for BeamDummy to (Level of Beam of justice for BeamCaster)
Set BeamDummyPos = ((Position of BeamDummy) offset by 50.00 towards (Facing of BeamCaster) degrees)
Custom script: call RemoveLocation (udg_BeamCasterPos)
For each (Integer A) from 1 to 5, do (Actions)
Loop - Actions
Unit - Create 1 Beam dummy for (Owner of BeamCaster) at BeamDummyPos facing Default building facing degrees
Set BeamDummy = (Last created unit)
Unit - Add Beam of justice dummy to BeamDummy
Unit - Set level of Beam of justice dummy for BeamDummy to (Level of Beam of justice for BeamCaster)
Unit - Order BeamDummy to Orc Tauren Chieftain - Shockwave BeamDummyPos
Floating Text - Create floating text that reads BOM! at BeamCasterPos with Z offset 0.00, using font size 12.00, color (100.00%, 0.00%, 0.00%), and 0.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 lifespan of (Last created floating text) to 5.00 seconds
Floating Text - Change the fading age of (Last created floating text) to 4.00 seconds
Wait 0.10 seconds
Unit - Remove BeamDummy from the game
Wait 0.30 seconds
Custom script: call RemoveLocation (udg_BeamCasterPos)
Oh and btw, the first dummy is created but he doesn't get removed and the others isn't created. Also they don't shoot the spell :banghead:.