[Ohrrpgce] snapping an NPC or hero to grid

Adam Perry arperry at gmail.com
Fri Jul 8 10:59:38 PDT 2016


It might even be the kind of thing you want at the engine level. The
original Legend of Zelda allowed semi-freeform movement, but you snapped to
the half-tile when you switched between moving horizontally and vertically.
The same thing could work here.

On Fri, Jul 8, 2016 at 12:56 PM, James Paige <Bob at hamsterrepublic.com>
wrote:

> I was talking to RMZ about how to unstick NPCs that get stuck when their
> speed
> changes while moving. I know Pepsi has had to do a ton if this sort of
> thing too.
>
> I came up with:
>
> script, snap npc, arg, begin
>   # Kill current movement
>   walk NPC(arg, west, 0) # x axis
>   walk NPC(arg, north, 0) # y axis
>   # reset NPC to current tile
>   put NPC(arg, NPC x(arg), NPC y(arg))
> end
>
> And I was thinking this is probably common enough that it should be done
> with standard commands.
>
> Maybe a built-in "snap NPC" command? Or maybe an optional argument to "put
> NPC" that can kill current momentum?
>
> Thoughts?
>
> ---
> James
>
> _______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20160708/cbcdb5a4/attachment.htm>


More information about the Ohrrpgce mailing list