Hello fellow phaser users
I have been playing around a bit with tiled to make my 2D maps for a phaser game. But I have 2 problems that I cant seem to find the answer to :
I made myself a script that a pokemon appears if I run on a specific layer. But I'm a bit stuck it keeps on finding pokemons because it keeps on saying that i'm in touch with the layer.
var pokemonwild = game.physics.arcade.overlap(player, layerbackground);
This is what I am using right now. What should I add so it only checks once for an overlap each time I move?
Also a small problem I cant get solved in tiled I made a layer named " frontgroundLayer" as purpose that it has to hide the player if it runs into that layer. For exmaple if the player runs into long grass you will see the long grass instead of the player.
I have no problems with making them collide I just cant seem to find a way for the player to hide behind a tree for example.
Thanks for the read hopefully anyway can help me