I'm making an RPG, need help with collisions.

BlitzMax Forums/BlitzMax Beginners Area/I'm making an RPG, need help with collisions.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Hey, I'm pretty new to BlitzMAX here. I started working on a simple "game" recently, a simple yellow rectangle that could be controlled using the arrow keys.

I've been learning BlitzMAX a bit more, and now I have it using sprites instead of a rectangle, and I added a tree.

I would like it so my character can walk around, but not THROUGH the tree. In pseudo-code I was expecting something like this:

If KeyDown(KEY_RIGHT)
If !(TheTreeIsAt(x+1)) x:+1
EndIf

I'll post my BMX file if needed.