| Nevicar   Junior Member
 
 Posts: 37
 Threads: 4
 Joined: Mar 2012
 Reputation: 
0
 | 
			| Door Question 
 
				This is the situation:
 
 I have a key that I pick up, and a door behind me. I want to code it to find out if the door is closed, to open it, and if it's open, to close it. I'm not sure if this would be an actual "if" statement, but the way I'm looking at it it would sound like one.
 
 I'm just having trouble combining the functions to make one, or having one call the other.
 
 Thanks!
 
				
(This post was last modified: 03-08-2012, 05:44 AM by Nevicar.)
 |  | 
	| 03-07-2012, 11:00 PM |  | 
	
		| Strembitsky   Senior Member
 
 Posts: 254
 Threads: 37
 Joined: Feb 2012
 Reputation: 
3
 | 
			| RE: Door Question 
 
				If the door is in state 1, set state 0. If it's in state 0, set to state 1. Have a timer to check these statements.
 If you don't know how to make an if statement, use the wiki and study.
 
 The Nightmares v1.0  - Dreadful Fires WIP |  | 
	| 03-08-2012, 02:03 AM |  | 
	
		| Nevicar   Junior Member
 
 Posts: 37
 Threads: 4
 Joined: Mar 2012
 Reputation: 
0
 | 
			| RE: Door Question 
 
				Excellent, thanks! Will post results.
			 |  | 
	| 03-08-2012, 02:34 AM |  | 
	
		| Nevicar   Junior Member
 
 Posts: 37
 Threads: 4
 Joined: Mar 2012
 Reputation: 
0
 | 
			| RE: Door Question 
 
				Disregard this, I apparently can't delete posts. :I
			 
				
(This post was last modified: 03-08-2012, 03:49 AM by Nevicar.)
 |  | 
	| 03-08-2012, 03:43 AM |  | 
	
		| Strembitsky   Senior Member
 
 Posts: 254
 Threads: 37
 Joined: Feb 2012
 Reputation: 
3
 | 
			| RE: Door Question 
 
				You don't have a timer to check it. You need a timer to check if it's open/closed every, lets say, .5 seconds.
			 
 The Nightmares v1.0  - Dreadful Fires WIP |  | 
	| 03-08-2012, 03:47 AM |  | 
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: Door Question 
 
				A timer is not required if they're depending on player-area collision. Also, AddPropForce is required to open the door further than what SetSwingDoorClosed can.
			 
 |  | 
	| 03-08-2012, 03:49 AM |  | 
	
		| Nevicar   Junior Member
 
 Posts: 37
 Threads: 4
 Joined: Mar 2012
 Reputation: 
0
 | 
			| RE: Door Question 
 
				Decided to go a different path with how the door is going to interact. Marking this as solved, thanks for the help you two.
			 |  | 
	| 03-08-2012, 05:44 AM |  |