Making buttons toggle the door open and close

User avatar
Brotherhood Of Nod
Former Server Admin
Posts: 1273
Joined: Fri Aug 20, 2010 8:37 pm
Location: Temple of Prime, outside of Cairo.

Making buttons toggle the door open and close

Post by Brotherhood Of Nod » Sun Oct 24, 2010 11:38 am

First of all before I start, my name is Brotherhood of Nod, and you will not be able to toggle the door open and close with just one button. So here we go... First off, make 2 paintcans by saying !paintcan. Then, make 2 combine buttons (if you want to see the button push in, otherwise if you want, you can get !keypad or whatever is good) Second, name the paintcans the buttons you are going to toggle the door with, I used button1-2. Get a openable door out, and name that door your going to toggle open and close. I used door8. Now, in the console, say ent_fire <button> addoutput "spawnflags 256". Then to make the door toggleable, for it to be toggled open say ent_fire <button> addoutput "onplayeruse <doorname>,setanimation,open" Thats how you toggle it open. Same goes with the closeing button, execpt you replace open with close.

Now to make the combinebutton go in, type this into the console: ent_fire <button1-2> addoutput "OnPlayerUse <Combinebutton>,setanimation,press,0
Image
Spoiler
Show
Image
Oh look...
Spoiler
Show
Image
I made dis.

User avatar
ant_8490
Site Admin
Posts: 4388
Joined: Fri Apr 09, 2010 3:20 pm
Location: United States

Re: Making buttons toggle the door open and close

Post by ant_8490 » Sun Oct 24, 2010 1:23 pm

Just to add to this, u can have 1 !combinebutton open/close doors. You make basically have 2 paintcans on top of each other and make one non-solid. Then when u press the solid one, it makes itself non-solid and turns the 2nd paintcan solid.

!paintcan #1

Code: Select all

ent_fire button1 addoutput "spawnflags 256"
ent_fire button1 addoutput "onplayeruse button1,addoutput,solid 0"
ent_fire button1 addoutput "onplayeruse button2,addoutput,solid 2"
ent_fire button1 addoutput "onplayeruse door,setanimation,open"
ent_fire button1 addoutput "onplayeruse combinebutton,setanimation,press"
!paintcan #2

Code: Select all

ent_fire button2 addoutput "spawnflags 256"
ent_fire button2 addoutput "onplayeruse button2,addoutput,solid 0"
ent_fire button2 addoutput "onplayeruse button1,addoutput,solid 2"
ent_fire button2 addoutput "onplayeruse door,setanimation,close"
ent_fire button1 addoutput "onplayeruse combinebutton,setanimation,press"
[GR]Ant_8490{A}
Area 51 Servers - Owner
Image
Image
Image
Image

MSI GE76 Raider
i9-11980HK 2.6GHz 8-Core Processor
32GB 3200Mhz DDR4 RAM
NVIDIA GeForce RTX 3080 Laptop GPU 16GB
2TB Samsung 980 Pro SSD
Windows 10

User avatar
ßlade
Former Server Admin
Posts: 265
Joined: Fri Aug 06, 2010 2:08 pm

Re: Making buttons toggle the door open and close

Post by ßlade » Sun Oct 24, 2010 3:34 pm

General Granger wrote:First of all before I start, my name is Brotherhood of Nod, and you will not be able to toggle the door open and close with just one button.
First of all before I start, my name is Blade and you are able to toggle the door open and close with just one button :!:

pls dont tell lies :)
"Coming in peace is for simpletons and dullards! I come in AWESOME!" - The Duke

User avatar
Brotherhood Of Nod
Former Server Admin
Posts: 1273
Joined: Fri Aug 20, 2010 8:37 pm
Location: Temple of Prime, outside of Cairo.

Re: Making buttons toggle the door open and close

Post by Brotherhood Of Nod » Mon Oct 25, 2010 7:06 pm

What the hell? Are you telling me I am lying? Boy I ment to put General Anthrax but ya General Granger came first.....but seriously, I am Brotherhood of Nod. So do not tell me I am not Brotherhood of Nod :)
Image
Spoiler
Show
Image
Oh look...
Spoiler
Show
Image
I made dis.

User avatar
ßlade
Former Server Admin
Posts: 265
Joined: Fri Aug 06, 2010 2:08 pm

Re: Making buttons toggle the door open and close

Post by ßlade » Tue Oct 26, 2010 12:58 am

Dude im talking about the stuff you r telling about scripts, not your crazy namechange problem o.O
"Coming in peace is for simpletons and dullards! I come in AWESOME!" - The Duke

Ryan
Former Server Admin
Posts: 1163
Joined: Fri Apr 23, 2010 2:56 am
Location: United Kingdom

Re: Making buttons toggle the door open and close

Post by Ryan » Tue Oct 26, 2010 5:42 pm

last 3 posts. epic fail. period.

User avatar
Brotherhood Of Nod
Former Server Admin
Posts: 1273
Joined: Fri Aug 20, 2010 8:37 pm
Location: Temple of Prime, outside of Cairo.

Re: Making buttons toggle the door open and close

Post by Brotherhood Of Nod » Tue Oct 26, 2010 7:37 pm

First off, HI RYAN, second off, sometimes I think soomeone is talking about other shit, so.....lol epic failure :P :P
Image
Spoiler
Show
Image
Oh look...
Spoiler
Show
Image
I made dis.