theDARKW0LF 
 
 
		
			Member 
			
			
			
 
			
	Posts: 150 
	Threads: 17 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
Opening Door Script not working 
			 
			
				So I'm trying to get a door to open in the face of a player as quick as scripts I've seen and used where the door slams closed. So far I've used codes like the setdoorswinglocked to false, the setdoorswingclosed to false, the setdoordisableautoclose to false, and also the addpropimpulse in the right direct to have the door open (in this case, positive Z). But for some reason, I can't get it to open? I can easily get the scripts where the door closes shut quickly to work, but for some reason I can't get this one to work! 
 
 Help?
			 
			
			
 
Check out my custom stories(1)(2)! 
			
		 |  
	 
 | 
 
	| 10-13-2010, 02:51 AM  | 
	
		
	 | 
 
 
	
		
		Chilton 
 
 
		
			Member 
			
			
			
 
			
	Posts: 138 
	Threads: 9 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				Hmm... Try disabling effects with the door closing thing, other than that this is interesting
			 
			
			
			
		 |  
	 
 | 
 
	| 10-13-2010, 03:01 AM  | 
	
		
	 | 
 
 
	
		
		Entih 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 47 
	Threads: 4 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				Hmm.  Did you say you disabled the disabling of the auto-close?  Wouldn't that mean you enabled automatic door closing?  That might be your issue if that wasn't a mis-type, same double negative got me confused in the early stage of my map. 
 
Otherwise, make sure you are using more than one impulse, as a single impulse is often ineffective.  Multiple using timers is effective.  Refer to the script for the doors in the first map in Amnesia for reference. 
 
Though you have me curious about what the difference is between a physics impulse and physics force.
			 
			
			
			
		 |  
	 
 | 
 
	| 10-13-2010, 06:00 AM  | 
	
		
	 | 
 
 
	
		
		theDARKW0LF 
 
 
		
			Member 
			
			
			
 
			
	Posts: 150 
	Threads: 17 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				Hmm, I'll check, that might be the issue if that wasn't a typo I made.
			 
			
			
 
Check out my custom stories(1)(2)! 
			
		 |  
	 
 | 
 
	| 10-13-2010, 09:52 PM  | 
	
		
	 | 
 
 
	
		
		Pandemoneus 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 328 
	Threads: 2 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
 | 
 
	| 10-13-2010, 10:27 PM  | 
	
		
	 | 
 
 
	
		
		theDARKW0LF 
 
 
		
			Member 
			
			
			
 
			
	Posts: 150 
	Threads: 17 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				Sorry for the relatively late reply, got caught up in college studies. In regards to the previous posters, no I still couldn't get the door to open correctly...  
 
Ok, Pandemoneus, once I have some good amount of free time, I'll check it out, thanks.
			 
			
			
 
Check out my custom stories(1)(2)! 
			
		 |  
	 
 | 
 
	| 10-15-2010, 06:12 AM  | 
	
		
	 | 
 
 
	
		
		Entih 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 47 
	Threads: 4 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				If it doesn't open when it is unlocked, unclosed, and won't auto-close, then it must be something with the force applied to it.  Have you tried 'AddPropForce' rather than 'AddPropImpulse'?  As I said, I have no clue what the difference is, but it may or may not be important.  Otherwise, the value of the force may be too weak, or there are too few forces being used over time.
			 
			
			
			
		 |  
	 
 | 
 
	| 10-15-2010, 06:47 AM  | 
	
		
	 | 
 
 
	
		
		Frontcannon 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 538 
	Threads: 10 
	Joined: Jul 2010
	
 Reputation: 
2
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				 (10-15-2010, 06:47 AM)Entih Wrote:  If it doesn't open when it is unlocked, unclosed, and won't auto-close, then it must be something with the force applied to it.  Have you tried 'AddPropForce' rather than 'AddPropImpulse'?  As I said, I have no clue what the difference is, but it may or may not be important.  Otherwise, the value of the force may be too weak, or there are too few forces being used over time. 
I've asked me that question, too.. AddPropForce doesn't work in my floating tut, though.
			  
			
			
 
 
╔═════════════════╗ 
☺ Smoke weed everyday ☺ 
╚═════════════════╝ 
 
			
		 |  
	 
 | 
 
	| 10-15-2010, 12:29 PM  | 
	
		
	 | 
 
 
	
		
		Entih 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 47 
	Threads: 4 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				Yes, but force is, however, what I had used to open doors in my own map, to complete success, as seen in the following code snippet. 
void MainhallDoorTouch(string &in entity) 
{ 
    AddQuest("mainhall00", "mainhall00"); 
     
    SetSwingDoorLocked("Mainhall_Offdoor_1", false, false); 
    SetSwingDoorClosed("Mainhall_Offdoor_1", false, false); 
    SetSwingDoorDisableAutoClose("Mainhall_Offdoor_1", true); 
     
    AddTimer("SidedoorTimer", RandFloat(5.0f, 10.0f), "MainhallSidedoorOpen"); 
    SetLocalVarInt("Sidedoor_Swinging", 0); 
} 
 
void MainhallSidedoorOpen(string &in asTimer) 
{ 
    if(GetLocalVarInt("Sidedoor_Swinging") == 0) 
    { 
        PlaySoundAtEntity("DoorCreak", "joint_door_move_special.snt", "Mainhall_Offdoor_1", 1.0f / 2.5f, false); 
        StartPlayerLookAt("Mainhall_Offdoor_1", 1.2f, 1.4f, "SidehallLookedat"); 
        AddTimer("LookStop_mhall", 2, "MainhallSidedoorOpen"); 
    } 
     
    if(asTimer == "LookStop_mhall") 
        StopPlayerLookAt(); 
         
    AddLocalVarInt("Sidedoor_Swinging", 1); 
    AddPropForce("Mainhall_Offdoor_1", 0, 0, -75.0f, "World"); 
     
    if(GetLocalVarInt("Sidedoor_Swinging") < 15) 
    { 
        AddTimer("SidedoorTimer", 0.07f, "MainhallSidedoorOpen"); 
    } 
    else 
    { 
        SetSwingDoorDisableAutoClose("Mainhall_Offdoor_1", false); 
        StopSound("DoorCreak", 1.0f); 
    } 
}
  
			 
			
			
			
		 |  
	 
 | 
 
	| 10-15-2010, 05:48 PM  | 
	
		
	 | 
 
 
	
		
		theDARKW0LF 
 
 
		
			Member 
			
			
			
 
			
	Posts: 150 
	Threads: 17 
	Joined: Sep 2010
	
 Reputation: 
0
		
	 | 
	
		
			
RE: Opening Door Script not working 
			 
			
				Again, been too busy to respond, but I got it to work. Apparently 10 is too low of a force and I had to put it all the way up to 45 to get it to open all the way.
			 
			
			
 
Check out my custom stories(1)(2)! 
			
		 |  
	 
 | 
 
	| 10-17-2010, 09:58 PM  | 
	
		
	 | 
 
 
	 
 |