Hell, how are you? I found myself into a problem while trying to make my game.
Imagine that in my game there are lots of coins spawned randomly around the layout. I want that one character ( the enemy ) walking around the map collecting all these coins.
How do I do that
Thank you very much
Develop games in your browser. Powerful, performant & highly capable.
Hell, how are you? I found myself into a problem while trying to make my game. Imagine that in my game there are lots of coins spawned randomly around the layout. I want that one character ( the enemy ) walking around the map, collect all these coins. How do I do that Thank you very much
Imagine that in my game there are lots of coins spawned randomly around the layout. I want that one character ( the enemy ) walking around the map, collect all these coins.
This is actually very simple.
All you need to do is make a variable named "coins", and every time a player touches a coin, destroy that coin and add 1 to the "coins" variable
Hello,
add to your enemy the pathfind behavior and give to him a path to a random coin.
On collision with a coin destroy that coin and give a new path to another random coin.