|Author||Topic: Can you?|
? Man, ? Amazing
Member # 5755
written Friday, September 1 2006 22:00
Make creatures only move in one compass direction?
I want to have all my creatures in group x only move to the west. If something is in their way, then try NW then SW, and if nothing is possible there, then to fidget and say "Hurry, get out of my way."
I would do a cutscene, but I think it would be more fun to have the party be able to move about. They will be trying to get east.
Posts: 4114 | Registered: Monday, April 25 2005 07:00
Member # 5576
written Saturday, September 2 2006 05:26
Yes, you could do it, but it would be a good deal of work. I would do it by giving them a creature script that checks the terrain and floor to the west, and if the space is clear, uses relocate_character to actually do the move. Some thing like this:
(Note that this is mostly Avernum script but some pseudocode that needs to be replaced, mainly the state numbers and checking for whether a floor or terrain can be stepped on, which will require checking if the terrain is between 125 and 136, for instance, since these terrains are all boulders, and so on, and likewise for floors.
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Member # 2820
written Saturday, September 2 2006 11:11
The above script will be complex to implement because of all the general possibilities it must consider. Since you are the designer, I think you could make the map and script specific to each other and things would be much easier for you. For instance, if the only one narrow corridor or path to go from A to B, then the creature with the script will always move in the cardinal direction toward B because if it were blocked the pathfinding engine would tell it to stop. You can check for this halting and display your message then.
That example is pretty restrictive, but I think you get the idea.
Thuryl: I mean, most of us don't go around consuming our own bodily fluids, no matter how delicious they are.
Alorael: War and violence would end if we all had each other's babies!
Drakefyre: Those are hideous mangos.
Posts: 1415 | Registered: Thursday, March 27 2003 08:00