Hello folks.
At the moment, I'm trying to implement a system in my game where enemies roam the field, and if you get close enough the enemies will start pursuing you. Of course, once the enemies touch you, you will engage in battle. If you get far away enough from the pursuing enemy, then that enemy will stop chasing and return to its previous movement patterns. Since I can't seem to figure out how to do this without scripts, I resorted to using Vlue's Proximity Script:
http://pastebin.com/kCL50nSC
For the most part, the script was working as intended. However, whenever the player gets touched by more than one enemy at a time, the game always crashes with this error after the player wins the battle:
Script 'Window Selectable' Line 61: Zero Division Error occurred. Divided by 0.
Since I know nearly nothing about scripting, I'm at a loss as to what's causing this problem. If anyone can help me, I'd really appreciate it.
If it helps, here are all the other custom scripts I'm using besides Vlue's Proximity Script:
- Yanfly ACE Battle Engine
- Yanfly Enemy HP Bars
- DT's One Person Menu
- Fomar0153's Faces to Busts
- ACE Battle Engine Revival Glitch Fix
At the moment, I'm trying to implement a system in my game where enemies roam the field, and if you get close enough the enemies will start pursuing you. Of course, once the enemies touch you, you will engage in battle. If you get far away enough from the pursuing enemy, then that enemy will stop chasing and return to its previous movement patterns. Since I can't seem to figure out how to do this without scripts, I resorted to using Vlue's Proximity Script:
http://pastebin.com/kCL50nSC
For the most part, the script was working as intended. However, whenever the player gets touched by more than one enemy at a time, the game always crashes with this error after the player wins the battle:
Script 'Window Selectable' Line 61: Zero Division Error occurred. Divided by 0.
Since I know nearly nothing about scripting, I'm at a loss as to what's causing this problem. If anyone can help me, I'd really appreciate it.
If it helps, here are all the other custom scripts I'm using besides Vlue's Proximity Script:
- Yanfly ACE Battle Engine
- Yanfly Enemy HP Bars
- DT's One Person Menu
- Fomar0153's Faces to Busts
- ACE Battle Engine Revival Glitch Fix