Pathfinding on multiple stories

Posted By: middleagechinese

Pathfinding on multiple stories - 01/11/17 14:14

I was playing around with ways to implement pathfinding.

Try 1
First I tryed those path entities (those from WED) and found on the Manuel how to use it via lite-c.
Basically:
If A cannot trace B, then move to nearest preset path (made in WED).
I noticed a problem, it seems to only go in one direction... tired

Try 2

So now I'm guessing I need to have some sort of nods (models) I place in my level.
Meaning if A cannot trace B, the fastest connection between the nearest visible node that can be seen by B, the nearest visible node that can be seen by A, and all nodes in between (creating an obstacle free path).

Problems:
- I am not sure how the syntax would look like to do the proper node calculation and setting the temp ids for the individual AI to folow the correct nodes accordantly.

- Even if the above works flawless, as soon the there is a height difference (target is in a different room on a different story), this can't work anymore.
Maybe some sort of invisible Block that globals registers in which room each character is?
Meaning:
If Character A is room 1 and character B room 4, then follow premade path (those paths from WED) to the correct room, then resume default pathfinding routine?

Thanks in advance tongue
Posted By: 3run

Re: Pathfinding on multiple stories - 01/11/17 14:19

Hey!

I could advice you to take a look at Superku's pathfinding, to understand how it works (or maybe he will see this thread, and will reply). You can find his pathfinding here:
Tip of the Week #10: New Pathfinding Solution!

Best regards!
Posted By: middleagechinese

Re: Pathfinding on multiple stories - 01/11/17 15:06

ohhh........

There is already one we can use grin


Thanks, will play around with it ^^
Posted By: Superku

Re: Pathfinding on multiple stories - 01/16/17 16:41

Yes, it's pretty much exactly what you were trying to do/ were working on.
Posted By: middleagechinese

Re: Pathfinding on multiple stories - 01/18/17 17:26

OK it works; multi level(floors) pathfinding.

Sorry, I didn't create any fancy scripts or anything for this.
I simply added invisible walls, which are also passable around and in between all cliffs and high places tongue
Posted By: middleagechinese

Re: Pathfinding on multiple stories - 01/18/17 17:45

So that means cover would work as follows:

Set several "cover-places" in the level.
A cover point traces the nearest entities of both parties, party A and party B.
If an cover-place cannot trace any entity of party B, but can trace an entity of party A, then the cover-place turn into an potential cover-place for the specific entity of party A (the nearest one) in relation to the nearest unseen entity of party B , vise versa.

Now an entity (if it now wants to move to the nearest cover-place) depending on it's party, will move to the nearest potential cover-place.

process looped.


Is that correct?
If yes, I will try to create that and share what ever I throw together.
It will probably be ugly and silently scream "kill me!...", but it should work wink
© 2024 lite-C Forums