Difference between revisions of "ContentDesigner:Creating Movement"
| Line 10: | Line 10: | ||
|{{TextBox | |{{TextBox | ||
|[[LUA:MovementLoopAddLocation|MovementLoopAddLocation()]] Examples | |[[LUA:MovementLoopAddLocation|MovementLoopAddLocation()]] Examples | ||
| − | | function hailed(NPC, Spawn) | + | |<p> |
| + | function hailed(NPC, Spawn) | ||
FaceTarget(NPC, Spawn) | FaceTarget(NPC, Spawn) | ||
end<br><br>function spawn(NPC) | end<br><br>function spawn(NPC) | ||
MovementChoice(NPC) | MovementChoice(NPC) | ||
end | end | ||
| + | </p> | ||
|BackgroundColor=ffffff | |BackgroundColor=ffffff | ||
|FontColor=000000}} | |FontColor=000000}} | ||
Revision as of 13:41, 14 June 2016
ContentDesigner:SpawnScripts - Creating Movement
Return to: ContentDesigner:SpawnScripts | Tutorials | Portal | Forum | Project Manager | Bug Tracker
The Creating Movement guide will show you how to get your NPC's to walk and run around. With many different combinations you can make a specific path for the NPC to follow to walking in circles if you choose.
There are two functions that can be used to make an NPC move. The first one MovementLoopAddLocation() will allow an NPC to move to more than one location like a specific path.
MovementLoopAddLocation() Examples
function hailed(NPC, Spawn)
FaceTarget(NPC, Spawn)
end |
The second one MoveToLocation() will allow the NPC to move to a specific location then stop.