Moderator
M
Moderator
16:27, 9th Jun 2010
TriggerHappy:
Coding was fine and spell worked.
TriggerHappy:
Coding was fine and spell worked.
Manyshot

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Manyshot z

Actions


Set ManyshotSkip = (ManyshotSkip + 1)


Set Manyshot = (Manyshot + 1)


Set ManyshotCaster[Manyshot] = (Triggering unit)


Set ManyshotPoint = (Position of ManyshotCaster[Manyshot])


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




((Triggering unit) has buff Manyshot ) Equal to True



Then - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(Level of Manyshot for (Triggering unit)) Not equal to 4





Then - Actions






Set ManyshotLevel[Manyshot] = ((Level of Manyshot for ManyshotCaster[Manyshot]) + 1)






Unit - Set level of Manyshot for ManyshotCaster[Manyshot] to ManyshotLevel[Manyshot]





Else - Actions






Set ManyshotLevel[Manyshot] = ((Level of Manyshot for ManyshotCaster[Manyshot]) + 0)



Else - Actions




Unit - Add Manyshot Hidebook to ManyshotCaster[Manyshot]




Set ManyshotLevel[Manyshot] = 1




Player - Disable Manyshot Hidebook for (Owner of (Triggering unit))


Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Items\AIil\AIilTarget.mdl


Special Effect - Destroy (Last created special effect)


Floating Text - Create floating text that reads (String((ManyshotLevel[Manyshot] + 2))) at ManyshotPoint with Z offset 20.00, using font size 10.00, color (33.00%, 33.00%, 100.00%), and 0.00% transparency


Floating Text - Change (Last created floating text): Disable permanence


Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees


Floating Text - Change the fading age of (Last created floating text) to 2.00 seconds


Floating Text - Change the lifespan of (Last created floating text) to 3.00 seconds


Custom script: call RemoveLocation(udg_ManyshotPoint)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




ManyshotSkip Equal to 1



Then - Actions




Trigger - Turn on Manyshot Loop <gen>



Else - Actions
Manyshot Loop

Events


Time - Every 0.04 seconds of game time

Conditions

Actions


For each (Integer ManyshotA) from 1 to Manyshot, do (Actions)



Loop - Actions




If (All Conditions are True) then do (Then Actions) else do (Else Actions)





If - Conditions






(ManyshotCaster[ManyshotA] has buff Manyshot ) Equal to True





Then - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








ManyshotOn[ManyshotA] Equal to True







Then - Actions







Else - Actions








Set ManyshotOn[ManyshotA] = True





Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








ManyshotOn[ManyshotA] Equal to True







Then - Actions








Unit - Remove Manyshot Hidebook from ManyshotCaster[ManyshotA]








Set ManyshotLevel[ManyshotA] = 0








Set ManyshotSkip = (ManyshotSkip - 1)








Set ManyshotOn[ManyshotA] = False








If (All Conditions are True) then do (Then Actions) else do (Else Actions)









If - Conditions










ManyshotSkip Equal to 0









Then - Actions










Set Manyshot = 0










Trigger - Turn off (This trigger)









Else - Actions







Else - Actions