Dino Torch Direction
Posted: Fri Sep 13, 2024 4:06 am
Code: Select all
local FLAME_DIRECTION = 0 -- 0 will make it shoot sideways, change this to 1 to only make it shoot up
function onTick()
for _, v in NPC.iterate(382) do
v.ai3 = FLAME_DIRECTION
end
end
Code: Select all
{
"flameDirection": 0
}
Code: Select all
function onTick()
for _, v in NPC.iterate(382) do
if(v.data._settings and v.data._settings.flameDirection) then
v.ai3 = v.data._settings.flameDirection
end
end
end
anywhere you want. unless the lua file already has an onTick method defined, in which case you'd simply take the code that's in the onTick i provided (for example):
Code: Select all
for _, v in NPC.iterate(382) do
v.ai3 = FLAME_DIRECTION
end