• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

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

Status
Not open for further replies.
Level 6
Joined
Feb 19, 2010
Messages
182
  • 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.
Top