(AS2) I’m using a B&W bitmap to determine passable and impassable area. White is passable, black is impassable. It isn’t working, though. Can someone tell me what’s wrong?
The following is in the frame:
_global.AreaMap1 = BitmapData.loadBitmap(AreaMap1);
And this is in the character:
if(_global.Area == 1 && _global.AreaMap1.getPixel(xDest, yDest) == 0x000000)
The if statement is never true, when I trace _global.AreaMap1.getPixel(xDest, yDest) I get undefined. _global.Area does equal 1, and xDest and yDest do have values assigned to them. I got my code from tutorials so I don’t think it’s wrong, but that seems to be the only thing left.