The Daily Click ::. Forums ::. Klik Coding Help ::. Pathfinder Trouble
 

Post Reply  Post Oekaki 
 

Posted By Message

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
18th May, 2005 at 02:42:44 -

A level editor was surprisingly easy to build. Even nicer, it allows me to easily build the pathfinder map as a level loads - 'blocking' items just tag it's matching X/Y on the Pathfinder map as an obstacle. It works great, i've already tested that out. (Saving the map to BMP and examining it)

My problem is making enemies FOLLOW the path now. I'm having a ton of problems with this. Firstly, I have a PLAYER object and several clones of the ATTACK DOG Object. On the level load, a 'SPREAD A NUMBER : 1' runs on the dogs to assign each one a unique (and smaller than the fixed number) ID. This is the first weird glitch - Dog 1 ends up as ID 2. Dog 2 is 4, and Dog 3 is 6. Also, a count of the number of dogs on the level returns 6. I can't figure out where it put the other 3 though. Its like it tried to load the level twice or something. O.o

Anyway, it shouldn't be causing the hunter to go all fubar anyway. Just means 3 of the dogs either don't move (off map) or also hunt. But the hunter doesn't work either - Map size is right, map data is right. It's the active object itself. One of the dogs will track, but the rest won't. Can anyone give me an example - or even just explain - how to make an Enemy Active Object track down a Player Active Object in a way that lets me have multiple copies of that enemy, too? Please?

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

Destroyer (CrobaSoft)



Registered
  10/10/2004
Points
  1106
18th May, 2005 at 04:18:28 -

http://n.1asphost.com/destroyer84/pathginf.cca

 
Visit www.crobasoft.com or you're a Noob.

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
18th May, 2005 at 11:57:22 -

That's an interesting example, except it doesn't have anything to do with the Pathfinding object. In a complex area, those guys still get terribly confused and generally pretty stuck.

How did you even get that to work? I see... one event in there, and it's just a simple collison check.

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell

Destroyer (CrobaSoft)



Registered
  10/10/2004
Points
  1106
18th May, 2005 at 12:33:59 -

I cant see where you said you used the pathfinding object, well anyway here is an example made by Andos
http://www.arrildprivatskole.dk/andosmedia/examples/Multiple_Duplicate_Pathfind.zip

In my example, open the pathfinding group to see the code.


Image Edited by the Author.

 
Visit www.crobasoft.com or you're a Noob.

Brian Haase (FSP)



Registered
  22/01/2005
Points
  691
18th May, 2005 at 14:32:06 -

I feel really stupid now. Thanks though. And your right, I didn't mention the Pathfinder Object, I really shouldn't write posts in the early morning hours.

That tutorial is excellant, thank you very much.

 
Current Projects:
Bomb Squad (Total Progress - 3%)
:: Current Task Progress: 40%
:: Current Task - Level Editor Shell
   

Post Reply



 



Advertisement

Worth A Click