Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, juanex, Grant), 1,018 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: C_scan radius [Re: MrGuest] #351288
12/23/10 11:42
12/23/10 11:42
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
Nice, thanks laugh

Re: C_scan radius [Re: PadMalcom] #351320
12/23/10 16:55
12/23/10 16:55
Joined: Jul 2010
Posts: 129
B
bk9iq Offline
Member
bk9iq  Offline
Member
B

Joined: Jul 2010
Posts: 129
is there something similar to that code but for "c_trace"???

Re: C_scan radius [Re: bk9iq] #351323
12/23/10 17:23
12/23/10 17:23
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
yep, a lot easier too,

I've added a similar function I use too to display the exact points from and to and added it to the previous code

Code:
#include <acknex.h>
#include <default.c>

VECTOR vec_temp;

void debug_draw_cone(ENTITY* ent, COLOR* colour, var size, int ang){
	
	int i = 0;
	draw_line3d(vector(ent.x, ent.y, ent.z + ent.min_z + 4), NULL, 100);
	for(i = 0; i < ang; i++){
		vec_temp.x = ent.x + (sin(i - (ang/2) - ent.pan + 90) * size);
		vec_temp.y = ent.y + (cos(i - (ang/2) - ent.pan + 90) * size);
		vec_temp.z = ent.z + ent.min_z + 4;
		draw_line3d(vec_temp, colour, 100);
		i++;
	}
	draw_line3d(vector(ent.x, ent.y, ent.z + ent.min_z + 4), colour, 100);
}

void debug_draw_cross(VECTOR* vecPos, COLOR* colour, var len){
	
	draw_line3d(vector(vecPos.x + len, vecPos.y + len, vecPos.z + len), NULL, 100);
	draw_line3d(vector(vecPos.x - len, vecPos.y - len, vecPos.z - len), colour, 100);
	
	draw_line3d(vector(vecPos.x - len, vecPos.y - len, vecPos.z + len), NULL, 100);
	draw_line3d(vector(vecPos.x + len, vecPos.y + len, vecPos.z - len), colour, 100);
	
	draw_line3d(vector(vecPos.x + len, vecPos.y - len, vecPos.z + len), NULL, 100);
	draw_line3d(vector(vecPos.x - len, vecPos.y + len, vecPos.z - len), colour, 100);
	
	draw_line3d(vector(vecPos.x - len, vecPos.y + len, vecPos.z + len), NULL, 100);
	draw_line3d(vector(vecPos.x + len, vecPos.y - len, vecPos.z - len), colour, 100);
}

void debug_draw_scan(VECTOR* vecFrom, VECTOR* vecTo, COLOR* colour){
	
	debug_draw_cross(vecFrom, colour, 5);
	draw_line3d(vecFrom, colour, 100);
	draw_line3d(vecTo, colour, 100);
	debug_draw_cross(vecTo, colour, 5);
}

action act_cube(){
	
	VECTOR vecFrom;
	VECTOR vecTo;
	while(me){
		
		//c_scan ... blah
		vec_set(vecFrom,my.x);
		vec_set(vecTo,my.x);
		vecFrom.z += 100;
		vecTo.z -= 100;
		
		
		debug_draw_scan(vecFrom, vecTo, COLOR_RED);
//		debug_draw_cone(me, COLOR_GREEN, 100, 180);
		my.pan += time_step;
		wait(1);
	}
	
}

void main(){
	
	wait(1);
	level_load(NULL);
	vec_set(camera.x, vector(-40, -25, 120));
	camera.tilt = -25;
	
	ent_create(CUBE_MDL, vector(200, 0, 0), act_cube);
}

Enjoy

Re: C_scan radius [Re: MrGuest] #351325
12/23/10 17:27
12/23/10 17:27
Joined: Jul 2010
Posts: 129
B
bk9iq Offline
Member
bk9iq  Offline
Member
B

Joined: Jul 2010
Posts: 129
Woooow !!!
That's Great....
Thank u Very Much....

Re: C_scan radius [Re: bk9iq] #356016
01/30/11 13:54
01/30/11 13:54
Joined: May 2006
Posts: 148
Latvia
MTD Offline
Member
MTD  Offline
Member

Joined: May 2006
Posts: 148
Latvia
Thanks for this Great debug cone drawer. laugh


Last edited by MTD; 01/30/11 14:38.
Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

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