|
Re: Tpathfinding ----just another pathfinding plugin
[Re: tzw]
#381836
09/01/11 16:33
09/01/11 16:33
|
Joined: Aug 2005
Posts: 14 Bayreuth, Germany
swerning
Newbie
|
Newbie
Joined: Aug 2005
Posts: 14
Bayreuth, Germany
|
Thanks a lot for this very useful plugin, the demo works like a charm and the system is quite easy to implement (I think :)). Just one question: is it possible to use multiple PathFinder*s at the same time (e.g. to have an enemy chase the player)? I tried to quickly adapt the demo script (cf. http://pixellation.de/demo_enemy.c) by duplicating and modifying the player script using a second Pathfinder* called enemy_finder. However, I get an error saying Script crash in aEnemy: SYS when I try it; the regular player script is still working. Probably I made another mistake but I just wanted to check briefly if it's possible in the first place to use multiple pathfinders. Thanks a lot in advance and have a nice birthday, Stefan
|
|
|
Re: Tpathfinding ----just another pathfinding plugin
[Re: swerning]
#381873
09/01/11 23:58
09/01/11 23:58
|
Joined: Jan 2011
Posts: 122 GUILIN , CHINA
tzw
OP
Member
|
OP
Member
Joined: Jan 2011
Posts: 122
GUILIN , CHINA
|
hello!! well the tpf_NextPos is not the native function in my plugin but a optinal function . it's defined in "tpf_extra.c".
if you look into the function you will see this function shall combine a ENTITY pf_obj->ent.
the tpf_NextPos's Algorithm is that this function use thepf_obj->ent' postion to check if the entity is enough closed to the first node in the path ,if yes then remove the first node. then check if the entity is enough closed the new first node ( the post second node) and so on............
so obviously for use this optional function , you should bind a entiy to the pathfinder first. for example: enemy_finder.ent =me;
hope you think my plugin is a bit useful....
best regards tang ziwen
Full of my eyes are class struggles.....
|
|
|
Re: Tpathfinding ----just another pathfinding plugin
[Re: swerning]
#382024
09/03/11 12:23
09/03/11 12:23
|
Joined: Jan 2011
Posts: 122 GUILIN , CHINA
tzw
OP
Member
|
OP
Member
Joined: Jan 2011
Posts: 122
GUILIN , CHINA
|
thanks, by the way if you download the ver 0.03, it already include a very (maybe very very .....)simple sample for showing how to let some guys chase the player......
Full of my eyes are class struggles.....
|
|
|
Tpathfinding v0.04 out-more flexible & performance
[Re: tzw]
#382096
09/04/11 14:18
09/04/11 14:18
|
Joined: Jan 2011
Posts: 122 GUILIN , CHINA
tzw
OP
Member
|
OP
Member
Joined: Jan 2011
Posts: 122
GUILIN , CHINA
|
now you will get 0.04 version. the new version can let your control the pathfinding more deeply and wisely and speed up your pathfinding noticeable in a large map or huge number of waypoints.(though the pathfinding is already very fast....) http://www.mediafire.com/?3kggr5katp3gmad
Full of my eyes are class struggles.....
|
|
|
Re: Tpathfinding v0.04 out-more flexible & performance
[Re: snake67]
#382526
09/09/11 01:42
09/09/11 01:42
|
Joined: Jan 2011
Posts: 122 GUILIN , CHINA
tzw
OP
Member
|
OP
Member
Joined: Jan 2011
Posts: 122
GUILIN , CHINA
|
thanks for your kind words. after my college' military trainning , i'll make a full manual for the plugin.(the current one is 2 simple )
Full of my eyes are class struggles.....
|
|
|
Re: Tpathfinding v0.04 out-more flexible & performance
[Re: snake67]
#382532
09/09/11 03:06
09/09/11 03:06
|
Joined: Jan 2011
Posts: 122 GUILIN , CHINA
tzw
OP
Member
|
OP
Member
Joined: Jan 2011
Posts: 122
GUILIN , CHINA
|
yes . nope, from the manual , we can see "speed: Slow (especially with USE_BOX) "., so you should place the waypoint wisely(in my next version help document , i'll give you some hints ). emm..............it's a very useful feature. i will add this (or use a sample to show a workaround). but do not ask me when.
Full of my eyes are class struggles.....
|
|
|
|