Hi all,
As the title says, I'm looking for a way to check collision with an event and the player. The problem is that the event is always jumping. I can check the collision when the event land but I can't do it when it's in the air.
So i tried, instead of checking the tiles coordinate, to check the sceenX and screenY coordinate but something is wrong.
Can someone help me please?
Thanks
As the title says, I'm looking for a way to check collision with an event and the player. The problem is that the event is always jumping. I can check the collision when the event land but I can't do it when it's in the air.
So i tried, instead of checking the tiles coordinate, to check the sceenX and screenY coordinate but something is wrong.
Can someone help me please?
var charX = this.character(0).screenX();
var charY = this.character(0).screenY();
var playerX = $gamePlayer.screenX();
var playerY = $gamePlayer.screenY();
if (playerX > (charX - 24) && playerX < (charX + 24)) {
if (playerY > (charY - 24) && (playerY < (charY + 24)) {
$gameMessage.add('Test');
}
};
Thanks