New to scripting, need a bit of help.
New to scripting, need a bit of help.
[strike]The connector on the counter doesn't appear to want to attach to more than one door.
I was thinking attaching the connector to a pressure plate and the pressure plate to the doors.[/strike]
Figured that bit out.
I want to use a counter to open four secret doors simultaneously when the party walks over it three times.
I need to know how to make the counter activate something at a specific count.
Thanks in advance.
I was thinking attaching the connector to a pressure plate and the pressure plate to the doors.[/strike]
Figured that bit out.
I want to use a counter to open four secret doors simultaneously when the party walks over it three times.
I need to know how to make the counter activate something at a specific count.
Thanks in advance.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: New to scripting, need a bit of help.
Another thing I need to learn is how to use lua script to make a secret door need two different buttons pushed in order to be opened.
EDIT: Apparently this doesn't work as I hoped.
EDIT: Apparently this doesn't work as I hoped.
Code: Select all
if wall_button_2 and wall_button_1: push() then dungeon_secret_door_8:open()
end
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: New to scripting, need a bit of help.
You could do something like this:
link the connector for the first button to button01 and the second to button02, the door should open then.
(didn't testet it but it should work)
Code: Select all
openDoor = false
function button01()
openDoor = true
end
function button02()
if openDoor == true then
secretDoor:open()
end
end(didn't testet it but it should work)
Re: New to scripting, need a bit of help.
The easiest way I have found is not to use codeNeikun wrote:Another thing I need to learn is how to use lua script to make a secret door need two different buttons pushed in order to be opened.
EDIT: Apparently this doesn't work as I hoped.Code: Select all
if wall_button_2 and wall_button_1: push() then dungeon_secret_door_8:open() end
Create 2 buttons and 1 counter and a door
set buttons to activate once
set the counter to initial value of 2
add connector from counter to door
add connectors to the counter and set to decrement
Done
Edit: I missed the pushed in order bit when reading it - in which case you do need code as magus pointed out
Re: New to scripting, need a bit of help.
Use a counter that decrements and then links to the doors - give it an initial value of 3Neikun wrote:[strike]The connector on the counter doesn't appear to want to attach to more than one door.
I was thinking attaching the connector to a pressure plate and the pressure plate to the doors.[/strike]
Figured that bit out.
I want to use a counter to open four secret doors simultaneously when the party walks over it three times.
I need to know how to make the counter activate something at a specific count.
Thanks in advance.
link the pad to the counter and set the connector to decrement it
Re: New to scripting, need a bit of help.
Oh it doesn't matter which order their pushed in, just that they both get pushed.
I'mma try it out.
The counter doesn't appear to activate anything when I walk over it.
I'mma try it out.
The counter doesn't appear to activate anything when I walk over it.
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: New to scripting, need a bit of help.
The pad must have a connector to the counter and it action set to decrement - then when the counter gets to 0, it will perform the action of its connector to the door which in this case is openNeikun wrote:Oh it doesn't matter which order their pushed in, just that they both get pushed.
I'mma try it out.
The counter doesn't appear to activate anything when I walk over it.
Re: New to scripting, need a bit of help.
I don't understand what I'm doing wrong with counters.
I have the initial value set to 2. Both buttons are connected to it with activate once.
The counter is linked to itself with decrement, and then linked to the door to open.
Why doesn't the counter activate the door after both buttons have been pressed?
I have the initial value set to 2. Both buttons are connected to it with activate once.
The counter is linked to itself with decrement, and then linked to the door to open.
Why doesn't the counter activate the door after both buttons have been pressed?
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!