Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (mciwjd545, 1 invisible), 774 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
problem with c_trace #111532
02/09/07 23:25
02/09/07 23:25
Joined: May 2005
Posts: 155
C:\Program files\GStudio6
alphaindigo Offline OP
Member
alphaindigo  Offline OP
Member

Joined: May 2005
Posts: 155
C:\Program files\GStudio6
im having problems with c_trace right now.. my game worked perfectly untill i updated to a6.5, now the c_trace no longer works... the target vec is not updated and im not sure if it is actualy tracing at all...anyone had a similar problem?

i am using two vec_for_screen instructions and then tracing between them, for an RTS game. i dont know weather its the c_trace or the vec_for_screen thats the problem...help?


beware the sock! - tLempoary...
Re: problem with c_trace [Re: alphaindigo] #111533
02/09/07 23:35
02/09/07 23:35
Joined: Apr 2005
Posts: 3,076
Germany, NRW
rvL_eXile Offline

3D Artist
rvL_eXile  Offline

3D Artist

Joined: Apr 2005
Posts: 3,076
Germany, NRW
Which Error shows you ure GS ??
I Making a RTS too, i have Version 6.50.6 an c_trace and vec_for_screen
works finde for me... Post the Code here..

Here one Code Snippet

Code:

vec_for_screen(trace_start,camera);
trace_end.x=mouse_pos.x;
trace_end.y=mouse_pos.y;
trace_end.z = 100000;
vec_for_screen(trace_end,camera);


c_trace(camera.x,trace_end,null);



cYa Sebastian


Tutorials:
[Blender]Terrain creation ENG/GER
[Blender]Low Poly Tree Modeling
[GIMP]Create a Texture for Terrains
CLICK HERE


Re: problem with c_trace [Re: rvL_eXile] #111534
02/10/07 14:19
02/10/07 14:19
Joined: May 2005
Posts: 155
C:\Program files\GStudio6
alphaindigo Offline OP
Member
alphaindigo  Offline OP
Member

Joined: May 2005
Posts: 155
C:\Program files\GStudio6
Code:

ooh_.X = MOUSE_POS.X;
ooh_.Y = MOUSE_POS.Y;
ooh_.Z = 999999999;
vec_set( temp, ooh_);
vec_for_screen (ooh_,CAMERA);
temp.z = 0;
vec_for_screen (temp,CAMERA);
c_trace(temp,ooh_,ignore_Sprites|ignore_me);//|ignore_push|ignore_content
unit_targx[my.unit-1] = target.x;
unit_targy[my.unit-1] = target.y;



but the target of the unit is not being updated... and i dont know why...



EDIT: i'v been messing around with the code a bit and this seems to work injstead:
Code:
 ooh_.X = MOUSE_POS.X;
ooh_.Y = MOUSE_POS.Y;
ooh_.Z = 10000;
vec_set( temp_vec, ooh_);
vec_for_screen (ooh_,CAMERA);
temp_vec.z = 0;
vec_for_screen (temp_vec,CAMERA);
c_trace(temp_vec,ooh_,ignore_Sprites|ignore_me);//|ignore_push|ignore_content

unit_targx[my.unit-1] = target.x;
unit_targy[my.unit-1] = target.y;

i defined a new vairiable called temp_var[3]; and then used that instead of tem, i dont understand, temp doesnt seem to be a vector anymore...

Last edited by alphaindigo; 02/10/07 15:00.

beware the sock! - tLempoary...

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