Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
ZorroGPT
by TipmyPip. 02/25/26 12:15
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (TipmyPip, Grant, AndrewAMD, alibaba, Martin_HH), 5,525 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Determining the end of path #229265
09/25/08 23:33
09/25/08 23:33
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
hi all, I have already programmed a working path following code where an entity or an object follows a path. But I have a problem when the object reaches the end of the path it just loops right at the beginning. I want to execute an action let say stop the movement if there is no node found next, which indicates that the object reaches the end of the path. I guess it can be done with an IF-command. I appreciated those people who help me with my previous questions...Thanks for helping. Have a Nice day! smile

Last edited by jpxtreme; 09/25/08 23:51.
Re: Determining the end of path [Re: jpxtreme] #229374
09/26/08 23:10
09/26/08 23:10
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

Since you made the path and you know where the end of path is
may I suggest that you put a value in the skill section of that
node. In your code ...if skill is that value then do...

Hope this helps.
Ottawa smile

Re: Determining the end of path [Re: Ottawa] #229437
09/27/08 14:43
09/27/08 14:43
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
hello,

thanks for responding. I don't have much experience in path programming. I'm learning the basics. I already did what you suggest that I should put a value in the skill section of that node (e.g skill1 = 1.000 of node 20). The problem is the coding part, how can I use the If command to check the skill value of the node.

some functions that I may use.

example.

ent_path("path_name"); //name of path to follow
ent_waypoint(wtarget,1); //wtarget will be first node on the path
ent_nextpoint(wtarget); //assign wtarget the next waypoint position

you may suggest if there is lacking...

The idea is to make an entity follow a patrol path until it reaches node 20 and checks if the skill 1 value of that node is 1.000 then execute an action. Hope it's clear for you.

I couldn't figure out how to use the if command to check the skill1 value of node 20. I hope you can help me with this. Have a nice day!

~JP~

Last edited by jpxtreme; 09/27/08 14:47.
Re: Determining the end of path [Re: jpxtreme] #229652
09/29/08 10:51
09/29/08 10:51
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
anyone who knows this? please kindly reply if it is possible. If you have tutorials or samples then it'll definitely help me to figure this out.

Re: Determining the end of path [Re: jpxtreme] #229743
09/29/08 23:17
09/29/08 23:17
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

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

I looked at my test program (it's been a while) and came up with
a

var _PATH_SKILLS[6]; // used to store the skills of the current path
VECTOR* vNodepos = {x=0;y=0;z=0;}
....
path_getnode(my,node, vNodepos.x,_PATH_SKILLS);// node = 1;
....
if (_PATH_SKILLS[0]is ......) ; // 0 is skill1

something along this line.
Read on path_getnode
someone said last week that their is a demo ...so check the demo section

Hope this helps smile
Ottawa

Re: Determining the end of path [Re: Ottawa] #230406
10/05/08 11:06
10/05/08 11:06
Joined: Aug 2008
Posts: 81
J
jpxtreme Offline OP
Junior Member
jpxtreme  Offline OP
Junior Member
J

Joined: Aug 2008
Posts: 81
thanks for the info mr. Ottawa! it surely helps me a lot. i have an issue regarding the nodes to be followed by the entity, when the entity is moving too fast it cannot catch up to the location of the next node so the result is that the camera just turns around and around.

so my possible solution to this is to stop first the movement of the entity to reposition it to the direction of the next node before its starts moving again to that node. i hope you get my idea.

Please help me. thank you very much!


EDIT.

I made it work! Hurray!

Last edited by jpxtreme; 10/07/08 14:37.

Moderated by  HeelX, rvL_eXile 

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