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

Move DummY!!

Status
Not open for further replies.
Level 9
Joined
Apr 3, 2008
Messages
700
1.
It's just an action like
  • Unit - Move (Triggering unit) instantly to (Center of (Playable map area))
You need polar offset to move it to right direction (with a correct facing angle).

2.
JASS:
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
 
Level 5
Joined
Mar 24, 2008
Messages
98
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)

Hmm.. about the variable., How about showing the example. I dont get,. :sad:
 
Level 5
Joined
Mar 24, 2008
Messages
98
Lol bodom you dont need a variable for a simple command like that..

  • 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)
Rather simple..

Hmm... But the one that he created is easy to understand.. :grin: ,
So I guess im with em.. ehehe.. :thumbs_up:
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
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.
 
Level 5
Joined
Mar 24, 2008
Messages
98
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.

ah... hehe, ok.. I get it.. ^^ ,. thanks also.. :smile:
 
Status
Not open for further replies.
Top