Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Dico), 16,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to move a model from A to B and then teleport him to a #390253
12/25/11 07:43
12/25/11 07:43
Joined: May 2010
Posts: 23
M
Mandeville Offline OP
Newbie
Mandeville  Offline OP
Newbie
M

Joined: May 2010
Posts: 23
The whole post is in the subject. I want a car to go down the street. When the car is at the end of the street, I want him to be teleport at the start point. I tried so many crazy things, please help me!

Re: How to move a model from A to B and then teleport him to a [Re: Mandeville] #390258
12/25/11 11:11
12/25/11 11:11
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
move the car with c_move if it just moves straight along the street.

For Teleport. Ask if the car passes a given coordinate and then set his X/Y/Z back to the start position


Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: How to move a model from A to B and then teleport him to a [Re: Mandeville] #390285
12/25/11 20:57
12/25/11 20:57
Joined: May 2010
Posts: 23
M
Mandeville Offline OP
Newbie
Mandeville  Offline OP
Newbie
M

Joined: May 2010
Posts: 23




There is my action for the car;







Code:
action car()
{	
my.emask |= ENABLE_IMPACT;   

	ENTITY* enemy = NULL; // spell target
	my.STATE = 1;
	VECTOR vFeet;
	vec_for_min(vFeet,me); // vFeet.z = distance from player origin to lowest vertex
	VECTOR move_me;
	while(1)
	{



	

	
			VECTOR target_node_pos;
			
			var temp;
			var target_node_num = 1;//start at node 1

			path_set(me,"path_000");
			path_nextnode(my,1,1);
			path_getnode(me,1,target_node_pos.x,NULL);
		

			 into target_node_pos		
		
			
		
		
		
			
			move_me.x = 0.25;
			c_trace(my.x,vector(my.x,my.y,my.z-1000),IGNORE_ME | IGNORE_PASSENTS);
			my.z = hit.z - vFeet.z; // always place player's feet on the ground
			c_move(me,vector(move_me.x,0,0),NULL, GLIDE);
	
					

	
			wait(1);	



		


	}
	 	
}



Now how should I insert this line when the car have finish his path?



Code:
ent_remove(me);
				ent_create("car1.mdl",vector(-260,165,-620),me);



Re: How to move a model from A to B and then teleport him to a [Re: Mandeville] #390295
12/26/11 10:20
12/26/11 10:20
Joined: Jun 2011
Posts: 133
N
nomis23uk Offline
Member
nomis23uk  Offline
Member
N

Joined: Jun 2011
Posts: 133
Im confused youve made two threads about the same subject one saying its ok youve fixed it and one still asking for help.

Your not helping us by creating two threads. is it solved or do you still want help?


A8 Pro
Windows 7 64bit
QuadCore i7, 6 gb ram, ATI 5970
Re: How to move a model from A to B and then teleport him to a [Re: nomis23uk] #390309
12/26/11 20:05
12/26/11 20:05
Joined: May 2010
Posts: 23
M
Mandeville Offline OP
Newbie
Mandeville  Offline OP
Newbie
M

Joined: May 2010
Posts: 23
After struggeling for 1 week (im a non-programmer), i finally find the answer. Because I got no tips the first time for a basic code line, i post a new topic hoping to be answer this time. Im sorry if I pollute your forum .


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1