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:
 
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
 
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))
 
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)
 
Leaks can make constant laggs, and even crash your map if enough of them.

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