bud_wis_er_420
2013-05-17 14:41:47
Why do I keep getting the same cords no mater where I'm standing when trying to use my own custom SPS map?
Does it matter where I place my img in the black 500 X 500 canvas? I assumed I would get higher cords if placed further from the top left. That's the reason I did it like that. So each img would use different cords. This is how I would detect what map I'm on. But it seems it starts the cords from the first non black pixel. So in other words the bigger the map the bigger the cords. But this still shouldn't be a problem because it should return(-1, -1) if on the wrong map anyways, right?
Anyways this has nothing to do with my current problem, which is why my cords keep coming up the same when using this map. Was working fine for my blue side 1st floor map. The cords I keep getting no matter where I'm standing on the map is (75, 75). Not (-1, -1) so I assume it is finding the map correctly, just something else is going wrong.
Here is the code I use to get my pos in the map.
my img:
Does it matter where I place my img in the black 500 X 500 canvas? I assumed I would get higher cords if placed further from the top left. That's the reason I did it like that. So each img would use different cords. This is how I would detect what map I'm on. But it seems it starts the cords from the first non black pixel. So in other words the bigger the map the bigger the cords. But this still shouldn't be a problem because it should return(-1, -1) if on the wrong map anyways, right?
Anyways this has nothing to do with my current problem, which is why my cords keep coming up the same when using this map. Was working fine for my blue side 1st floor map. The cords I keep getting no matter where I'm standing on the map is (75, 75). Not (-1, -1) so I assume it is finding the map correctly, just something else is going wrong.
Here is the code I use to get my pos in the map.
program new;
{$DEFINE SMART}
{$i SRL/SRL.Simba}
{$I SPS/SPS.Simba}
var
MyPos : TPoint;
begin
SetUpSRL;
SPS_Setup(runescape_other,['CastelLvl1Red']);
MyPos := SPS_GetMyPos();
writeln('(' + IntToStr(MyPos.x) + ', ' + IntToStr(MyPos.y) + ')');
end. my img: