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

hero selection tavern

Status
Not open for further replies.
Level 3
Joined
Jun 27, 2008
Messages
28
im making a map where you have to choose your hero.

i need someone to tell me how to:
when someone buys a hero from the tavern the hero gets teleported to a specific spot on the map. thanks :grin:
 

Rui

Rui

Level 41
Joined
Jan 7, 2005
Messages
7,550
Is the "certain spot" a random location, or is it a specific point? If it is a specific point, create a Region and create a Point variable. Set that variable to the central point of the region.
Then it's easy, use
  • Unit - Move (Unit) instantly to YourPointVariable
 
Level 7
Joined
Jun 16, 2008
Messages
327
If the location where you want your unit teleported is a random point on the map or in a region, try:

  • Unit - Move (Unit) instantly to (Random point in (Playable map area))
The above was for a random point in the map.
The same works for a random point in a region, just change the "Playable map area" to the name of your desired region.

For example:
  • Unit - Move (Unit) instantly to (Random point in (Region 001))
 
Level 3
Joined
Jul 14, 2004
Messages
38
Leaks...
Set up a point variable and do it like this:
  • Set temppoint1 = Random point in *region*
  • Unit - Move (Trained unit) instantly to temppoint1
  • Custom script - call RemoveLocation(udg_temppoint1)
I love fixing leaks for people :D

Sorry to sound newbie, but what is a leak and how will they effect your map? I didnt know triggers could have leaks. (whatever they are)
 
Level 17
Joined
May 6, 2008
Messages
1,598
Leaks can make constant laggs, and even crash your map if enough of them.

Memory leaks that is.
 
Status
Not open for further replies.
Top