[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