Hello there!
I'm new to RPG Maker and got some questions regarding it. Also I'm new to Ruby, but I'm pretty well excperienced in programming in general, so I'm not affraid to dig into Ruby.
I'll start from the first challenge I've encountered. I want to implement a common in MMOs system when killed monster respawns elsewhere on the map. Also the default "encounter" system does not suit for me because I want the monsters to be displayed visually on the map.
I saw some scripts for respawning monsters, but I do want to respawn them on a random walkable position on map.
For this there could be two solutions, but I'm stuck trying to implement them.
Solution #1
First create a region on map covering all possible places of monsters to respawn. On monster's death move it's event to a random tile of that region, maybe with a delay.
So, the question is: how I can access map's regions from script to get random cell of specific region and get it's coordinates?
Solution #2
Upon monster's death cycle through random coordinates of current map until some walkable tile found and respawn monster there.
Here I'm stuck at RPG::Map data-structure. Firstly, I don't understand why it is 3-dimensional, because we have 2-d map? Secondly, how to determine if tile [x, y] is walkable?
Thanks in advance for your help covering my these two questions or possible help for achieving my goal 🙂
I'm new to RPG Maker and got some questions regarding it. Also I'm new to Ruby, but I'm pretty well excperienced in programming in general, so I'm not affraid to dig into Ruby.
I'll start from the first challenge I've encountered. I want to implement a common in MMOs system when killed monster respawns elsewhere on the map. Also the default "encounter" system does not suit for me because I want the monsters to be displayed visually on the map.
I saw some scripts for respawning monsters, but I do want to respawn them on a random walkable position on map.
For this there could be two solutions, but I'm stuck trying to implement them.
Solution #1
First create a region on map covering all possible places of monsters to respawn. On monster's death move it's event to a random tile of that region, maybe with a delay.
So, the question is: how I can access map's regions from script to get random cell of specific region and get it's coordinates?
Solution #2
Upon monster's death cycle through random coordinates of current map until some walkable tile found and respawn monster there.
Here I'm stuck at RPG::Map data-structure. Firstly, I don't understand why it is 3-dimensional, because we have 2-d map? Secondly, how to determine if tile [x, y] is walkable?
Thanks in advance for your help covering my these two questions or possible help for achieving my goal 🙂