Gamestudio Links
Zorro Links
Newest Posts
Zorro strategy fails to run
by Lapsa. 12/06/26 17:32
ZorroGPT
by mistery. 12/05/26 12:48
contractUpdate() is filtering if >2 rows
by mistery. 12/04/26 19:03
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Lapsa, Quad), 2,483 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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