You must be logged in to do that.

GetObsPixel

GetObsPixel
int GetObsPixel(int x, int y)

Documentation

Verifies that an obstruction pixel is at the given coordinates. If there is an obstruction it returns true (i.e. not zero). Otherwise, it returns false (i.e. 0). This is useful for collision detection in large in advanced game systems.

Note: Coordinates are in terms of absolute pixels on the map, not screen-relative pixels.

Example Usage

// If the top-left corner of the player touches any obstruction, die.
if (GetObsPixel(entity.x[player], entity.y[player]))
{
	Exit("You died.");
}
Talkback

There are no talkbacks on this documentation page yet. Post the first?

Post a new comment?

Doc Nav

Your docs
View All Docs

If you log in, you can edit the documentation, or create your own documents and tutorials!

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.