Page 1 of 1

trigger door with rcon

Posted: Wed Sep 28, 2005 3:16 am
by egohavoc
Just a quick question.. for one of my custom maps I have a few triggered doors.. I'd like to open one with rcon. Is this possible?

I have a door,

Classname: trigger_use
target: uks1

Is there something I could do just server-side to make it triggerable through rcon?

Posted: Wed Sep 28, 2005 5:19 am
by ViPER
you want to make it triggerable with rcon or u want to open it with rcon?

if you want it triggerable after an rcon command put the trigger in a while loop and after an if(cvar).

Posted: Wed Sep 28, 2005 5:20 am
by egohavoc
Viper wrote:you want to make it triggerable with rcon or u want to open it with rcon?

if you want it triggerable after an rcon command put the trigger in a while loop and after an if(cvar).
I want it triggerable with rcon.. can you be a little more specific? I'm a n00b at some of this.

*edit*

It's triggered to open with a button.. but I want to be able to open it with rcon, if possible. Is there a command I can put it in or do I have to script that?

Posted: Wed Sep 28, 2005 4:22 pm
by egohavoc
I don't mean to be a pain..

Does anyone get what I'm saying, or must I elaborate further? (not trying to sound mean)

I have a secret door. It's only openable from the inside via a switch on the wall. BUT; I want to open it from the outside, but have no existing button on the outside. So only administrators can open it [with rcon]. It's hard to describe things when you know what you want to other people.. my brain "fills in the blanks" sometimes.. I hope this helps.

Posted: Wed Sep 28, 2005 5:20 pm
by ViPER
you can script your own switch and trigger and link it to your door yes. doesn't seem fair to make it rcon exclusive - its more fun to hide the switch, you could make the trigger be a nearby box or wall corner or desk lamp.

Posted: Wed Sep 28, 2005 5:43 pm
by egohavoc
Yes, I know. I have switches all over the place.. people find them and lock themselves in rooms.. just wondering if there was a way to use rcon to open one of those doors :)

It's an exclusive map for us to toy around in.. I'm just adding a few improvements today and was hoping I could find a way to do this :(

Posted: Thu Sep 29, 2005 9:12 am
by bdbodger
I think you can make a door open with script not sure at the moment how though $door open maybe ? I know you can make a script_origin and then use $SO douse $mydoor and it maybe possible to use that with a trigger also or it maybe as simple as $mytrigger trigger . In the sdk is says

open( Entity other )

Opens the door.

play with that maybe you will get the right syntax

Posted: Thu Sep 29, 2005 3:41 pm
by lizardkid
the quickest way that comes to mind for me is setting a cvar that auto-resets itself, and when the rcon user hit it for it to firethe door.

Code: Select all

watchDoor:

while(1)
{
      if(getcvar(rconDoor) == 1)
      {
            $door open
            wait 5
            $door close
            $door lock
            setcvar rconDoor "0"
       }
 
       wait 1 // long wait time, this is intentional since in MP scripts cause a lot of lag if used improperly
}
make the door open by doing

Code: Select all

rcon rconDoor 1
it switches back automatically.

it's not good for multiple doors to have this, since you have to wait manually and this'll slow down your game a bit, but if it's just one door.

Posted: Thu Sep 29, 2005 3:54 pm
by egohavoc
Wow thanks guys.. appreciate it a ton!