Multiple tile actors and tilesets

Ankhranum

  • Posts: 45
Hya guys!

I'm using RMXP RTP for creating a testgame, but the problem is RMXP characters uses one and a half tile in height, so they are 32x48 pixels. I have add some random trees, but the player just walks over it!
How can I make the player colide with the trees and make sure he can walk behind the leaves?

Regards

coleislazy

  • *
  • Posts: 2607
Make the collision box smaller. If the tree is 32x48, you could make the collision box 32x32 and set it down at the bottom of the actor. Also, make sure the tree is on a higher layer so the player goes behind it instead of on top of it.

Ankhranum

  • Posts: 45
And ehm, how do I make sure the player walks againsd the tree and not trough it? I've done what you said, the player walks now behind it but he still goes trough the tree. I want him stop moving when he collides with the root. How do I do that?

AnachroNia

  • Posts: 72
I'm not sure what RMXP RTP should be but if your game is in isometric view - http://fc09.deviantart.net/fs14/f/2007/110/8/0/Isometric_Terrain_by_sweet_kungfuman.jpg for example - the collision shape of the trees is the tile under them :)

Ankhranum

  • Posts: 45
No, RMXP isn't isometric. I thought there must be some behavior or something

coleislazy

  • *
  • Posts: 2607
Well, it depends on how you are handling movement. I'm assuming you are using a behavior that uses collision boxes to detect obstacles. In that case, you would make sure your player and the trees have collision boxes set, and also that their collision groups are set to collide. You can find that last setting in the Game Center under Game Settings -> Collision Groups.