Two easy ways:
1. Unit --> Move unit.
2. Unit --> Issue order.
function
local location loc=<any point> // loc is a point where to your unit will move.
call IssuePointOrderLocBJ( <unit>, "move", loc ) // here you order your unit to move to that point.
call RemoveLocation( loc ) // In the last 2 lines you need to remove location and to null variable to prevent memory leak.
set loc=null
endfunction
Try this one:
- -------- Set variable needed to clean up leaks --------
- Set TempPoint = (YourPoint)
- -------- Choose between next 2 functions --------
- Unit - Move (YourUnit) instantly to TempPoint
- Unit - Order (YourUnit) to Move To TempPoint
- -------- --------
- Custom script: call RemoveLocation(udg_TempPoint)
Here is example map for your trigger.
Lol bodom you dont need a variable for a simple command like that..
Rather simple..
- Events
- (your event)
- Conditions
- (your condition)
- Actions
- Unit - Issue (your unit) to move to (where you want him to move)
- or
- Unit - Move (your unit) instantly to (where you want him to be)
dm251, currently you seem to have little to no understanding on how triggers work, even in GUI form.
I would strongly recommend learning basic triggers by looking at GUI spells, open source maps and fidgiting around randomly with triggers just to understand how they work. It can be hard to get started but you will soon learn. The reason I recomend doing this is so that you run into fewer problems and understand them better. This will all in all result in a higher quality of map/spell being produced as you will not be as shy to use triggers.
Remeber that if you use a location (called point in GUI) that you have to remove it after it is created or it will result in a memory leak. A memory leak is when data gets left in RAM when it is no longer needed and could be removed. Memory leaks usually result in the map overall becomming more recource intensive to run and actions to take more time to execute.