You are viewing an old version of this page. Return to the latest version.
Version of 10:54, 27 September 2009 by Bolly
Difference between revisions of "LUA:MovementLoopAddLocation"
m (pathing update) |
m (cosmetic) |
||
| Line 8: | Line 8: | ||
function spawn(NPC) | function spawn(NPC) | ||
| + | |||
--Syntax is NPC, x, y, z, speed, delay (in seconds) | --Syntax is NPC, x, y, z, speed, delay (in seconds) | ||
| + | |||
MovementLoopAddLocation(NPC, -233.71, -1.32,-78.60,1,0) | MovementLoopAddLocation(NPC, -233.71, -1.32,-78.60,1,0) | ||
| + | |||
MovementLoopAddLocation(NPC, -199.22, -1.30,-65.10,1,0) | MovementLoopAddLocation(NPC, -199.22, -1.30,-65.10,1,0) | ||
| + | |||
end | end | ||
Revision as of 10:56, 27 September 2009
About
The MovementLoopAddLocation LUA function can be used to assign a circular grid for npc pathing.
Adding this several times into an init function of an npc will allow the npc to start walking from spawning and continue to do so until killed or another defined condition.
Examples
function spawn(NPC)
--Syntax is NPC, x, y, z, speed, delay (in seconds)
MovementLoopAddLocation(NPC, -233.71, -1.32,-78.60,1,0)
MovementLoopAddLocation(NPC, -199.22, -1.30,-65.10,1,0)
end