bjaffedj 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 39 
	Threads: 8 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
[SOLVED]AddPropForce problem :( 
			 
			
				Hey everyone! i sitting here with an annoying problem :/ 
I have made some birds(modelled, and imported them as staticprops), but whenever i try to make them move continously, they just do'nt seem to be going anywhere :/ i get no errors or nothing, and all the birds are called :/ Help is gladly appreciated   
The code:
 void OnStart(){ 
//Variables 
AddLocalVarInt("MoveBirdsInt", 1); 
 
//Colliders 
AddEntityCollideCallback("bird_1", "StopBirds", "StopMoveBirds", true, 1); 
 
//Timers 
AddTimer("MoveBirdsBuilding", 0, "MoveBirds"); 
} 
 
void MoveBirds(string &in asTimer){ 
    if(GetLocalVarInt("MoveBirdsInt") < 50){ 
        AddPropForce("bird_1", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_2", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_3", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_4", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_5", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_6", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_7", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_8", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_9", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_10", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_11", -5000.0f, 0, 0, "world"); 
        AddPropForce("bird_12", -5000.0f, 0, 0, "world"); 
        AddTimer("MoveBirdsRe", 0.1f, "MoveBirds"); 
    } 
} 
 
void StopMoveBirds(string &in asParent, string &in asChild, int alState){ 
    SetLocalVarInt("MoveBirdsInt", 50); 
}
  
			 
			
			
			
				
(This post was last modified: 05-07-2014, 06:43 PM by bjaffedj.)
 
				
			 
		 |  
	 
 | 
 
	| 05-07-2014, 06:12 PM  | 
	
		
	 | 
 
 
	
		
		DnALANGE 
 
 
		
			Banned 
			
			
			
 
			
	Posts: 1,549 
	Threads: 73 
	Joined: Jan 2012
	
		
	 | 
	
		
			
RE: AddPropForce problem :( 
			 
			
				When you make a new entity for MOVING do this ins tgead of STATICPROP. 
Go to the modeleditor \ Settings \ userDefinedVariables and make it as an grabobject. 
STATIC means NOT MOVE\toutch-able.
			 
			
			
			
				
(This post was last modified: 05-07-2014, 06:22 PM by DnALANGE.)
 
				
			 
		 |  
	 
 | 
 
	| 05-07-2014, 06:19 PM  | 
	
		
	 | 
 
 
	
		
		bjaffedj 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 39 
	Threads: 8 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: AddPropForce problem :( 
			 
			
				Alright, i made it a moveobject, but now my game just crashes :/ 
 
EDIT:  
Alright i made it not crash, however the entities are still not moving
			 
			
			
			
				
(This post was last modified: 05-07-2014, 06:27 PM by bjaffedj.)
 
				
			 
		 |  
	 
 | 
 
	| 05-07-2014, 06:23 PM  | 
	
		
	 | 
 
 
	
		
		DnALANGE 
 
 
		
			Banned 
			
			
			
 
			
	Posts: 1,549 
	Threads: 73 
	Joined: Jan 2012
	
		
	 | 
	
		
			
RE: AddPropForce problem :( 
			 
			
				I think you missed 1 IMPORTEND step. 
Go to the editor again and make a MESH. MESH = SHAPES in the modeleditor - (TAB 6) 
A mesh you have to make as close as possible as the entitie looks ( the bird ) 
And then add\connect the mesh to the bird. 
Connect it is like this : click on the SHAPE -> go to Shape (on the tab on the right side) Then create body. 
Then save again. 
If you dont understand let us know we can explane better. 
I'm having diner now, so sorry for the short explanation. 
--- 
Edit : 
You should make also the BODY. 
What i mean is there are like Body material \Mass \ Angular Damping \ Etc etc... 
What you should do \ check is this for example. 
Open a second MODEL EDITOR and open this : wood_box02.ent 
You can find it in entities \ container. 
Just copy what is there in the WOODEN box into your BIRD. 
Except the BODY MATERIAL, make that ORGANIC, i am not sure what your bird is? wood\stone\organic...
			 
			
			
			
				
(This post was last modified: 05-07-2014, 06:35 PM by DnALANGE.)
 
				
			 
		 |  
	 
 | 
 
	| 05-07-2014, 06:27 PM  | 
	
		
	 | 
 
 
	
		
		bjaffedj 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 39 
	Threads: 8 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: AddPropForce problem :( 
			 
			
				 (05-07-2014, 06:27 PM)DnALANGE Wrote:  I think you missed 1 IMPORTEND step. 
Go to the editor again and make a MESH. 
A mesh you have to make as close as possible as the entitie looks ( the bird ) 
And then add\connect the mesh to the bird. 
Then save again. 
If you dont udnerstand let us know we can explane better. 
So i made a simple box shape, made it into a body, attached the bird mesh to the body mesh, but it still does not work :/
			  
			
			
			
		 |  
	 
 | 
 
	| 05-07-2014, 06:28 PM  | 
	
		
	 | 
 
 
	
		
		DnALANGE 
 
 
		
			Banned 
			
			
			
 
			
	Posts: 1,549 
	Threads: 73 
	Joined: Jan 2012
	
		
	 | 
	
		
			
RE: AddPropForce problem :( 
			 
			
				 (05-07-2014, 06:28 PM)bjaffedj Wrote:   (05-07-2014, 06:27 PM)DnALANGE Wrote:  I think you missed 1 IMPORTEND step. 
Go to the editor again and make a MESH. 
A mesh you have to make as close as possible as the entitie looks ( the bird ) 
And then add\connect the mesh to the bird. 
Then save again. 
If you dont udnerstand let us know we can explane better.  
So i made a simple box shape, made it into a body, attached the bird mesh to the body mesh, but it still does not work :/ Edit : 
 You should make also the BODY. 
 What i mean is there are like Body material \Mass \ Angular Damping \ Etc etc... 
 What you should do \ check is this for example. 
 Open a second MODEL EDITOR and open this : wood_box02.ent 
 You can find it in entities \ container. 
 Just copy what is there in the WOODEN box into your BIRD. 
 Except the BODY MATERIAL, make that ORGANIC, i am not sure what your bird is? wood\stone\organic...
 
 
You should check some ORIGINAL files \ entities from the ORIGINAL game. 
Thats what a lot of us did before. 
Learn from what Frictional Games did.
			  
			
			
			
				
(This post was last modified: 05-07-2014, 06:37 PM by DnALANGE.)
 
				
			 
		 |  
	 
 | 
 
	| 05-07-2014, 06:35 PM  | 
	
		
	 | 
 
 
	
		
		bjaffedj 
 
 
		
			Junior Member 
			
			
			
 
			
	Posts: 39 
	Threads: 8 
	Joined: Aug 2012
	
 Reputation: 
0
		
	 | 
	
		
			
RE: AddPropForce problem :( 
			 
			
				Thanks man!    I works now! Love and credits to you!   
			 
			
			
			
		 |  
	 
 | 
 
	| 05-07-2014, 06:42 PM  | 
	
		
	 | 
 
 
	
		
		DnALANGE 
 
 
		
			Banned 
			
			
			
 
			
	Posts: 1,549 
	Threads: 73 
	Joined: Jan 2012
	
		
	 | 
	
		
			
RE: AddPropForce problem :( 
			 
			
				Your welcome bjaffedj. 
For any other questions, we are here to help. 
Have a nice day. 
- 
Edit : 
When you have anything SOLVED do like this please. 
AddPropForce problem    = SOLVED. 
So we do not have to go into your solved treadh, because it's already fixed be someone   
Thanks!
			  
			
			
			
				
(This post was last modified: 05-07-2014, 06:45 PM by DnALANGE.)
 
				
			 
		 |  
	 
 | 
 
	| 05-07-2014, 06:43 PM  | 
	
		
	 | 
 
 
	
		
		PutraenusAlivius 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 4,713 
	Threads: 75 
	Joined: Dec 2012
	
 Reputation: 
119
		
	 | 
	
		
			
RE: [SOLVED]AddPropForce problem :( 
			 
			
				Since you're using objects that have the same name and other properties, it'll be easier if you wrote "bird_*", rather than writing all the objects individually.
			 
			
			
 
"Veni, vidi, vici." 
"I came, I saw, I conquered." 
			
		 |  
	 
 | 
 
	| 05-08-2014, 01:12 PM  | 
	
		
	 | 
 
 
	 
 |