• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[Trigger] Require help to fix this trigger and get it working...

Status
Not open for further replies.
  • Events
    • - Time - Every 0.03 seconds of game time
    • - Condtions
    • - Actions
      • - Unit Group - Pick every unit in NOTYOURUNITGROUP and do (Actions)
        • - Loop - Actions
          • Set MEHPOINT = Position of (Picked unit)) offset by 90 towards (Facing of Picked Unit)) degrees)
          • Set MEHREAL = (X of MEHPOINT)
          • Custom script: call SetUnitX( MEHU, udg_MEHREAL )
          • Set MEHREAL = (Y of MEHPOINT)
          • Custom script: call SetUnitY) MEHU, udg_MEHREAL)
Events
- Time - Every 0.03 seconds of game time
- Condtions
- Actions
- Unit Group - Pick every unit in NOTYOURUNITGROUP and do (Actions)
- Loop - Actions
Set MEHPOINT = Position of (Picked unit)) offset by 90 towards (Facing of Picked Unit)) degrees)
Set MEHREAL = (X of MEHPOINT)
Custom script: call SetUnitX( MEHU, udg_MEHREAL )
Set MEHREAL = (Y of MEHPOINT)
Custom script: call SetUnitY) MEHU, udg_MEHREAL)
 
I don't know if this is a typo or you have it wrong indeed in the trigger, but
  • Custom script: call SetUnitY) MEHU, udg_MEHREAL)
The parenthesis looks in the wrong direction; do it like your SetUnitX one.

I think he wants something like a knockback system, that will actually move the caster towards the direction he is facing.
If so, the custom scripts should have
"call SetUnitX (GetEnumUnit(), udg_MEHREAL)" and "call SetUnitY (GetEnumUnit(), udg_MEHREAL1)"
Another problem I can see is that you overwrite the variables with different values. Use different variables or a variable with array to set the X and Y respectively.
 
Status
Not open for further replies.
Back
Top