xtron 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 402 
	Threads: 37 
	Joined: May 2011
	
 Reputation: 
2
		
	 | 
	
		
			
prop force 
			 
			
				I tried a prop force script but all I get is " ERR: Expected '(' or  ',' " 
here's my code:
 void OnStart() 
{ 
AddEntityCollideCallback("door1_2_3", "door_collide1", "func_door123_collide", true, 1); 
} 
 
void func_door123_collide(string &in asParent, string &in asChild, int alState) 
{ 
void AddPropForce("grunt_ragdoll_1", -100f, 0f, 0f, "world"); 
}
 
thanks (:
			  
			
			
 
 Dubstep <3 
			
		 |  
	 
 | 
 
	| 06-22-2011, 03:56 PM  | 
	
		
	 | 
 
 
	
		
		Khyrpa 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 638 
	Threads: 10 
	Joined: Apr 2011
	
 Reputation: 
24
		
	 | 
	
		
			
RE: prop force 
			 
			
				remove the void  before addpropforce...
			 
			
			
			
		 |  
	 
 | 
 
	| 06-22-2011, 03:59 PM  | 
	
		
	 | 
 
 
	
		
		xtron 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 402 
	Threads: 37 
	Joined: May 2011
	
 Reputation: 
2
		
	 | 
	
		
			
RE: prop force 
			 
			
				oh silly me...  
fail hehe...same error.
			
			
			
 
 Dubstep <3 
			
				
(This post was last modified: 06-22-2011, 04:12 PM by xtron.)
 
				
			 
		 |  
	 
 | 
 
	| 06-22-2011, 04:11 PM  | 
	
		
	 | 
 
 
	
		
		Roenlond 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 331 
	Threads: 3 
	Joined: Apr 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: prop force 
			 
			
				float means that the number has decimals, yet you have none.  
void OnStart() 
{ 
AddEntityCollideCallback("door1_2_3", "door_collide1", "func_door123_collide", true, 1); 
} 
 
void func_door123_collide(string &in asParent, string &in asChild, int alState) 
{ 
void AddPropForce("grunt_ragdoll_1", -100.0f, 0.0f, 0.0f, "world"); 
}
  
			 
			
			
			
		 |  
	 
 | 
 
	| 06-22-2011, 07:39 PM  | 
	
		
	 | 
 
 
	
		
		xtron 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 402 
	Threads: 37 
	Joined: May 2011
	
 Reputation: 
2
		
	 | 
	
		
			
RE: prop force 
			 
			
				Thanks. Now I dont get any stupid errors    but now the prop wont fly towards the player :S. Any suggestions?
			  
			
			
 
 Dubstep <3 
			
		 |  
	 
 | 
 
	| 06-22-2011, 09:38 PM  | 
	
		
	 | 
 
 
	
		
		Rownbear 
 
 
		
			Member 
			
			
			
 
			
	Posts: 157 
	Threads: 13 
	Joined: Apr 2011
	
 Reputation: 
2
		
	 | 
	
		
			
RE: prop force 
			 
			
				AddPropImpulse("Door", X, Y, Z, "World"); //red is x axis, blue is z axis, green is y axis.  
 
tweek the numbers there to get the result you want
			 
			
			
 
			
		 |  
	 
 | 
 
	| 06-23-2011, 03:04 AM  | 
	
		
	 | 
 
 
	
		
		xtron 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 402 
	Threads: 37 
	Joined: May 2011
	
 Reputation: 
2
		
	 | 
	
		
			
RE: prop force 
			 
			
				 
Here's how it looks. I want the grunt to fly towards the door and -100 at X in my script will make him go with force against him but it doesn't work :/
			  
			
			
 
 Dubstep <3 
			
				
(This post was last modified: 06-24-2011, 01:07 PM by xtron.)
 
				
			 
		 |  
	 
 | 
 
	| 06-24-2011, 01:06 PM  | 
	
		
	 | 
 
 
	
		
		Roenlond 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 331 
	Threads: 3 
	Joined: Apr 2011
	
 Reputation: 
0
		
	 | 
	
		
			
RE: prop force 
			 
			
				void OnStart() 
{ 
AddEntityCollideCallback("door1_2_3", "door_collide1", "func_door123_collide", true, 1); 
} 
 
void func_door123_collide(string &in asParent, string &in asChild, int alState) 
{ 
AddPropForce("grunt_ragdoll_1", -100.0f, 0.0f, 0.0f, "world"); 
AddDebugMessage("Grunt should now move", false); 
}
 
With debug messages turned on, does the message display? If it doesn't, the function is never called. If it does but the grunt doesn't move, something is wrong with the propforce command. 
			  
			
			
			
		 |  
	 
 | 
 
	| 06-24-2011, 01:17 PM  | 
	
		
	 | 
 
 
	
		
		Rownbear 
 
 
		
			Member 
			
			
			
 
			
	Posts: 157 
	Threads: 13 
	Joined: Apr 2011
	
 Reputation: 
2
		
	 | 
	
		
			
RE: prop force 
			 
			
				maybe you cant add propimpulse to that entity
			 
			
			
 
			
				
(This post was last modified: 06-24-2011, 01:41 PM by Rownbear.)
 
				
			 
		 |  
	 
 | 
 
	| 06-24-2011, 01:40 PM  | 
	
		
	 | 
 
 
	
		
		xtron 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 402 
	Threads: 37 
	Joined: May 2011
	
 Reputation: 
2
		
	 | 
	
		
			
RE: prop force 
			 
			
				How to check the debug messages? o.O
			 
			
			
 
 Dubstep <3 
			
		 |  
	 
 | 
 
	| 06-24-2011, 02:04 PM  | 
	
		
	 | 
 
 
	 
 |