Size
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- BlackBulletIV
- Inner party member
- Posts: 1261
- Joined: Wed Dec 29, 2010 8:19 pm
- Location: Queensland, Australia
- Contact:
Re: Size
Collision detection is what you need. You've basically got to constantly check whether the player's x/y position is the same or within a certain range of the x/y position of the desired corner. Like this:
Also, in cases like these, don't double post; edit your post and add your message, preferably prefixed for "EDIT: " or the like.
Code: Select all
if player.x == box.x + width and player.y == box.y + height then -- this is check for the bottom corner
-- load section
end
Who is online
Users browsing this forum: Google [Bot] and 5 guests