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
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 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
some problem with c_trace() and using "my" as a parameter #264428
05/06/09 08:52
05/06/09 08:52
Joined: May 2009
Posts: 7
D
deoleung Offline OP
Newbie
deoleung  Offline OP
Newbie
D

Joined: May 2009
Posts: 7
I'm a beginner of 3dgs a7.
while I using it, there seems to be some problem I can't solve.
1)//i wrote this function which has a parameter "ENTITY*"
function rotate_entity(ENTITY* entity, rotate_angle, rotate_speed)
{
if(entity.pan == rotate_angle)
{
return;
}
result = ang(rotate_angle - entity.pan);
if ( result>0)
{
entity.pan += rotate_speed*time_step;
}
if ( result<0)
{
entity.pan -= rotate_speed*time_step;
}
if(ang(rotate_angle - entity.pan)>0 && result<0)
{
entity.pan = rotate_angle;
}
if( ang(rotate_angle - entity.pan)<0 && result>0)
{
entity.pan = rotate_angle;
}
}
//and i would call the function like this
rotate_entity(me, temp.x, 20);

//the result is when the game calls it, the game just simply crash without any tips.

2)
trace_mode = ignore_me+ignore_passable+use_box;
result = trace(vector(my.x, my.y, my.z-my.z_offset), vector(my.x, my.y, my.z-4000));
//the code above works well,but when i change it into follow
result = c_trace(vector(my.x, my.y, my.z-my.z_offset), vector(my.x, my.y, my.z-4000),ignore_me|ignore_passable|use_box);
//the movement of my model seems to be shaking,just being wrong.
//ps: i use the code to control the z coordinate.

would anybody give me some help. thanks a lot.

Re: some problem with c_trace() and using "my" as a parameter [Re: deoleung] #264429
05/06/09 08:53
05/06/09 08:53
Joined: May 2009
Posts: 7
D
deoleung Offline OP
Newbie
deoleung  Offline OP
Newbie
D

Joined: May 2009
Posts: 7
forget to tell that I use version A7.06

Re: some problem with c_trace() and using "my" as a parameter [Re: deoleung] #264434
05/06/09 09:20
05/06/09 09:20
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
Quote:
trace_mode = ignore_me+ignore_passable+use_box;

it's c-script, and which language you're using Lite-C or C-script?


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)
Re: some problem with c_trace() and using "my" as a parameter [Re: Jaxas] #264435
05/06/09 09:30
05/06/09 09:30
Joined: Jul 2008
Posts: 553
Singapore
delinkx Offline
User
delinkx  Offline
User

Joined: Jul 2008
Posts: 553
Singapore
since u r a beginner i advice u to use Lite-C. thats the way to further ..


A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook
Re: some problem with c_trace() and using "my" as a parameter [Re: delinkx] #264525
05/06/09 16:05
05/06/09 16:05
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
... and update to the newest version.

Re: some problem with c_trace() and using "my" as a parameter [Re: Jaxas] #264581
05/07/09 00:17
05/07/09 00:17
Joined: May 2009
Posts: 7
D
deoleung Offline OP
Newbie
deoleung  Offline OP
Newbie
D

Joined: May 2009
Posts: 7
I'm using lite-c and I found that "c_trace" can't work properly in my code, thus I had to replace it with the c-script to make my code work~~

Last edited by deoleung; 05/07/09 00:44.
Re: some problem with c_trace() and using "my" as a parameter [Re: Widi] #264582
05/07/09 00:45
05/07/09 00:45
Joined: May 2009
Posts: 7
D
deoleung Offline OP
Newbie
deoleung  Offline OP
Newbie
D

Joined: May 2009
Posts: 7
Originally Posted By: Widi
... and update to the newest version.


It may be a good idea~~I will try to update it later,hope it will be ok, thanks.

Re: some problem with c_trace() and using "my" as a parameter [Re: deoleung] #264724
05/07/09 19:50
05/07/09 19:50
Joined: May 2008
Posts: 331
Lithuania, Vilnius
Jaxas Offline
Senior Member
Jaxas  Offline
Senior Member

Joined: May 2008
Posts: 331
Lithuania, Vilnius
Originally Posted By: deoleung
I'm using lite-c and I found that "c_trace" can't work properly in my code
why confused


The smaller the bug, the harder it is to kill.
_________________________________________
Forklift DEMO (3dgs)

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