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

Respawn

Status
Not open for further replies.
Level 5
Joined
Jun 10, 2010
Messages
145
Hello again hive!!!
So i am working on a map who need a unit respawn in randown region, i made it.
But the unit respawn on the deep water and don't move.
Plz i need help
Thanks
 
Well, I think may be a bit much work but here's a way:
1) Create a region in the deep water (or more regions if needed).
2) Create trigger: (1 Even and 1 Action)
  • Unit - A unit enters DeepWater <gen>
  • If ((Unit-type of (Triggering unit)) Equal to Footman) then do (Unit - Move (Triggering unit) instantly to (Random point in (Playable map area))) else do (If ((Unit-type of (Triggering unit)) Equal to Knight) then do (Unit - Move (Triggering unit) instantly to (Random point in (Playable map area))) else do (Do nothing))
3) Do that with every land unit that can't walk on water then leave the end as '(Do nothing)'.

I think this should work.
 
But the deep water in my map is not a square to put a region see:
 

Attachments

  • Hive.png
    Hive.png
    1.6 MB · Views: 170
try something like this:

Set TempPoint = random point in playable map area
If terrain-type is pathable for ground units = false,
- then run this trigger
- skip remaining actions
Move unit instantly to TempPoint

Sorry I don't have my editor with me...but what this would do is check to see if the random point is pathable to a ground unit and if not it will grab another point until it does. Then move the unit there.
 
You could create multiple regions, and have it pick from one randomly (the regions would all be out of the deep water) and then pick a random point in the region.

Also that leeks
 
Dont listen to them... They seem not to have much knowledge in triggering. Here ill give you the code =D

  • Trigger
    • Events
    • Conditions
    • Actions
      • Set Location = (Random point in Region)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Terrain pathing at Location of type Walkability is off) Equal to False
        • Then - Actions
          • -------- // You'r Actions Below =) --------
        • Else - Actions
This should work but i'm not 100% sure. I dont have much time to test it but you could give it a try =D
 
Status
Not open for further replies.
Back
Top