• 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.

[Trigger] How to prevent unit spawning in deep water?

Status
Not open for further replies.
Level 4
Joined
May 17, 2011
Messages
106
Hello!

So I made a system where monsters spawn at a random point in a playable map area but sometime some of them would still spawn in deep water... Is there a way to make them NOT spawn in deep water?

Thanks!

Edit: Oh by the way, I know this doesn't concern that thread but if someone could tell me why the ability spiked barricades doesn't work on other race than the orcs that would be nice! (I made some custom buildings and gave them the ability spiked barricades once the research for it is done... but it won't work for some reason that I couldn't find)
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
Pharaoh_'s method might work, but this has one less condition and should work also:
  • Untitled Trigger 030
    • Events
      • Unit - A unit Is issued an order targeting a point
    • Conditions
    • Actions
      • Set point = (Target point of issued order)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at point of type Walkability is off) Equal to True
          • (Terrain pathing at point of type Floatability is off) Equal to False
        • Then - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: deep water
        • Else - Actions
          • Game - Display to Player Group - Player 1 (Red) the text: not deep water
      • Custom script: call RemoveLocation(udg_point)
 
Level 4
Joined
May 17, 2011
Messages
106
As a condition for this trigger, I supose that would be the trigger creating a unit running or something like that? I have some difficulties understanding that trigger of yours. Mind some explanations about it? :D

here is what my trigger looks like

  • MonstersSpawnEasy
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Unit - Create 1 (Unit-type of (Random unit from ActiveMonsters)) for Player 12 (Brown) at (Random point in (Playable map area)) facing Default building facing degrees
At some time in the game, I just add some specific monsters on my activemonsters variable just for the insight...

Edit: Btw, where did you find such conditions?
 
Level 4
Joined
May 17, 2011
Messages
106
I'm sorry, but I still don't get where you got these Terrain pathing of type conditions... can't find them in Terrain Type comparison...

Edit: Nevermind... found it... boolean comparison ftw! Thank you once again Maker :eek:
 
Status
Not open for further replies.
Top