Forum

> > CS2D > General > Can i make this?
Forums overviewCS2D overviewGeneral overviewLog in to reply

English Can i make this?

9 replies
To the start Previous 1 Next To the start

old Can i make this?

sonnenschein
User Off Offline

Quote
I am making one map, and i want to know, can i make a button that opens one doors(d2) and closes another(d1), but i ran into the problem that when i press that button again, (d1) opens. I want the button just closes (d1) if they are open and never opens (d1).

old Re: Can i make this?

sonnenschein
User Off Offline

Quote
kurtis has written
you would need a seprate button if you want only 1 door to open


I know, but i want this was to make sure players will close the doors, because some players want to ruin the fun, and its funnier this way.

P.S if you need a description of what i am trying to do here it is:

I want to make a field where you plant mines, get back, close the door, press the red button and watch bots explode

Ruining the fun will be:
You left the doors open and put weapons in the field, so bots kill us all

old Re: Can i make this?

Matsu-Kiri
User Off Offline

Quote
im think u want to put an explosion entity and use a button to trigger it, is that what ur trying to do?

old Re: Can i make this?

DC
Admin Off Offline

Quote
the key to this is trigger_once.

• func_dynwall
name: d1

• func_dynwall
name: d2

• trigger_use
trigger: d2,once

• trigger_once
name: once
trigger: d1

result: first buttonpress will open/close d1 and d2. all following times you press the button will only affect d2. this happens because your trigger_once only forwards the "trigger" to d1 one time.

if you want to change the initial state of d1 or d2 (open or closed) you have to use a trigger_start and put d1 and/or d2 in its trigger field.

old Re: Can i make this?

sonnenschein
User Off Offline

Quote
DC has written
result: first buttonpress will open/close d1 and d2. all following times you press the button will only affect d2. this happens because your trigger_once only forwards the "trigger" to d1 one time.


Thanks but that's not it. If the (d1) is closed, when i press the button it will open, but i don't want it to open (d1) if they are closed. I want the button to close them if they are opened, and if they are closed leave them closed.

old Re: Can i make this?

DC
Admin Off Offline

Quote
conditions are not possible.

you should just not allow to open/close the door all the time with another button or you should add an additional door which will be closed then.

old Re: Can i make this?

sonnenschein
User Off Offline

Quote
DC has written
conditions are not possible.

you should just not allow to open/close the door all the time with another button or you should add an additional door which will be closed then.


YAY is it possible to block the doors with an button for a limited time?

old Re: Can i make this?

DC
Admin Off Offline

Quote
I'm not sure if that helps:
you can disable the trigger_use (or the trigger_move or whatever you are using) which opens/closes your door by triggering it. at the same time you have to trigger a trigger_delay which will trigger your door trigger again after a certain time in order to enable it.

old Re: Can i make this?

sonnenschein
User Off Offline

Quote
DC has written
I'm not sure if that helps:
you can disable the trigger_use (or the trigger_move or whatever you are using) which opens/closes your door by triggering it. at the same time you have to trigger a trigger_delay which will trigger your door trigger again after a certain time in order to enable it.


Thanks i like this one
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview