[Ohrrpgce] snapping an NPC or hero to grid
James Paige
Bob at hamsterrepublic.com
Fri Jul 8 10:56:32 PDT 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20160708/fa3f4bf8/attachment.htm>
More information about the Ohrrpgce
mailing list