Page 2 of 2
Re: Entity/Item Facing Activating A Script
Posted: Sat Feb 09, 2013 1:10 pm
by Xanathar
Because spawn does not gives an id which begins with the "goromorg_whatever_" but is just a number like 32 or 768 or whatever.
Use the name for the comparison instead of checking how the id starts, which is both more correct and will work

Re: Entity/Item Facing Activating A Script
Posted: Sat Feb 09, 2013 1:46 pm
by Komag
indeed, the ids of spawned things are just weird and unusable. But you can assign ids in your spawn code if you want, to avoid having to cycle through ALL the entities on the level to find them:
Code: Select all
function goromorgMove1()
if steel_lever_1:getLeverState(activated) then
if myStatue1 then myStatue1:destroy() end
if myStatue2 then myStatue2:destroy() end
spawn("goromorg_statue_blockage",10,25,13,0,"myStatue1")
spawn("goromorg_statue_blockage",10,27,13,0,"myStatue2")
playSound("wall_sliding_lock")
end
end
Re: Entity/Item Facing Activating A Script
Posted: Sat Feb 09, 2013 4:26 pm
by Grimfan
That's just the boost I needed Komag. You and Xanathar are fantastic for taking the time to help out new modders like me.
I just feel bad that I cannot return the favor somehow. i just hope I'll be able to bring out my mod before LoG2 comes out.