• 🏆 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!

[Solved] Traveling Shop

Status
Not open for further replies.
Level 10
Joined
Jun 20, 2017
Messages
335
The problem is, when the unit goes somewhere, it gets stuck in some places!
  • Shops
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set Point = (Random point in (Playable map area))
      • Unit - Move Goblin Zeppelin 0016 <gen> instantly to Point
      • Set Point_Shop = (Random point in (Playable map area))
      • Unit - Order Goblin Zeppelin 0016 <gen> to Move To Point_Shop
      • Set Point2 = (Position of Goblin Zeppelin 0016 <gen>)
      • Cinematic - Ping minimap for PlayerGroup_Hunters at Point for 1.00 seconds
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Distance between Point_Shop and Point2) Less than (<) 900.00
          • Then - Actions
            • Set Point_Shop = (Random point in (Playable map area))
            • Unit - Order Goblin Zeppelin 0016 <gen> to Move To Point_Shop
            • Custom script: call RemoveLocation (udg_Point_Shop)
          • Else - Actions
      • Custom script: call RemoveLocation(udg_Point)
      • Custom script: call RemoveLocation (udg_Point_Shop)
      • Custom script: call RemoveLocation(udg_Point2)
 
Last edited:
Level 13
Joined
Oct 12, 2016
Messages
769
If it's an air unit, that won't be a problem unless you put up a boundary.
If it's a ground unit, you will have to manually set waypoints for it to move, and check your pathing.

Press "P" to check ground unit pathing. Anywhere it's pink means your ground unit can't go there. Blue just means it's unbuildable terrain.
Also, note that collision plays a big role.
If the unit's collision is more than 24.00, it cannot go through a 1 square space on the map grid (press "G" twice to view).
For example:
  • Ground units with a collision of 48.00 take up exactly 2 small squares on the grid for width.
  • Ground units with a collision of 12.00 take up 0.5 small squares on the grid.
Keep this in mind when designing the layout of your maps.
 
Status
Not open for further replies.
Top