Prevent player from "automatically" walking off cliffs

Started by Intangible, Tue 03/01/2012 23:54:06

Previous topic - Next topic

Khris

The module doesn't rely on lowres coordinates, all it does is compare player.x/.y to the int constants the user entered.

Intangible:
I see, I hadn't thought of the case of somebody not using GotThere for every interaction.

Sslaxx

Quote from: monkey_05_06 on Mon 16/01/2012 14:37:51
Without looking at the GotThere source, is there any reason the code would rely on using 320x200/320x240 (low-resolution) coordinates? Newer versions of the engine do support native coordinates for high-resolution games (there's a setting in the editor which sets this, then there's Game.UsesHighResCoordinates to check for it (or something like that)).

Off the top of my head I'm not sure that there's a reason you would have used low-res coordinates in writing the module, but it could be relevant if you did.
But walkable areas and the like are still low-res. Might this not cause issues?
Stuart "Sslaxx" Moore.

Khris

No. The module doesn't care about walkable areas. Like I said, all it ever does is a check like if (player.x == 234).
If the user calls the provided function with odd coordinates but the player only stands on even ones at any given time, he'll never pass the module's check, so either fix the game setting, only use even coordinates or change the module so it checks for distance < 2 instead of exact position.

SMF spam blocked by CleanTalk