Alright, I need help quick. Thank go I made this so I don't need to start ANOTHER 'help with alcove scripting' thread.
I made the following code so that when the party removes a skull(my custom blood soaked variety) from an alcove in the room the door shuts a spawner starts and a threatening message plays. I will be using the exact code except for the message, as well as giving all the points of error.
Code: Select all
function death()
for i in skullcove:containedItems() do
if i.name == "blood_soaked_skull" then
spawnerb:deactivate() --yes the name is spawnerb. I know deactivate isn't listed as a command, strangely the editor had no qualms
break --I have tried with and without break. no error here.
else
d3:close() and --unexpected symbol near 'and'. Which symbol?
spawnerb:activate() and --unexpected symbol near and.
hudPrint("thisisreallythreateningstuff") --<name> expected near '('. WTF?!
end
end
end
That may have had typos. If you know of an better way to do that I would love it. I could do the same thing on removal of the skull differently
but that way would leave it so anything could replace it. Thanks in advance.(And probably after)