Trigger Help.

MicroSheep

New Member
Reaction score
3
Okay so i made a trigger so that when a unit casts an ability, it creates a dummy with the missle affect which travels in a line. Now it works fine, except if your facing the opposite way that you casted, the dummy goes a different way to the point you selected.

This is the trigger:
Trigger:
  • Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball
    • Actions
      • Set TempPoint[0] = (Target point of ability being cast)
      • Set TempPoint[1] = (Position of (Triggering unit))
      • Unit - Create 1 Firebolt for (Owner of (Triggering unit)) at (TempPoint[1] offset by 50.00 towards (Facing of (Triggering unit)) degrees) facing (Facing of (Triggering unit)) degrees
      • Set Firebolt[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Unit - Turn collision for Firebolt[1] Off
      • Trigger - Turn on Movement <gen>
      • Trigger - Add to Contact and Damage <gen> the event (Unit - A unit comes within 50.00 of Firebolt[1])
      • Wait 2.50 seconds
      • Trigger - Turn off Movement <gen>
      • Unit - Remove Firebolt[1] from the game
      • Custom script: call RemoveLocation (udg_temp_point(0))
      • Custom script: call RemoveLocation (udg_temp_point(1))


How do i make it so regardless of your facing angle, it travels facing the point you selected.
 

Ayanami

칼리
Reaction score
288
Okay so i made a trigger so that when a unit casts an ability, it creates a dummy with the missle affect which travels in a line. Now it works fine, except if your facing the opposite way that you casted, the dummy goes a different way to the point you selected.

This is the trigger:
Trigger:
  • Casting
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball
    • Actions
      • Set TempPoint[0] = (Target point of ability being cast)
      • Set TempPoint[1] = (Position of (Triggering unit))
      • Unit - Create 1 Firebolt for (Owner of (Triggering unit)) at (TempPoint[1] offset by 50.00 towards (Facing of (Triggering unit)) degrees) facing (Facing of (Triggering unit)) degrees
      • Set Firebolt[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
      • Unit - Turn collision for Firebolt[1] Off
      • Trigger - Turn on Movement <gen>
      • Trigger - Add to Contact and Damage <gen> the event (Unit - A unit comes within 50.00 of Firebolt[1])
      • Wait 2.50 seconds
      • Trigger - Turn off Movement <gen>
      • Unit - Remove Firebolt[1] from the game
      • Custom script: call RemoveLocation (udg_temp_point(0))
      • Custom script: call RemoveLocation (udg_temp_point(1))


How do i make it so regardless of your facing angle, it travels facing the point you selected.

Instead of "Facing of (Triggering unit)", try "Angle from TempPoint[1] to TempPoint[2]".
 

MicroSheep

New Member
Reaction score
3
perfect thanks for that, also is there a way to make it so that the last part of the trigger works?

The call RemoveLocation (udg_TempPoint(1)) becuase it seems that arrays dont work for me with that custom script.
 

cryowraith

New Member
Reaction score
7
its call RemoveLocation(udg_TempPoint[0]). It is caps sensitive so type it to be the same as the variable name but add udg_ in front.
 
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