Here are the four tentatively final triggers I am about to test:
Well there is one immediate issue. Ordering it to attack ground causes it to shoot three random locations nowhere near where I attack grounded, and then it crashed Warcraft 3 with a fatal error message.
EDIT: After roughly three shots at all it immediately crashes Warcraft 3 with a fatal error. It doesn't shoot anywhere near (-256,256), more like any point on the map it feels like. I actually had a problem like this before, wherein getting a real and using it directly was causing it to shoot totally random far off locations, but doing this:
-
Catapult Attack Enemies
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Unit-type of (Attacking unit)) Equal to Catapult
-
(Owner of (Attacking unit)) Not equal to (Owner of (Triggering unit))
-
-
Actions
-
Custom script: local unit u = GetAttacker()
-
Set Attack_loc = (Position of (Attacked unit))
-
Unit - Order (Attacking unit) to Human Mortar Team - Flare Attack_loc
-
Custom script: call RemoveLocation(udg_Attack_loc)
-
Wait 1.00 seconds
-
Custom script: call IssueImmediateOrder(u,"stop")
-
-
-
Catapult Attack Allies
-
Events
-
Unit - A unit Is attacked
-
-
Conditions
-
(Unit-type of (Attacking unit)) Equal to Catapult
-
(Owner of (Attacking unit)) Equal to (Owner of (Triggering unit))
-
-
Actions
-
Custom script: local unit u = GetAttacker()
-
Custom script: loop
-
Custom script: call IssuePointOrder(u,"flare",GetUnitX(GetTriggerUnit()),GetUnitY(GetTriggerUnit()))
-
Wait 5.00 seconds
-
Custom script: exitwhen GetUnitCurrentOrder(u) == OrderId("move") or GetUnitCurrentOrder(u) == OrderId("holdposition")
-
Custom script: endloop
-
-
-
Catapult Attack Ground
-
Events
-
Unit - A unit Is issued an order targeting a point
-
-
Conditions
-
(Issued order) Equal to (Order(attackground))
-
(Unit-type of (Triggering unit)) Equal to Catapult
-
-
Actions
-
Custom script: local real x = GetOrderPointX()
-
Custom script: local real y = GetOrderPointY()
-
Custom script: loop
-
Custom script: call IssuePointOrder(GetTriggerUnit(), "attackground", x+GetRandomReal(-256,256),y+GetRandomReal(-256,256))
-
Wait 5.00 seconds
-
Custom script: exitwhen GetUnitCurrentOrder(GetTriggerUnit()) != OrderId("attackground")
-
Custom script: endloop
-
-
-
Catapult Channel
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to CatapultChannel
-
-
Actions
-
Custom script: call IssuePointOrder(GetTriggerUnit(), "attackground", GetSpellTargetX()+GetRandomReal(-256,256),GetSpellTargetY()+GetRandomReal(-256,256))
-
Wait 1.00 seconds
-
Unit - Order (Triggering unit) to Stop
-
-
Well there is one immediate issue. Ordering it to attack ground causes it to shoot three random locations nowhere near where I attack grounded, and then it crashed Warcraft 3 with a fatal error message.
EDIT: After roughly three shots at all it immediately crashes Warcraft 3 with a fatal error. It doesn't shoot anywhere near (-256,256), more like any point on the map it feels like. I actually had a problem like this before, wherein getting a real and using it directly was causing it to shoot totally random far off locations, but doing this:
-
Unit - Order CatapultTarget to Attack Ground (Attack_loc offset by ((Real(RandomAttackX)), (Real(RandomAttackY))))