Mod [Complete] The Rise of Simon
Re: Mod [WIP] The Rise of Simon
I make many puzzles similar to this, and even the shops in HH2 use it, but same problem with taking the item back. What I've ended up doing is using an altar instead of alcove.
then u can set up an invis, deactivated teleporter for items only on the altar square.
Make a timer set to .1s to activate the teleporter (add "timer_12: activate()" to the script)
and u could just use the spawner timer to deactivate the tele shortly after so subsequent items placed wont teleport away.
If the correct item is placed, it "disappears" in a tenth of a second. If not, nothing happens.
otherwise u could make a second timer set to .3 to deactivate it.
You could also make a second script for it with the altar set for deactivate to make whatever you wanted to happen. But if they so much as picked up a torch from it, the script would execute.
Pretty sure the hudPrint error was a result of it getting confused with the "and".
EDIT: Just realized you are trying to action on the deactivate, instead of activate. Think you can simply change the connector to the script to deactivate, but the entity/item check on the alcove will not work as the object leaves the alcove. Meaning that a player could set a rock on the alcove, then remove the skull without penalty. (Unless alcoves have the "always activate" feature, then any item removal will execute the script, regardless of what's contained, or how many.) Sorry if this seems vague, my LoG is down and I can't reference anything
then u can set up an invis, deactivated teleporter for items only on the altar square.
Make a timer set to .1s to activate the teleporter (add "timer_12: activate()" to the script)
and u could just use the spawner timer to deactivate the tele shortly after so subsequent items placed wont teleport away.
If the correct item is placed, it "disappears" in a tenth of a second. If not, nothing happens.
otherwise u could make a second timer set to .3 to deactivate it.
You could also make a second script for it with the altar set for deactivate to make whatever you wanted to happen. But if they so much as picked up a torch from it, the script would execute.
Pretty sure the hudPrint error was a result of it getting confused with the "and".
EDIT: Just realized you are trying to action on the deactivate, instead of activate. Think you can simply change the connector to the script to deactivate, but the entity/item check on the alcove will not work as the object leaves the alcove. Meaning that a player could set a rock on the alcove, then remove the skull without penalty. (Unless alcoves have the "always activate" feature, then any item removal will execute the script, regardless of what's contained, or how many.) Sorry if this seems vague, my LoG is down and I can't reference anything
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: Mod [WIP] The Rise of Simon
Alcoves do have activate always. I would be willing to set it so any removal will set it off, people don't have much reason to be adding and removing other stuff anyways. However, I would like this to be right so any help is still very much welcome.
Edit: okay full details for any help. The code is typed as it appears in msyblade's post and is accepted. The alcove is preloaded with a blood_soaked_skull and has a connector to the script, event is any and action is death(the function name). The timer likewise is connected to the script, but also has a connector to the spawner. Absolutely nothing happens when the skull is removed, or added and removed again. Even IF activate always is set.
Edit: okay full details for any help. The code is typed as it appears in msyblade's post and is accepted. The alcove is preloaded with a blood_soaked_skull and has a connector to the script, event is any and action is death(the function name). The timer likewise is connected to the script, but also has a connector to the spawner. Absolutely nothing happens when the skull is removed, or added and removed again. Even IF activate always is set.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
Re: Mod [WIP] The Rise of Simon
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.
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:
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:
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!!
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
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
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
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!!
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: Mod [WIP] The Rise of Simon
You don't need to check what's on the mouse, just check to see if the alcove has the skull still or not - do a search for skull, if it's not found then return false. Here's an example from the original game:
the line could also be "== false" or it could read:
Code: Select all
function tombEastSniff(entity, item)
for i in entity:containedItems() do
if i.name == item then
return true
end
end
end
function tombEastCheck()
if tombEastSniff(tombEastAlcove, "ornate_key") ~= true then -- this means item was not found
-- do whatever you want, such as spring traps, etc
print("key taken")
end
end
Code: Select all
if not tombEastSniff(tombEastAlcove, "ornate_key") then
Finished Dungeons - complete mods to play
Re: Mod [WIP] The Rise of Simon
Took awhile to get back. I would very much like to thank both of you. Msyblade, your code worked but unfortunately the message just immediatly reprinted endlessly. Komag, your code even has the eccentricity of hudprinting the message every time the timer goes off, but that's ok really. Actually if I had to even msyblades would have worked the message could have been very frightening looped with a little rewrite. Well if no one knows a solution off the top of their heads I'd say this is done. Thanks again.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
Re: Mod [WIP] The Rise of Simon
Alright (I say that and however a lot don't I?), next challange and a nice one for horrer.
I need to be able to place an indestructable model of a monster and make it disappear on cue.
To explain better: Presently to deliver 3 messenges I have set up 3 hidden pressure plates in a hallway set to hudPrint. Farther down that hallway is the monsters model. Right now I have coded the monster as a "Decoration" because that cannot be attacked(Don't worry, it will disappear before it is ever reached). I need a way to have that model vanish when the third plate is pressed. Or whatever means can be used to deliver the messages. Blockage can easily be scripted to destroy, but it can be attacked. However, I don't know how to handle this. So, can any scripters help?
I need to be able to place an indestructable model of a monster and make it disappear on cue.
To explain better: Presently to deliver 3 messenges I have set up 3 hidden pressure plates in a hallway set to hudPrint. Farther down that hallway is the monsters model. Right now I have coded the monster as a "Decoration" because that cannot be attacked(Don't worry, it will disappear before it is ever reached). I need a way to have that model vanish when the third plate is pressed. Or whatever means can be used to deliver the messages. Blockage can easily be scripted to destroy, but it can be attacked. However, I don't know how to handle this. So, can any scripters help?
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
Re: Mod [WIP] The Rise of Simon
Maybe you can clone the baddie with a gajillion hitpoints, and set up an empty "monster closet" and have an invisible teleporter activate to send the baddie there when you're ready?
I've used this, I had one of neikuns Arcane Ogres teleport in front of the party while I freeze em, he says a couple of taunting things, then teleports out,
and the party gets control back. Is this close to what you're looking for?
I've used this, I had one of neikuns Arcane Ogres teleport in front of the party while I freeze em, he says a couple of taunting things, then teleports out,
and the party gets control back. Is this close to what you're looking for?
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: Mod [WIP] The Rise of Simon
That is usable msyblade, I even thought of that with the monster model as blockage. However setting it as a monster will do as long as it can stay still. One important thing though is the players aproach it then it disapears. (think a ghost). Anyway thanks I''ll go with this, if somebody has the patience to blow it up then I guess I have to deal with that. Fireballs hitting it does crimp the ghostly thing so if you do think of a solution I'd be interested to here it still.
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250
Re: Mod [WIP] The Rise of Simon
Hmmm, 4 blockers or walls around him should keep him totally still, facing the party. but the fireball thing hmm.
run a destroy() script on the pad that u want it to disappear at, using your original Decoration idea. Think it's as simple as
Then maybe you can get both desired effects
run a destroy() script on the pad that u want it to disappear at, using your original Decoration idea. Think it's as simple as
Code: Select all
function destroyghost()
mean_ghost_1: destroy() --or whatever it is named
end
Currently conspiring with many modders on the "Legends of the Northern Realms"project.
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
"You have been captured by a psychopathic diety who needs a new plaything to torture."
Hotel Hades
Re: Mod [WIP] The Rise of Simon
Okay it worked thanks!
I am the God of darkness and corruption.
viewtopic.php?f=14&t=4250
viewtopic.php?f=14&t=4250