So I have an idea for how to do this but it seems pretty over-engineered so I'd like some ideas
Instead of regular random encounters, I'd like to have overworld encounters, ie there are sprites of enemies hanging around and when they touch you it initiates a battle. Here is what I hope to achieve.
1. Different enemies have different behaviors. Some don't even care if you're there and go about their business. Others start to run away when you get too close, and others move towards you when you get too close. Some will only be able to move quickly for a few tiles, where as others can move many squares, either towards or away from you.
2. When you "touch" an enemy sprite, the battle initiates. Touching means either the enemy or you attempt to move in to the tile as the other. A collision.
3. Enemies stay gone after you defeat them, until the map is revisited. So if there are 10 enemy sprites on a map, you could theoretically defeat all 10, but if you leave the map and come back, they also come back.
4. The type of enemy that spawns is semi random. Say there are 5 enemies on a map, each of those 5 could be either a mosquito enemy, a bat enemy, or a lizard enemy. So, theoretically, all 5 could be mosquitos. It just randomly checks when you enter the map what they'll be. This could be done pretty easily with a random variable. The locations of the enemies should also be random. Anywhere on the map, except on places that normally wouldn't be walkable for instance.
Does this sound doable without a plujgin? My idea is to basically have a set area where an enemy "patrols", and if you step on a specific tile near it, that tile would have an event that causes the enemy to move closer to you, but like I said earlier it seems a bit overengineered, and I figure there is probably a much better way to do it.
Instead of regular random encounters, I'd like to have overworld encounters, ie there are sprites of enemies hanging around and when they touch you it initiates a battle. Here is what I hope to achieve.
1. Different enemies have different behaviors. Some don't even care if you're there and go about their business. Others start to run away when you get too close, and others move towards you when you get too close. Some will only be able to move quickly for a few tiles, where as others can move many squares, either towards or away from you.
2. When you "touch" an enemy sprite, the battle initiates. Touching means either the enemy or you attempt to move in to the tile as the other. A collision.
3. Enemies stay gone after you defeat them, until the map is revisited. So if there are 10 enemy sprites on a map, you could theoretically defeat all 10, but if you leave the map and come back, they also come back.
4. The type of enemy that spawns is semi random. Say there are 5 enemies on a map, each of those 5 could be either a mosquito enemy, a bat enemy, or a lizard enemy. So, theoretically, all 5 could be mosquitos. It just randomly checks when you enter the map what they'll be. This could be done pretty easily with a random variable. The locations of the enemies should also be random. Anywhere on the map, except on places that normally wouldn't be walkable for instance.
Does this sound doable without a plujgin? My idea is to basically have a set area where an enemy "patrols", and if you step on a specific tile near it, that tile would have an event that causes the enemy to move closer to you, but like I said earlier it seems a bit overengineered, and I figure there is probably a much better way to do it.




