• Check out the results of the Techtree Contest #19!
  • 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.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

[Trigger] A simple(?) trigger problem

Status
Not open for further replies.
Hello! :D I'm creating a new mini game map, some of you may have tested my latest map? Download the map here :)

Anyway, I've got a weird problem that I don't understand, check this trigger and I'll explain the thing that won't work.

  • Set temp_point[0] = (Position of Ball_Unit)
  • Set temp_point[1] = (temp_point[0] offset by Ball_Speed towards Ball_Angle degrees)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Terrain pathing at temp_point[1] of type Walkability is off) Equal to False
          • (Terrain pathing at temp_point[1] of type Flyability is off) Equal to False
          • ((Playable map area) contains temp_point[1]) Equal to True
    • Then - Actions
      • Unit - Move Ball_Unit instantly to temp_point[1]
    • Else - Actions
      • Set Ball_Speed = 0.00
Well... The problem is that the trigger NEVER detects ANY of my conditions, even if I've put out Pathing Blockers, the trigger won't detect them, not even the boundary!! Because the speed is never set to 0.00!

Do you know what the error is, please tell me :) Or is it just a stupid World Editor/Warcraft 3 bugg? :(

Thanks.
 
If you've put these conditions in a "Or" statement, it will return true as long as the unit is in the playable map area. You should put the last condition out of the "Or" statement, I guess :P

Also, never forget that Blizzard's pathability function does NOT check for destructables or buildings (but does for doodads). Therefore, ordinary pathing blockers are useless.
 
If you've put these conditions in a "Or" statement, it will return true as long as the unit is in the playable map area. You should put the last condition out of the "Or" statement, I guess :P

Also, never forget that Blizzard's pathability function does NOT check for destructables or buildings (but does for doodads). Therefore, ordinary pathing blockers are useless.

Well, I tried to change the conditions at all ways that I could do I think, but with no result, the else action won't trigger... :/ It have to be something else...
 
  • Set temp_point[0] = (Position of Ball_Unit)
  • Set temp_point[1] = (temp_point[0] offset by Ball_Speed towards Ball_Angle degrees)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Terrain pathing at temp_point[1] of type Walkability is off) Equal to False
      • ((Playable map area) contains temp_point[1]) Equal to True
    • Then - Actions
      • Unit - Move Ball_Unit instantly to temp_point[1]
    • Else - Actions
      • Set Ball_Speed = 0.00
Try this. I don't know what you want, but this would run Else Actions when the point is not walkable, or is not in playable map area.
 
  • Set temp_point[0] = (Position of Ball_Unit)
  • Set temp_point[1] = (temp_point[0] offset by Ball_Speed towards Ball_Angle degrees)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Terrain pathing at temp_point[1] of type Walkability is off) Equal to False
      • ((Playable map area) contains temp_point[1]) Equal to True
    • Then - Actions
      • Unit - Move Ball_Unit instantly to temp_point[1]
    • Else - Actions
      • Set Ball_Speed = 0.00
Try this. I don't know what you want, but this would run Else Actions when the point is not walkable, or is not in playable map area.

That didn't work either :(

I tried to add a debug message and the number 2 did never appear :/

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Terrain pathing at temp_point[1] of type Walkability is off) Equal to False
      • ((Playable map area) contains temp_point[1]) Equal to True
    • Then - Actions
      • Unit - Move Ball_Unit instantly to temp_point[1]
      • Game - Display to (All players) the text: 1
    • Else - Actions
      • Set Ball_Speed = 0.00
      • Game - Display to (All players) the text: 2
This is really weird that this won't work :s
 
Indeed, weird. I've just tested this:

  • Actions
    • Set p = (Position of Gryphon Rider 0000 <gen>)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Terrain pathing at p of type Walkability is off) Equal to False
        • (Region 000 <gen> contains p) Equal to True
      • Then - Actions
        • Game - Display to (All players) the text: 1
      • Else - Actions
        • Game - Display to (All players) the text: 2
Then I placed some destructables and doodads in Region 000, and flew around with the Gryphon Rider. The message 2 appeared while over the doodads or out of the region...

Let me repeat, you're not testing with destructables, are you? Those are not considered by the Blizzard's pathability-check...
 
Indeed, weird. I've just tested this:

  • Actions
    • Set p = (Position of Gryphon Rider 0000 <gen>)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Terrain pathing at p of type Walkability is off) Equal to False
        • (Region 000 <gen> contains p) Equal to True
      • Then - Actions
        • Game - Display to (All players) the text: 1
      • Else - Actions
        • Game - Display to (All players) the text: 2
Then I placed some destructables and doodads in Region 000, and flew around with the Gryphon Rider. The message 2 appeared while over the doodads or out of the region...

Let me repeat, you're not testing with destructables, are you? Those are not considered by the Blizzard's pathability-check...

Damn, this is killing me! I've almost copied your actions but replaced your variables with mine, but it still won't work! And I also put out some trees (destructables) but number 2 won't appear anyway... And there's no problems with my variables if you think so. I've never had a complicated problem like this before! o.O
 
Number 2 isn't supposed to appear over destructables :P

Well I really can't help you anymore =/
I've said everything I could x.x

Well, maybe not, but this little condition:
  • (Terrain pathing at p of type Walkability is off) Equal to False
would see if there's something in the way that's blocking right? So trees, that have a blocking path, won't the trees interact with the condition then?

Well, hopefully someone else have the solution :) thx for your help, +rep


Edit: I've got it to work... a little, but not as I want it to. The boundary can be checked and cliffs, but not destructables or pathing blockers and it's them I want the trigger to check :/

I did change my trigger a little to this:

  • Set temp_point[0] = (Position of Ball_Unit)
  • Set temp_point[1] = (temp_point[0] offset by Ball_Speed towards Ball_Angle degrees)
  • Set temp_point[2] = (temp_point[0] offset by 100.00 towards Ball_Angle degrees)
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • ((Playable map area) contains temp_point[2]) Equal to True
      • And - All (Conditions) are true
        • Conditions
          • (Terrain pathing at temp_point[2] of type Walkability is off) Equal to False
          • (Terrain pathing at temp_point[2] of type Flyability is off) Equal to False
    • Then - Actions
      • Game - Display to (All players) the text: 1
      • Unit - Move Ball_Unit instantly to temp_point[1]
    • Else - Actions
      • Game - Display to (All players) the text: 2
      • Set Ball_Speed = 0.00
I added a new temp_point and increased the range of it :) But still... It wont detect pathing blockers =(
 
Status
Not open for further replies.
Back
Top