[Solved] Deleting pressure plates

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

[Solved] Deleting pressure plates

Post 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 :D ;)
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: [Solved] Deleting pressure plates

Post by petri »

Why do you need to destroy a pressure plate? To make a plate activate once you can set the activate once property...
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: [Solved] Deleting pressure plates

Post 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 ;)
User avatar
Grimwold
Posts: 511
Joined: Thu Sep 13, 2012 11:45 pm
Location: A Dungeon somewhere in the UK

Re: [Solved] Deleting pressure plates

Post 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)
SpacialKatana
Posts: 163
Joined: Fri Sep 14, 2012 6:20 pm

Re: [Solved] Deleting pressure plates

Post 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 :lol:
Post Reply