How is Built-in Chase Scripted?

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

@Bob:
Excellent! That NPC hug-wall script is going to be super handy. Guess I'll toss all my enemy patrol pattern scripts haha. It's great to hear that this works with avoid zones, so many things are now easily possible.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I was thinking about wall/zone following for movement patterns, and I should probably add an additional movement pattern variant of it that just stops and holds still when it collides with a hero or another NPC, rather than trying to skirt around them.

That way you can make movement patterns that won't be messed up by the hero or by other randomly walking NPCs.
User avatar
sheamkennedy
Liquid Metal Slime
Posts: 1110
Joined: Mon Sep 16, 2013 9:29 pm
Location: Tama-shi, Tokyo, Japan
Contact:

Post by sheamkennedy »

Bob the Hamster wrote:...I should probably add an additional movement pattern variant of it that just stops and holds still when it collides with a hero or another NPC, rather than trying to skirt around them.

That way you can make movement patterns that won't be messed up by the hero or by other randomly walking NPCs.
I think this would be great. It would also be useful for puzzles where the patrolling NPC can be temporarily blocked by something like a push-box that the player has positioned.
⊕ P E R S O N A L M U S I C: https://open.spotify.com/album/6fEo3fCm5C3XhtFRflfANr
� C O L L A B M U S I C: https://dustpuppets.bandcamp.com/releases
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Bob the Hamster wrote:I was thinking about wall/zone following for movement patterns, and I should probably add an additional movement pattern variant of it that just stops and holds still when it collides with a hero or another NPC, rather than trying to skirt around them.
I was thinking exactly the same thing. Of course if two such NPCs collide with each other head-on they'll be stuck there forever (unless you push one of them), but I think that's fine.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

TMC wrote:
Bob the Hamster wrote:I was thinking about wall/zone following for movement patterns, and I should probably add an additional movement pattern variant of it that just stops and holds still when it collides with a hero or another NPC, rather than trying to skirt around them.
I was thinking exactly the same thing. Of course if two such NPCs collide with each other head-on they'll be stuck there forever (unless you push one of them), but I think that's fine.
Yeah, I am fine with that.

You can also get a "Avoid You (Direct)" NPC stuck permanently in the corner pretty easily, but I am fine with that one too.

Maybe we could use a "Walk Ahead Until Stuck" movement type too.
TMC
Metal King Slime
Posts: 4308
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

Maybe we could use a "Walk Ahead Until Stuck" movement type too.
I think that could be useful. E.g. an object (spawned by a tag change) which falls from the ceiling. I mistakenly thought you'd already implemented this!

(And for anyone following along: James did add the "Follow walls (L/R) stops for others" variants)
Last edited by TMC on Sat Apr 01, 2017 10:56 am, edited 1 time in total.
Post Reply