| 
		
	
		| Victor   Member
 
 Posts: 83
 Threads: 19
 Joined: Oct 2011
 Reputation: 
2
 | 
			| Moving a car 
 
				I want to make a car move, like someone is driving it. I already converted a car custom model into an entity, but I wanted to know what is the right script to move it foward. Can someone help me?
			 
				
(This post was last modified: 01-08-2013, 04:23 PM by Victor.)
 |  |  
	| 12-19-2011, 07:30 PM |  |  
	
		| Khyrpa   Senior Member
 
 Posts: 638
 Threads: 10
 Joined: Apr 2011
 Reputation: 
24
 | 
			| RE: Moving a car 
 
				Make the tires actually spinnable and use physics with prop force. Or just make the entity Movable object and use SetMoveObjectState
 
 But yeah I have no idea actually if they work properly, test around.
 
 
				
(This post was last modified: 12-19-2011, 07:57 PM by Khyrpa.)
 |  |  
	| 12-19-2011, 07:44 PM |  |  
	
		| Victor   Member
 
 Posts: 83
 Threads: 19
 Joined: Oct 2011
 Reputation: 
2
 | 
			| RE: Moving a car 
 
				 (12-19-2011, 07:44 PM)Khyrpa Wrote:  Make the tires actually spinnable and use physics with prop force. Or just make the entity Movable object and use SetMoveObjectState
 
 But yeah I have no idea actually if they work properly, test around.
 Haha ok im'na try
 
EDIT: I made 107 desactivated copies of the car so, now i can use the "setentityactive"... 
It's gonna take a while. Starting now from car_1...
			 
				
(This post was last modified: 12-19-2011, 08:12 PM by Victor.)
 |  |  
	| 12-19-2011, 08:00 PM |  |  
	
		| Khyrpa   Senior Member
 
 Posts: 638
 Threads: 10
 Joined: Apr 2011
 Reputation: 
24
 | 
			| RE: Moving a car 
 
				 (12-19-2011, 08:00 PM)Victor Wrote:  EDIT: I made 107 desactivated copies of the car so, now i can use the "setentityactive"...It's gonna take a while. Starting now from car_1...
 Eh what?  
for loop gogo? Or asterix *?
			 
 |  |  
	| 12-19-2011, 08:16 PM |  |  
	
		| Statyk   Schrödinger's Mod
 
 Posts: 4,390
 Threads: 72
 Joined: Sep 2011
 Reputation: 
241
 | 
			| RE: Moving a car 
 
				 (12-19-2011, 08:00 PM)Victor Wrote:  EDIT: I made 107 desactivated copies of the car so, now i can use the "setentityactive"...It's gonna take a while. Starting now from car_1...
 O.o You crazy?? How many polygons does the car have? And is it a static object? did you give it mass? You only need one! and a few recurring "AddPropForce" functions... 
			 |  |  
	| 12-19-2011, 09:44 PM |  |  
	
		| Victor   Member
 
 Posts: 83
 Threads: 19
 Joined: Oct 2011
 Reputation: 
2
 | 
			| RE: Moving a car 
 
				 (12-19-2011, 09:44 PM)Statyk Wrote:   (12-19-2011, 08:00 PM)Victor Wrote:  EDIT: I made 107 desactivated copies of the car so, now i can use the "setentityactive"...O.o You crazy?? How many polygons does the car have? And is it a static object? did you give it mass? You only need one! and a few recurring "AddPropForce" functions...It's gonna take a while. Starting now from car_1...
 I gave up... 'cause it was the car model of white night, but as an entity...
			 
				
(This post was last modified: 12-20-2011, 02:37 PM by Victor.)
 |  |  
	| 12-20-2011, 02:36 PM |  |  
	
		| Tanshaydar   From Beyond
 
 Posts: 3,085
 Threads: 17
 Joined: Mar 2009
 Reputation: 
67
 | 
			| RE: Moving a car 
 
				That car was a static object and I only used it in two places to give the feeling David was just got there. Seems like only a few people noticed it, but it was not meant to be used as an entity since it's a broken car. You'll need a better model for that.
			 
 
				
(This post was last modified: 12-20-2011, 05:51 PM by Tanshaydar.)
 |  |  
	| 12-20-2011, 05:51 PM |  |  
	
		| Acies   Posting Freak
 
 Posts: 1,643
 Threads: 60
 Joined: Feb 2011
 Reputation: 
73
 | 
			| RE: Moving a car 
 
				The main question is;Will the player touch/be in/get driven over by the car?
 
 If not animation will provide the most natural looking movement.
 
  ![[Image: mZiYnxe.png]](http://i.imgur.com/mZiYnxe.png)  ジ
 |  |  
	| 12-20-2011, 06:54 PM |  |  
	
		| Statyk   Schrödinger's Mod
 
 Posts: 4,390
 Threads: 72
 Joined: Sep 2011
 Reputation: 
241
 | 
			| RE: Moving a car 
 
				 (12-20-2011, 06:54 PM)Acies Wrote:  The main question is;Will the player touch/be in/get driven over by the car?
 
 If not animation will provide the most natural looking movement.
 Smart man... That wouldn't be hard AT ALL and just need a distance and perfectly matched "MovePlayerHeadPos" and that could be a very unique trick =] 
			 |  |  
	| 12-20-2011, 10:13 PM |  |  
	
		| Victor   Member
 
 Posts: 83
 Threads: 19
 Joined: Oct 2011
 Reputation: 
2
 | 
			| RE: Moving a car 
 
				I know it's a broken car, but I have like, no modeling skills AT ALL. The only thing I know how to do in 3d modeling softwares is a cube.And I didn't know how to make the car move, since the wheels are not round.
 
				
(This post was last modified: 12-21-2011, 02:38 AM by Victor.)
 |  |  
	| 12-21-2011, 02:37 AM |  |  |