okay, think you can split the function into two scripts. the bad part will happen on any deactivate, and it won't stop until you replace the bloody skull specifically. So, if they place a rock in the alcove, then pick up the rock, it will set off the bad,and they can't stop it unless they remove the skull and replace it. But if they pick up the skullit will go off until they replace it (quickly!) to make it stop. (Think this is what you are intending). Again, I don't have my LoG to test any of this, so hope it works like my head has it mapped out.
Okay, so 2 functions, separate scripts. Let's go Deactivate script first.
Code: Select all
function death1()
d3: close()
timerb: activate()
hudPrint ("thisisreallythreateningstuff") --<name> expected near '('. WTF?!
end
end
end
May not need all three "end"s anymore, it will tell you if not. just delete one and try it again.
Now the activate script:
Code: Select all
function life()
for i in skullcove:containedItems() do
if i.name == "blood_soaked_skull_1" then
timerb: deactivate()
d3: open()
end
end
end
I added the d3: open(), not sure if you want that. And this script will only execute on "Activate" from the bloody skull.
That should work, however I had a much better idea for you as I was falling asleep last night, but I don't have the code memorized like the alcove puzzles, My idea was this:
THIS IS WRONG, just brainstorming so maybe one of the coding gurus can give u the correct syntax
connect deactivate to a script that generally says:
Code: Select all
function death()
if mouseItem = "blood_soaked_skull_1"
then
d3: close()
spawnerb: activate()
end
end
Idea being that upon deactivate, the script checks the item in your mousehand, and if it's the bloody skull, it will execute. If you can get this script to work, the puzzle would be debugged. If they place and remove a rock, nothing. If they pick up the skull, death script executes. Then connect the activate script above, so they can replace the skull.
Also with this, It is going to number the skull, and you wont know what the number is gonna be, so maybe clone it with a unique name so you know it will always be "_1". Otherwise you will need a "stringFind" function for any item with the string "blood_soaked_skull_" in mouse hand.
. I can't work this one out without the editor to tinker with it.
There is also the possibility that it could take a tenth of a second for the mouse to register the skull, so the script could go off before the game knows the skull is in your hand. If that is the case, connect the deactivate to a timer set to .1, then the timer to the script.
edit: looked at JKos's scripting shortcut page and it
appears like you would need to do a "getMouse"Item" function, with the stringFind. then use that result (i) to check if it's the skull, . I could not do this part without coming here and asking for help also.
I do believe the first two scripts will work for you, without headache. The rock placing/removal idea is just something to be aware of.
Hope this helps!!