• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Trigger isn't working..

Status
Not open for further replies.
Level 5
Joined
Jun 24, 2009
Messages
118
  • HeroPick01
    • Events
      • Player - (Owner of Wisp 0002 <gen>) Selects a unit
      • Unit - A unit enters Hero Pick Region <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
    • Actions
      • Player Group - Pick every player in Player Group - Player 1 (Red) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Owner of (Entering unit)) Equal to (Picked player)
            • Then - Actions
              • Wait 1.00 seconds
              • Unit - Move (Entering unit) instantly to (Center of The Destroyers Region <gen>)
              • Unit - Explode Wisp 0002 <gen>
            • Else - Actions
              • Do nothing
where is the mistake?
 
Level 5
Joined
Jun 24, 2009
Messages
118
wrong answer!

I know, but if I pick with Player(Red) hero will pick but he will not enter to next region and wisp wont explode..That what u said isn't my problem..
 
The trigger is a mess actually. That wisp is a pre-set unit, which means that it already does have an owner. Double click it in the World Editor and it will show you the owner. Since you want it to work for Player 1 (Red), then have this trigger instead:
  • Trigger
  • Events
    • Selection - Player 1 (Red) selects a unit
  • Conditions
    • ((Unit-type of (Triggering unit)) Not Equal to Wisp
  • Actions
    • Set Point1 = (Position of (Wisp 0002 <gen>))
    • If/ Then/ Else
      • If (Conditions)
        • ((Hero Pick Region <gen>) contains (Point1)) Equal to True (This is a Boolean condition)
      • Then (Actions)
        • Unit - Explode Wisp 0002 <gen>
        • Set Point2 = (Center of (The Destroyers Region <gen>))
        • Unit - Move (Triggering unit) instantly to Point2
        • Custom script: call RemoveLocation (udg_Point2)
    • Custom script: call RemoveLocation (udg_Point1)
 
Level 5
Joined
Jun 24, 2009
Messages
118
Well,there's a two Taverns - Light and Dark and also two teams - The Destroyers and The Guards. Each team have his region 2 creeping and team1 can' walk into team2 region. That's why I need to create that for all players separately.I can use Picked Player (Enemies of playerX) and create only two triggers.I will try to do it by myself coz this is differend map - original idea by me. :) So,my new trigger:
Trigger

  • Events
    • Player - Player 1 (Red) Selects a unit
  • Conditions
    • (Unit-type of (Triggering unit)) Not equal to Wisp
  • Actions
    • Set Point1 = (Position of Wisp 0002 <gen>)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Hero Pick Region <gen> contains Point1) Equal to True
        • ((Triggering unit) is A Hero) Equal to True
      • Then - Actions
        • Wait 1.00 seconds
        • Unit - Explode Wisp 0002 <gen>
        • Set Point2 = (Center of The Destroyers Region <gen>)
        • Unit - Move (Triggering unit) instantly to Point2
        • Custom script: call RemoveLocation (udg_Point2)
      • Else - Actions
    • Custom script: call RemoveLocation (udg_Point1)
Works fine for me. :)

Solved.
 
Status
Not open for further replies.
Top