• 🏆 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] A simple(?) trigger problem

Status
Not open for further replies.
Level 19
Joined
Aug 16, 2007
Messages
881
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.
 
Level 19
Joined
Aug 16, 2007
Messages
881
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.
 
Level 19
Joined
Aug 16, 2007
Messages
881
  • 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...
 
Level 19
Joined
Aug 16, 2007
Messages
881
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
 
Level 19
Joined
Aug 16, 2007
Messages
881
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.
Top