I'm trying to make an event where it checks for enemies remaining on the map and if there is none it will activate something. I made a previous post about this and someone gave me this script: " $gameMap.enemiesF().length==0 " but it either doesn't work correctly or maybe I'm just doing something wrong. If someone can tell me what im doing wrong that would be appreciated.
MV Chrono Engine Event Help
Javascript/Plugin SupportWhat does your other page look like?
If you put "$gameMap.enemiesF()" into the console what does it say?
sorry how do i do this?
press f12 or f8 to bring up the dev tools page, the console is one of the tabs
Hello. Are you using Chrono Mode or ABS Mode?
Weird, based on that result the script should be activating properly (since it isn't detecting any enemies).
Try moving the wait to above the conditional branch, maybe there's some weird thing where enemies initialize on the first frame of the map or something.
Try moving the wait to above the conditional branch, maybe there's some weird thing where enemies initialize on the first frame of the map or something.
For some reason it always says the script is true and that there is 0 enemies left even though there are 3 on the map. Maybe it has something to do with chrono engine?
Are you in chrono mode or ABS mode?
Im in ABS mode
Oh, are you trying to scan enemies onscreen or offscreen?
For offscreen you'll need to use $gameMap.allEnemiesOnMap().length==0
For offscreen you'll need to use $gameMap.allEnemiesOnMap().length==0
Thank you so much it worked
Original thread: https://forums.rpgmakerweb.com/threads/chrono-engine-event-help.138414/