- Joined
- Jan 5, 2016
- Messages
- 149
- Reaction score
- 88
- First Language
- English
- Primarily Uses
- RMVXA
Hi all,
Running into a snag in my game since I can't exactly figure out how to program a fairly central gameplay component of my game.
The game's areas involve defeating certain monsters in each area as part of a "checklist" of sorts. Each time you kill a monster, it's recorded as part of the checklist, but only for that specific monster. Killing two Blue Slimes would only check off 1 requirement in the area, in other words.
Think of it a little like Pokemon: Once you catch a Pokemon, it's registered and counts towards your total # of caught Pokemon. The issue here is that each monster needs to count as ONE addition to the variable, and only one. You can't just catch 30 Pikachus and have your Pokedex say "caught 30." Similarly, any number of a particular defeated monster must only count as 1.
So here's the thing; I literally have no idea how to set this up. The checklist is displayed as such: (number of defeated monsters) / (total species in the area), where the number of defeated monsters is how many SPECIES you've killed, and total species is simply the overall number of how species there are to kill. One way is to use a troop event and after an enemy is defeated, raise the "species killed" by 1, then activate a switch that prevents that process from being done again for that individual monst. The issue is that this uses way too many switches which I need for quests, items, and other processes - I also have way too many monsters in my game to use this method.
I know Bestiary scripts must use a similar mechanic: Once a monster is defeated, it's registered forever and added once to the total species killed #. What methods does that use? Could it be replicated for my own needs? I suppose that's more of a scripting question, but I'm willing to accept any solution to be quite honest. I just wish there was some sort of instance variable that would only activate once during the game.
Any help is much appreciated. Thanks in advance!
Running into a snag in my game since I can't exactly figure out how to program a fairly central gameplay component of my game.
The game's areas involve defeating certain monsters in each area as part of a "checklist" of sorts. Each time you kill a monster, it's recorded as part of the checklist, but only for that specific monster. Killing two Blue Slimes would only check off 1 requirement in the area, in other words.
Think of it a little like Pokemon: Once you catch a Pokemon, it's registered and counts towards your total # of caught Pokemon. The issue here is that each monster needs to count as ONE addition to the variable, and only one. You can't just catch 30 Pikachus and have your Pokedex say "caught 30." Similarly, any number of a particular defeated monster must only count as 1.
So here's the thing; I literally have no idea how to set this up. The checklist is displayed as such: (number of defeated monsters) / (total species in the area), where the number of defeated monsters is how many SPECIES you've killed, and total species is simply the overall number of how species there are to kill. One way is to use a troop event and after an enemy is defeated, raise the "species killed" by 1, then activate a switch that prevents that process from being done again for that individual monst. The issue is that this uses way too many switches which I need for quests, items, and other processes - I also have way too many monsters in my game to use this method.
I know Bestiary scripts must use a similar mechanic: Once a monster is defeated, it's registered forever and added once to the total species killed #. What methods does that use? Could it be replicated for my own needs? I suppose that's more of a scripting question, but I'm willing to accept any solution to be quite honest. I just wish there was some sort of instance variable that would only activate once during the game.
Any help is much appreciated. Thanks in advance!
