Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 10/24/26 01:54
Tradestation missing in table of contents
by AndrewAMD. 10/23/26 14:35
No connection to MT4
by JeyKey II. 10/22/26 15:33
Zorro tutorial ideas?
by mistery. 10/21/26 05:28
Avoid "log\ - delete old files" message
by Martin_HH. 10/20/26 07:23
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 6,823 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
JimSimons, julienp, julienper, KelleyAbbey, Yopachi
19246 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ent_path-a6 version:-how to make model choose and follow path #244865
01/07/09 10:17
01/07/09 10:17
Joined: Jan 2009
Posts: 11
A
adity_programmer Offline OP
warez victim
adity_programmer  Offline OP
warez victim
A

Joined: Jan 2009
Posts: 11
hi
please help me .
can any one give a small bit of code in a6 to make an object choose and follow a path. given the path name.
i have a working code which uses a5 engine scripts but im trying to write it in a6 and im unable to find the equivalent instructions which achieve the same.
the a5 code
Code:
 
ACTION choose_follow_path
{ 
MY.PASSABLE = ON; 
// find path 
RESULT = ent_path("path_004"); 
if(RESULT == 0) 
{ 
beep; // path not found 
REMOVE(ME); 
return; 
} 
ent_waypoint(MY._TARGET_X,1); // store first waypoint 
while(1) 
{ 
// follow path 
vec_set(MY._SPEED, MY._TARGET_X); 
vec_sub(MY._SPEED, MY.X); // MY._SPEED = MY._TARGET - MY.X 
RESULT = vec_to_angle(my_angle,MY._SPEED); 
str_for_num(disp.string,RESULT);
disp.visible=on;
// near target? Then find next waypoint 
if (RESULT <  0.9 ) 
{ 
ent_nextpoint(MY._TARGET_X); 
} 
// turn and run towards target 
force = 0.50; 
actor_turnto(my_angle.pan); 
force = 3; 
// move to point 
vec_normalize(MY._SPEED, (2 * TIME)); 
move(ME, nullskill, MY._SPEED); 
wait(1); 
} 


any help in this regard is very much appreciated.
thanks

Last edited by adity_programmer; 01/07/09 10:18.
Re: ent_path-a6 version:-how to make model choose and follow path [Re: adity_programmer] #244906
01/07/09 13:22
01/07/09 13:22
Joined: Jan 2009
Posts: 11
A
adity_programmer Offline OP
warez victim
adity_programmer  Offline OP
warez victim
A

Joined: Jan 2009
Posts: 11
im just trying to write a simple C script code. on an empty script .
cant seem to get the look at and the movement right while trying to change the code.

if any one has any simple C script code to attach and follow a path please do post it.


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