trigger door with rcon

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
egohavoc
Corporal
Posts: 36
Joined: Sun Jun 06, 2004 5:14 am

trigger door with rcon

Post 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?
Image
ego.havoc (embrace|my|hate)
personal site: retetched.com
clan site: easy-clan.com
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post 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).
egohavoc
Corporal
Posts: 36
Joined: Sun Jun 06, 2004 5:14 am

Post 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?
Image
ego.havoc (embrace|my|hate)
personal site: retetched.com
clan site: easy-clan.com
egohavoc
Corporal
Posts: 36
Joined: Sun Jun 06, 2004 5:14 am

Post 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.
Image
ego.havoc (embrace|my|hate)
personal site: retetched.com
clan site: easy-clan.com
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post 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.
egohavoc
Corporal
Posts: 36
Joined: Sun Jun 06, 2004 5:14 am

Post 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 :(
Image
ego.havoc (embrace|my|hate)
personal site: retetched.com
clan site: easy-clan.com
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post 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
Image
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post 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.
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
egohavoc
Corporal
Posts: 36
Joined: Sun Jun 06, 2004 5:14 am

Post by egohavoc »

Wow thanks guys.. appreciate it a ton!
Image
ego.havoc (embrace|my|hate)
personal site: retetched.com
clan site: easy-clan.com
Post Reply