Re: Spawn movement
Posted: Thu Feb 15, 2018 7:51 pm
Try changing the + and - values maybe. From what I see here you get the npc x location add one then next movement you get the npc location minus one. Then minus one again
http://oldforums.eq2classic.com/
Code: Select all
function spawn(NPC)
local x = GetX(NPC)
local y = GetY(NPC)
local z = GetZ(NPC)
MovementLoopAddLocation(NPC, x + 10 , y, z - 10 , 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x - 10 , y, z - 10 , 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x - 10 , y, z + 10 , 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x + 10 , y, z + 10 , 1, math.random(5, 15))
end
function respawn(NPC)
spawn(NPC)
endCode: Select all
local x = GetX(NPC)
local y = GetY(NPC)
local z = GetZ(NPC)
MovementLoopAddLocation(NPC, x - 2, y, z + 4, 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x + 3, y, z + 1, 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x , y, z - 2, 1, math.random(5, 15))
MovementLoopAddLocation(NPC, x - 5, y, z - 1, 1, math.random(5, 15))So if you place the code from tiny_movement_loop in place of your code it works? Not using the tiny_movement_loop script, but changing your script.Plague wrote: Thu Feb 15, 2018 8:18 pm This works just fine, callously borrowed from generic tiny_movement_loop.