- 5
- Posts
- 5
- Years
- Seen May 24, 2021
[Essentials V18]
I want an NPC to give the player an item after the player defeats all the trainers in a certain area (inside and outside a certain building). I tried to set it up so that when you talk to the NPC the first time, they trigger this subquest, but how do I make the game specifically see which and how many trainers were defeated in order to make the NPC notice that the requirement is now met?
What I want to do is basically what happens in Sun/Moon at the Trainer's School: once you beat all trainers in the school, the principal battles you and gives you a reward.
I managed to make it work for just one trainer (talk to NPC [trigger subquest] -> defeat one trainer [which clears the subquest] -> talk to NPC again to receive reward), but I just don't understand how to make it so that all 5 trainers in the area have to be defeated in a free order before the requirement for the reward is met.
I want an NPC to give the player an item after the player defeats all the trainers in a certain area (inside and outside a certain building). I tried to set it up so that when you talk to the NPC the first time, they trigger this subquest, but how do I make the game specifically see which and how many trainers were defeated in order to make the NPC notice that the requirement is now met?
What I want to do is basically what happens in Sun/Moon at the Trainer's School: once you beat all trainers in the school, the principal battles you and gives you a reward.
I managed to make it work for just one trainer (talk to NPC [trigger subquest] -> defeat one trainer [which clears the subquest] -> talk to NPC again to receive reward), but I just don't understand how to make it so that all 5 trainers in the area have to be defeated in a free order before the requirement for the reward is met.