I'm trying to make a quest. When the quest is activated (switch is on), monsters should drop a certain quest item. After the quest is finished (switch is off), those monsters should stop dropping the quest item. How can I do this?
I think this is what your looking for. Go to "Troops" Tab in "database" and pick the troop you want to use and look in the conditions window and select "conditional branch".From the selections click "switch" type or choose a desired switch and click ok, in this case we are naming our switch "quest item potions". Then click inside the conditional branch and select "change items" and choose a potion. Make sure increase is checked and not decrease or else it will take away a potion. so now if you choose to turn on (switch)"quest item potions" it'll give you a potion. BUT WE ARE FORGETTING SOMETHING STILL! Make sure to change the conditions window to the desired one in this case I picked "turn end".
If you have something like a loot table system where you can change the chance of the item appearing, you could set it to 0% to make sure it doesn't show up. Other options are
- The quest adding the item to the loot table while the quest is active and removing it when it's inactive.
- Having a locked state on your item, so it means that it cannot spawn.
And there are probably a lot more ways to go about this problem. Look at your architecture and see what's the best for your game. I would go for the second option, but it all depends on what kind of architecture you have for your game.