Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (LoT, vince, VoroneTZ, 1 invisible), 18,151 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
dabolong, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
My path problem :S #304675
01/09/10 20:37
01/09/10 20:37
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
Hi, I have a problem of paths. I move my object on the path. But, when object arrived end of path, starting turn around. I think I tried every ways.

My code:
Code:
action f22_u()
{
	VECTOR temp;
	wait(2);
	c_setminmax(me);

  result = path_scan(me,my.x,my.pan,vector(360,180,1000));
  if (result == 0) { return; }
  var node = 1;
  path_getnode(my,node,my.skill20,NULL);
 
  while (1)
  {
    var angle[3];
    result = vec_to_angle(angle,vec_diff(temp,my.skill20,my.x));
    if (result < 50) {
      node = path_nextnode(my,node,1);
      path_getnode(my,node,my.skill20, NULL);
    }
    my.pan = angle[0];
    my.tilt = angle[1];
    c_move(me,vector(50*time_step,0,0),NULL,GLIDE);
    ent_animate(me, "fly", my.skill10, ANM_CYCLE);
    my.skill10 += 6 * time_step;
    wait(1);
  }
}



Re: My path problem :S [Re: WickWoody] #304733
01/10/10 14:25
01/10/10 14:25
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Do you have to redefine the var angle in the while?


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C
Re: My path problem :S [Re: Ottawa] #304749
01/10/10 17:15
01/10/10 17:15
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
Yes, but for next node.

Code:
result = vec_to_angle(angle,vec_diff(temp,my.skill20,my.x));



Re: My path problem :S [Re: WickWoody] #305061
01/12/10 18:39
01/12/10 18:39
Joined: Oct 2009
Posts: 90
WickWoody Offline OP
Junior Member
WickWoody  Offline OP
Junior Member

Joined: Oct 2009
Posts: 90
Doesn't anyone know?

Re: My path problem :S [Re: WickWoody] #305124
01/12/10 23:53
01/12/10 23:53
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Is your path a circle?

And
What happens if the result is > 50 in
if (result < 50)


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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