• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

dialog tp

Status
Not open for further replies.
Level 3
Joined
Nov 3, 2014
Messages
23
e dialog teleport im working on it looks easy just not moving my unit loll


Unit - A unit enters Region 000 <gen>
Unit - A unit enters Region 000 <gen>
Dialog - Change the title of Dialog to Do you wanna Telepo...
Dialog - Create a dialog button for Dialog labelled Home
Set SetDialogbutton4 = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled LVL 10
Set SetDialogbutton1 = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled LVL 30
Set Setdialogbutton2 = (Last created dialog Button)
Dialog - Create a dialog button for Dialog labelled LVL 50
Set SetDailogbutton3 = (Last created dialog Button)
Dialog - Show Dialog for Player 1 (Red)
Dialog - Show Dialog for Player 2 (Blue)
Trigger 2

Dialog - A dialog button is clicked for Dialog
(Clicked dialog button) Equal to SetDialogbutton1
Unit - Move (Triggering unit) instantly to (Center of lvl 10 <gen>)
Game - Display to (All players) the text: Player has Teleport...
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
Unit - Move (Triggering unit) instantly to (Center of lvl 10 <gen>)
"Triggering Unit" is evaluating to null since there is none in the context of the event. What unit are you trying to move? You need to instruct the game just like you would tell me.

For example if it is the currently selected units, make sure that at least 1 is selected and then move them all with a loop. If it is a certain player's hero then look it up from the unit array you use to map players to heroes. If it is units in a certain region then iteratively move all the units owned by "Triggering Player" in that region to the other region.

Be aware that the part "(Center of lvl 10 <gen>)" leaks a location. You, might want to fix that using the RemoveLocation native. Details how to do this are availably readily on this site with a considerable number of threads and tutorials covering leaks.
 
Status
Not open for further replies.
Top