Page 1 of 1
[Solved] Deleting pressure plates
Posted: Mon Oct 01, 2012 5:25 pm
by SpacialKatana
I know I had this issue, and others may have done, with deleting pressure plates.
If you use try to delete the plate as you stand on it by connecting it to a script_entitiy with the following code, the game will crash:-
Code: Select all
function delete()
-- other stuff you want to occur here.
pressure_plate_hidden_1:destroy()
end
To overcome this problem, connect the plate to a timer with a 0.1 second delay, and then connect the timer to the script to delete it. Also add a connector to the timer to 'deactivate' itself.
Job's a goodun

Re: [Solved] Deleting pressure plates
Posted: Mon Oct 01, 2012 5:31 pm
by petri
Why do you need to destroy a pressure plate? To make a plate activate once you can set the activate once property...
Re: [Solved] Deleting pressure plates
Posted: Mon Oct 01, 2012 5:35 pm
by SpacialKatana
I had the plate activating a script to grant xp when a condtion was met, but it was where the party could pass numerous times Petri. I had to have it activate multiple times. Thought it would help folks anyway

Re: [Solved] Deleting pressure plates
Posted: Mon Oct 01, 2012 5:40 pm
by Grimwold
SpacialKatana wrote:I had the plate activating a script to grant xp when a condtion was met, but it was where the party could pass numerous times Petri. I had to have it activate multiple times. Thought it would help folks anyway

before we were able to delete things I was changing the "activated by party" setting of a plate on the fly. I did this where I wanted a plate to start a puzzle and if the player messed up, the same plate would re-start the puzzle, but once the puzzle was done I wanted to disable the initial plate.
e.g.
Code: Select all
puzzle_start_plate:setTriggeredByParty(false)
Re: [Solved] Deleting pressure plates
Posted: Mon Oct 01, 2012 5:46 pm
by SpacialKatana
Cheers Grim, but I have C# burnt into my brain from years of editing NWN's 1+2....I can't really get my head around all the lua commands and functions for this game overnight lmao
