Hey, walk_to does smart pathing now! Pretty slick. No more monsters restlessly pacing the floor two turfs away from a door!
Actually I think I remember reading about this change some time ago, so this is probably old news, but still it deserves commendation.
Of course, I could use Deadron's library and have a really robust solution, but that would be just too easy.
ID:136694
Jun 20 2002, 4:24 pm
|
|
Jun 20 2002, 6:17 pm (Edited on Jun 20 2002, 7:17 pm)
|
|
Now make the monsters open doors when they come to them, and you'll have something going. I had an AI the other day that learned and interacted with individual players, but I got bored talking to nothing (and having it talk back) so I gave it an icon and made it a killing machine =P.
|
In response to Nadrew
|
|
Speaking of walk_to, how could I implement this in my monster mobs? Don't answer if it is a stupid question.
-Thanks, Vercingatorix |
In response to Vercingatorix
|
|
I'm sorry I didn't specify correctly,let me rephrase my post. "Where in the mob code would I slip the walk_to() line?
mob monster name = icon = Walk_to(ref,trg,Min=0,Lag=0) Is this the correct order? Thanks, Vercingatorix |
Gughunter wrote:
Of course, I could use Deadron's library and have a really robust solution, but that would be just too easy. I haven't tried walk_to since it was fixed but I suspect that for single-tile mobs it's probably the way to go now. You'd want to use my library for multi-tile mobs or other special pathing needs, since my library provides hooks that let you customize how the pathing works. Of course the interesting challenge would be to see if walk_to can handle the tricky map provided as a demo with the PathFinding library. |
In response to Vercingatorix
|
|
I'm sorry I didn't specify correctly,let me rephrase my post. "Where in the mob code would I slip the walk_to() line? It has to go inside of a procedure. For example, if you have a procedure that gets called when the mob is attacked, you could have the mob follow the attacker like this: mob/proc/Attacked(mob/attacker) walk_to(src,attacker,0,30) |
In response to Dan
|
|
Oh ok, thanks for that. -Vercingatorix
|