- Joined
- Mar 28, 2016
- Messages
- 1,623
- Reaction score
- 1,440
- First Language
- French
- Primarily Uses
- RMMV
Hi guys.
What is the right way to do this
i need found the name of file or event!, of each event on map to check if the name are 'monster'
Tank you
What is the right way to do this
i need found the name of file or event!, of each event on map to check if the name are 'monster'
Tank you
Code:
if (command === 'MonsterMover') {
//calculate how mutch event have the name monster
for (i = 1; i <= $gameMap._events.length; i++) {
//If The indexof return -1 , is because is not monster, if return 1 is a monster
if ($gameMap._events[i]._characterName.indexOf("monster")) {
//do something with this event ..
console.log(i + ' monster found ');
}
}
}
Last edited by a moderator:
