Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
6 registered members (EternallyCurious, AndrewAMD, ricky_k, 7th_zorro, 2 invisible), 478 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
C-Trace #464658
03/04/17 10:34
03/04/17 10:34
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline OP

Expert
Realspawn  Offline OP

Expert

Joined: Jul 2001
Posts: 4,801
netherlands
I am experimenting with c_trace. All the examples i find are those where c_trace is activate and used by a weapon.

How would it work if i want to have my player a continues c_trace above him that sticks with the player ?

many thankx for the help laugh


Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain
Re: C-Trace [Re: Realspawn] #464659
03/04/17 11:10
03/04/17 11:10
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
just put the c_trace on the player's action main loop and use offsets from player.x for your trace vectors


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: C-Trace [Re: painkiller] #464660
03/04/17 11:20
03/04/17 11:20
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline OP

Expert
Realspawn  Offline OP

Expert

Joined: Jul 2001
Posts: 4,801
netherlands
Could you provide an example in the weapons it uses from weapon point to an enemy. I need more from my x to my.z + 50

thx anyway for your reaction laugh


Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain
Re: C-Trace [Re: Realspawn] #464663
03/04/17 12:39
03/04/17 12:39
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
something like this:

Code:
action player_action()
{
	...
	
	VECTOR from_vec,to_vec;
	var trace_dist;
	
	...
	
	
	while(me)
	{
		
		...
		
		//Set the from vector
		vec_set(from_vec,my.x);
		
		//Set the to vector
		vec_set(to_vec,vector(0,0,50)); //trace to my.z+50
		vec_rotate(to_vec,my.pan);
		vec_add(to_vec,my.x);
		
		//Trace
		trace_dist=c_trace(from_vec,to_vec,IGNORE_ME);
		
		if(trace_dist>0) //Something was hit
		{
			...
		}
		
		...
		
		wait(1);
	}
	
	...
	
}



3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: C-Trace [Re: painkiller] #464664
03/04/17 13:51
03/04/17 13:51
Joined: Jul 2001
Posts: 4,801
netherlands
Realspawn Offline OP

Expert
Realspawn  Offline OP

Expert

Joined: Jul 2001
Posts: 4,801
netherlands
ahhhh i see. I will give it a try thx for pointing me in the right direction here laugh

Works perfect laugh thank you.

Last edited by Realspawn; 03/04/17 13:58.

Find all my tutorials & Workshops at : www.rp-interactive.nl

Creativity starts in the brain
Re: C-Trace [Re: Realspawn] #464674
03/04/17 19:02
03/04/17 19:02
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
you're welcome wink


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | 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