Custom NPC Boss Exit
Posted: Mon Nov 08, 2021 9:47 pm
I am working on a concept level in which ends with a boss fight with a Big Boo. I am brand new to LunaLua, heck, even new to Lua, but I whipped up the following code to try to summon a "? Ball" NPC when my Big Boo boss dies;
I tried to use the NPC.get function to set variable 'boo' to the amount of big boos exist, which is one, and when that one dies, I have the IF statement summon the ? Ball with NPC.spawn. I am in section 2. Could someone please help me, currently there is no output, no errors and no results.
Code: Select all
boo = 1
function onLoadSection1()
boo = NPC.get(44, 1)
end
function onTick()
while( boo == 1 )
do
boo = NPC.get(44, 1)
if( boo == 0 )
then
NPC.spawn(16, -155232, 160256, 1)
break
else
boo = NPC.get(44, 1)
end
end
end