(cast arrow)
Event
Unit - A unit Starts the effect of an ability
Condition
(Ability being cast) Equal to Arrow
Action
Set CastingUnit = (Casting unit)
Unit - Create 1 Arrow for (Owner of CastingUnit) at ((Position of CastingUnit) offset by 100.00 towards (Facing of CastingUnit) degrees) facing (Facing of CastingUnit) degrees
Set Arrow = (Last created unit)
Trigger - Turn on Arrow Shoot <gen>
(arrow shoot) not initially on
Event
Time - Every 0.01 seconds of game time
Condition
Action
Set location1 = (Position of CastingUnit)
Set location2 = (Position of Arrow)
Set location3 = (location2 offset by 12.00 towards (Angle from location1 to location2) degrees)
Unit - Move Arrow instantly to location3
Custom script: call RemoveLocation(udg_location1)
Custom script: call RemoveLocation(udg_location2)
Custom script: call RemoveLocation(udg_location3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Stop Greater than or equal to 1
Then - Actions
Set Stop = 0
Trigger - Turn off (This trigger)
Else - Actions
(Arrow Stop)
Event
Events
Unit - A unit enters Left <gen>
Unit - A unit enters Bottom <gen>
Unit - A unit enters Right <gen>
Unit - A unit enters Top <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Arrow
Actions
Set Stop = (Stop + 1)
Unit - Remove (Entering unit) from the game
Variables: Stop:Integer:0(Default)
location1: Point:None
location2: Point:None
location3: Point:None
Arrow: Unit:None
CastingUnit: Unit:None
If this ability is used by multiple players it gets glitchy and stuff. Can someone help please?
Event
Unit - A unit Starts the effect of an ability
Condition
(Ability being cast) Equal to Arrow
Action
Set CastingUnit = (Casting unit)
Unit - Create 1 Arrow for (Owner of CastingUnit) at ((Position of CastingUnit) offset by 100.00 towards (Facing of CastingUnit) degrees) facing (Facing of CastingUnit) degrees
Set Arrow = (Last created unit)
Trigger - Turn on Arrow Shoot <gen>
(arrow shoot) not initially on
Event
Time - Every 0.01 seconds of game time
Condition
Action
Set location1 = (Position of CastingUnit)
Set location2 = (Position of Arrow)
Set location3 = (location2 offset by 12.00 towards (Angle from location1 to location2) degrees)
Unit - Move Arrow instantly to location3
Custom script: call RemoveLocation(udg_location1)
Custom script: call RemoveLocation(udg_location2)
Custom script: call RemoveLocation(udg_location3)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Stop Greater than or equal to 1
Then - Actions
Set Stop = 0
Trigger - Turn off (This trigger)
Else - Actions
(Arrow Stop)
Event
Events
Unit - A unit enters Left <gen>
Unit - A unit enters Bottom <gen>
Unit - A unit enters Right <gen>
Unit - A unit enters Top <gen>
Conditions
(Unit-type of (Entering unit)) Equal to Arrow
Actions
Set Stop = (Stop + 1)
Unit - Remove (Entering unit) from the game
Variables: Stop:Integer:0(Default)
location1: Point:None
location2: Point:None
location3: Point:None
Arrow: Unit:None
CastingUnit: Unit:None
If this ability is used by multiple players it gets glitchy and stuff. Can someone help please?