Ship side fire effect - how to calculate the correct angles?

RedOrb

You can change this now in User CP.
Reaction score
14
Well.. Obviously my trigger doesn't work. Sad, because it's simplicity is magical.
Any ideas of how I should go about getting the right angles?

Code:
Untitled Trigger 002
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to SHIPS Side Fire 1
    Actions
        Set SHIPS_SideFirePointDummyPt = (Position of (Triggering unit))
        Set SHIPS_SideFirePointPort = ((Position of (Triggering unit)) offset by 50.00 towards ((Facing of (Triggering unit)) - 90.00) degrees)
        Set SHIPS_SideFirePointStarboard = ((Position of (Triggering unit)) offset by 50.00 towards ((Facing of (Triggering unit)) + 90.00) degrees)
        Unit - Create 1 SHIP SideFireDummy1 for (Owner of (Triggering unit)) at SHIPS_SideFirePointDummyPt facing (Angle from SHIPS_SideFirePointDummyPt to SHIPS_SideFirePointPort) degrees
        Unit - Set level of SHIP SideFire4 (Cannonball) for (Last created unit) to (Level of SHIPS Side Fire 1  for (Triggering unit))
        Unit - Hide (Last created unit)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave SHIPS_SideFirePointPort
        Unit - Create 1 SHIP SideFireDummy1 for (Owner of (Triggering unit)) at SHIPS_SideFirePointDummyPt facing (Angle from SHIPS_SideFirePointDummyPt to SHIPS_SideFirePointStarboard) degrees
        Unit - Set level of SHIP SideFire4 (Cannonball) for (Last created unit) to (Level of SHIPS Side Fire 1  for (Triggering unit))
        Unit - Hide (Last created unit)
        Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
        Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave SHIPS_SideFirePointStarboard
        Custom script:  call RemoveLocation (udg_SHIPS_SideFirePointDummyPt)
        Custom script:  call RemoveLocation (udg_SHIPS_SideFirePointPort)
        Custom script:  call RemoveLocation (udg_SHIPS_SideFirePointStarboard)

I put some messages to display the angles, and the angles were correct.. It's just the dummies aren't firing the way they're supposed to.

Ahh.. it's ok. It was some dummy positioning problem.
 

keychup

Active Member
Reaction score
34
Set PointA = Position of Triggering Unit
For Each Integer A (-1 to 1 ):
-If
--Integer A is not equal to 0
-Then:
--Set PointB = Point A offset by 50 towards Facing Angle of Triggering Unit + Integer A*90
--Create 1 Dummy at Point B facing angle of Triggering Unit
--Set Expiration for Last Created Unit
--Call RemoveLocation (udg_PointB)
--Set PointB = Position of Last Created Unit
--Set PointC = PointB offset by 50 towards facing angle of Last Created Unit
--Issue Last created unit to Shockwave PointC
--Call RemoveLocation (udg_PointB)
--Call RemoveLocation (udg_PointC)
Call RemoveLocation (udg_PointA)
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top