Page 1 of 1

Re-enable SelfDisabling Pressureplates.

Posted: Mon Mar 16, 2015 8:49 pm
by Emera Nova
So what I'm wanting to do is when the party steps on a pressure plate it will then disable itself so that you have to move on and use the others around the room as well. Then once they are all pressed you can go to the center of the room step on a seperate plate and have all of them reset so that they can repeat their functions.

I'm wanting to use it for a boss fight where you try to damage the boss with firepits that are triggered by the self disabling pressureplates. To prevent the player from just spamming the same plate I want to be able to shut it off and then later turn it back on.

ideas for the script?

Re: Re-enable SelfDisabling Pressureplates.

Posted: Mon Mar 16, 2015 9:03 pm
by Azel
Sure thing.

For a test, start by going to your map and laying down 3 Castle Pressure Plates. Name them castle_pressure_plate_1, castle_pressure_plate_2, and castle_pressure_plate_3.

Plate_3 will be used to re-enable all the plates. Plates 1 and 2 will disable themselves after a single Activation.

Step 1) Add a Script Object, and Paste the following code in it:

Code: Select all

function DisablePlate(plate)

	plate:disable();

end

function EnableAllPlates()

	castle_pressure_plate_1.floortrigger:enable();
	castle_pressure_plate_2.floortrigger:enable();
	-- etc

end
Step 2) Add a Connector to castle_pressure_plate_1, and connect it to the Script Method named, DisablePlate(plate)

Step 3) Repeat that for castle_pressure_plate_2

Step 4) Add a Connector to castle_pressure_plate_3, but this time connect it to the Script Method named, EnableAllPlates()

Step 5) Run the game and test it out. This should do exactly what you need. Now simply update it to match your own dungeon and pressure plate names.

:mrgreen: