- Joined
- Nov 5, 2011
- Messages
- 93
how to make a command that move you to other place.. .

please help me!!


please help me!!
Last edited:
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.


type

Events


Player - Player 1 (Red) types a chat message containing -arena as An exact match

Conditions

Actions


Set Temp_loc = (Center of Rect 000 <gen>)


Unit - Move My_Hero instantly to Temp_loc


Custom script: call RemoveLocation(udg_Temp_loc)
Something like this?
Where Temp_loc is a point variable
type
Events
Player - Player 1 (Red) types a chat message containing -arena as An exact match
Conditions
Actions
Set Temp_loc = (Center of Rect 000 <gen>)
Unit - Move My_Hero instantly to Temp_loc
Custom script: call RemoveLocation(udg_Temp_loc)
My_Hero is a unit variable (set in another trigger to contain the hero of the player)
and where call RemoveLocation(udg_Temp_loc)
Removes the location leak inside your memory.
Untitled Trigger 001

Events

Conditions

Actions
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing -arena as An exact match

Conditions

Actions
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing -arena as An exact match

Conditions

Actions


Set Temp_loc = (Center your_region <gen>)
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing -arena as An exact match

Conditions

Actions


Set Temp_loc = (Center of Rect 000 <gen>)


Unit - Move your_unit instantly to Temp_loc
Untitled Trigger 001

Events


Player - Player 1 (Red) types a chat message containing -arena as An exact match

Conditions

Actions


Set Temp_loc = (Center of Rect 000 <gen>)


Unit - Move your_unit instantly to Temp_loc


Custom script: call RemoveLocation(udg_Temp_loc)
First you create a region where you want your units to move to.
To do this go inside the editor to:
Layer -> Regions
This will pop up a toolbox that allows you to create regions on your map.
Now you can use the regions you've created within the trigger editor.
First you create a few variables inside your variable editor which can be done inside the trigger editor (F9).
In order to create variables, click on the yellow X or control + B.
This will pop up a window.
Click on the green +X, this will create a new variable for you.
You specify the type and name and click on OK.
Now you should have made a new variable.
Press Ok to close the variable editor again.
For the variables that we are going to use you need to set it's type to unit and point.
Now to create a trigger you simply right click a folder inside your trigger editor and click on New Trigger. Now you will see a untitled trigger like this:
Right click anywhere inside the window on any text and click on New Event. Scroll down to Player - Chat Message and change the options to your needs by clicking on them.
Untitled Trigger 001
Events
Conditions
Actions
Now your trigger should look like this:
Right click again and create a New Action.
Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing -arena as An exact match
Conditions
Actions
Scroll down to Set - Variable, now select your temporary location variable and specify it by selecting the region we've created earlyer. (Center of your_region <gen>). Now your trigger will look like this:
Now create another action and scroll all the way down to: Unit - Move Unit (Instantly). Now click on Triggering unit and specify the variable we've created for our unit. Now simply make sure that it is moving instantly to the Temp_loc variable.
Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing -arena as An exact match
Conditions
Actions
Set Temp_loc = (Center your_region <gen>)
Your trigger should look like this:
Now to make sure that we destroy the location we have just used inside our memory so that it won't build up in memory when not being used anymore (Removing a leak) we create another action under Custom Script.
Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing -arena as An exact match
Conditions
Actions
Set Temp_loc = (Center of Rect 000 <gen>)
Unit - Move your_unit instantly to Temp_loc
Here you type in the following:
call RemoveLocation(udg_Temp_loc)
Now your trigger is finished and should look like this:
Make sure that you set the variable your_unit in another trigger so that it points to the hero of player 1.
Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing -arena as An exact match
Conditions
Actions
Set Temp_loc = (Center of Rect 000 <gen>)
Unit - Move your_unit instantly to Temp_loc
Custom script: call RemoveLocation(udg_Temp_loc)
I hope this explains enough...

