Page 1 of 1

[Done for V0.39] Making monsters follow a pre-defined path

Posted: Tue Apr 25, 2006 11:26 am
by copperman
Not directly associated with attack/sense abilities but something that appears to be needed in some way.

A FLOORITEM_PATH could be handy.
Give each a number 0 to last one. 0 is the starting point adn would require to be triggered to initiate the path sequence.
Give each tile a direction to tell the pathed monster which way to face from this tile to the next in the sequence. Overriding normal forward facing walking.
Give each tile a time, the time it takes to arrive at the next tile. (either have a wait or use multiple tiles in one space)

Path Item 0 would require a monster (pref cloned) which would appear at path 0 when triggered.
Paths could be places adjacent:

Code: Select all

0X000000
00000000
00000000
00000000
00000000
0X00X000
00000000
0000X000
making for "lower strain" on the engine.

Could be used to script events such as guards running for reinforcements or a guide to show you to a location.

Some of this can be done with lots of telepoters and monsters with altered facing images, but I think some sort of dedicated pathing system might be more appropriate now.
Something for the future that has actually arrived. :D

Posted: Tue Apr 25, 2006 12:38 pm
by beowuuf
I already indicated in a previous post a suggestion for makign a NPC be able to walk, with a convert to adjacent - this would be better than path, since a)it's a designer thing not soemthign the engine needs complex code for, while being flexible, and b) you can map out a general behaviour - an NPC shopper won't always follow one path, and c) its a general convert you could use for anything

Simple mechanics are always best I feel as they can be used for a wide variety of things and then can be used as building blocks for complex components.

Posted: Tue Apr 25, 2006 2:09 pm
by mikko
If there already is a path finding algorith for the monsters, then you would just need a way to specify waypoints that the creatures should follow. They would then just automagically select a suitable path and be off. And they would not get stuck somewhere because of a closed door or open pit if there was an alternate route to the target tile. To hardcode a certain route, you could just put waypoints to every tile on the way..

Of course, if there is no path finding implemented in the engine, it might be easier to leave such things completely for the dungeon designer to figure out. But surely there must be.. ? :roll:

Posted: Fri Apr 28, 2006 5:36 am
by copperman
The waypount idea is kinda what I have in mind. Making sure a path is clear would be down to the designer, monsters should simply walk from one to the next waiting if specified.

Posted: Fri Apr 28, 2006 3:47 pm
by Ameena
Yeah then you could have a monster patrolling a corridor and try to sneak past when it's down the other end or something :).

Posted: Fri Apr 28, 2006 4:38 pm
by copperman
yes thats one example, or a neutral moster that guides the party around someplace maybe.

Posted: Wed May 17, 2006 10:07 pm
by George Gilbert
This can now be done in V0.39 by cunning use of the movement / rotation actions to force a monster to go in the direction you want it to!

Posted: Wed May 17, 2006 10:15 pm
by copperman
Splendid, yeay for enhanced "dungeon mechanics" :D

Posted: Thu May 18, 2006 12:06 am
by George Gilbert
BTW - I've put an example of a monster patrolling an area into the example dungeons so you can see how it can be done.