Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
More then 1 Actor #415873
01/25/13 02:41
01/25/13 02:41
Joined: Jan 2013
Posts: 30
R
Romin Offline OP
Newbie
Romin  Offline OP
Newbie
R

Joined: Jan 2013
Posts: 30
How to use Azarov Dmitry's Pathfinding for more then one actor? Because it only supports 1 actor.
Suppose i want several enemies at same time to use pathfinding?

Re: More then 1 Actor [Re: Romin] #415920
01/25/13 16:30
01/25/13 16:30
Joined: Jan 2013
Posts: 30
R
Romin Offline OP
Newbie
Romin  Offline OP
Newbie
R

Joined: Jan 2013
Posts: 30
After digging all the old and dusty posts i found 1 solution offered by a user named snake67 in 2010. Here is his solution...
Code:
Its so simple. You leave the A* files as they are, just include them. Then add this pices where you need them:

// define this

#define _path_n skill30
#define PATH_POINT_MAX 20 // or what you want

typedef struct
{
var x,y,z;
} POINT;


// insert this in actor action

POINT* path_point=malloc(PATH_POINT_MAX*sizeof(POINT));	// allocate buffer to store path points

// scan path to player and copy it in buffer

if(asFindasPath(my.x, player.x))
{
for(my._path_n=0; asPath.head!=NULL && my._path_n<PATH_POINT_MAX; my._path_n++)
{
vec_set(path_point[my._path_n].x, asPath.head.pos);
asPath.itr=asPath.head;
asRemoveNode(asPath);
}
}



But unfortunately i couldn't understand it.
Does anybody knows how to use it?

Please your answer worths millions for me, i am stuck badly with it.

Re: More then 1 Actor [Re: Romin] #415921
01/25/13 16:46
01/25/13 16:46
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
i think there is all you need in it
just read the comments
path_point contains all your path points


Visit my site: www.masterq32.de
Re: More then 1 Actor [Re: MasterQ32] #415925
01/25/13 17:59
01/25/13 17:59
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
There is a way to make it move without structure and stuff! Just don't be such a lazy ass and make all global stuff local! And stop spamming everything and everyone!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: More then 1 Actor [Re: 3run] #415927
01/25/13 18:18
01/25/13 18:18
Joined: Jan 2013
Posts: 30
R
Romin Offline OP
Newbie
Romin  Offline OP
Newbie
R

Joined: Jan 2013
Posts: 30
Originally Posted By: 3run
There is a way to make it move without structure and stuff! Just don't be such a lazy ass and make all global stuff local! And stop spamming everything and everyone!


I am not very expert in coding. Which global variables i should set to local? Can you provide me your modified code please?

Please someone tell me how to make it work for multiple bots?

Last edited by Romin; 01/25/13 18:23.
Re: More then 1 Actor [Re: Romin] #415928
01/25/13 18:21
01/25/13 18:21
Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
MasterQ32 Offline
Expert
MasterQ32  Offline
Expert

Joined: Nov 2007
Posts: 2,568
Germany, BW, Stuttgart
he just told it.


Visit my site: www.masterq32.de
Re: More then 1 Actor [Re: MasterQ32] #415929
01/25/13 18:41
01/25/13 18:41
Joined: Jan 2013
Posts: 30
R
Romin Offline OP
Newbie
Romin  Offline OP
Newbie
R

Joined: Jan 2013
Posts: 30
Originally Posted By: MasterQ32
he just told it.


In 2 words he just said to "change global stuff to local" whithout considering how hard it is for a newbie to change source of a pathfinding.

I still don't have any clue what to do. A guru help me please.

Re: More then 1 Actor [Re: Romin] #415930
01/25/13 18:46
01/25/13 18:46
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline
Expert
Uhrwerk  Offline
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Originally Posted By: Romin via PM
belive me i am very good at coding in gamestudio

This shouldn't be too much of a problem for someone very good at coding... You just have the wrong attitude towards this.

http://tutorial.3dgamestudio.net/


Always learn from history, to be sure you make the same mistakes again...
Re: More then 1 Actor [Re: Uhrwerk] #415931
01/25/13 18:54
01/25/13 18:54
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Uhrwerk
Originally Posted By: Romin via PM
belive me i am very good at coding in gamestudio
lol, so I'm not the only one getting this kind of messages from him! grin

coding guru Romin, here are the differences between local and global:
Code:
VECTOR temp_vec; // fucking global shit!

// useful function goes here:
function killYouSeft(){
   VECTOR temp_vec; // fucking local shit!
}



Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: More then 1 Actor [Re: 3run] #415932
01/25/13 19:06
01/25/13 19:06
Joined: Jan 2013
Posts: 30
R
Romin Offline OP
Newbie
Romin  Offline OP
Newbie
R

Joined: Jan 2013
Posts: 30
I already converted all the global vars to local but i am getting lots of weired errors. Can someone try their expertise to fix it?

If fixed It will be a very usefull script to contribute to all the people of 3dgs specially newbies laugh

Page 1 of 3 1 2 3

Gamestudio download | chip programmers | 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