2 Problems, please help!

Status
Not open for further replies.
Level 2
Joined
Mar 21, 2020
Messages
14
1. problem: So I created quest, and it is working fine except one thing. That quest is about defeating enemy, destroying base. I don't know what event or condition set to mark that question as completed. Because I can not select whole base like "Unit dies". Is there another way? So when I destroy enemy base that quest should be marked as completed. Probably also with pop-up "Continue" and "Quit" after destroying.

2. problem: I created simple quest, inside that quest are 3 requirements. Every requirement is for killing. For example "Kill Unit 1", "Kill Unit 2", "Kill unit 3". I know how to mark each requirement as completed but i don't know how to mark whole question after I kill all of them. I know how to mark whole question as completed if I put for example requirement "Kill unit 3", after event "Unit dies" to mark requirement and mark whole question as completed. But the problem is if I first kill unit 3, not unit 1 or 2, then my question will be marked as completed before I kill all of them. Is there a way if I kill that units randomly, and after I killed last one, is there a way to mark whole question as completed? Not just requirements. Thanks!

Please guys, if you know how to solve this I will be grateful. :ogre_haosis:
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
#1: You can store the enemy base into a Unit Group in order to keep track of it.

Then use the "A unit dies" Event to track whenever a unit in that group dies. Once the last unit in the group is dead the quest will be completed:

Event:
A unit dies

Condition:
Dying unit is in your Unit Group equal to true

Actions:
Remove dying unit from your Unit Group
If number of units in your Unit Group equal to 0 then -> Mark Quest as completed.

#2: Not entirely sure what the issue is, I've never actually messed around with Quests before. But I imagine you could use Unit Groups again to keep track of Units 1, 2, and 3. Then when one of them dies you remove them from the Unit Group and check to see if the Unit Group is empty. If it's empty then you mark the Quest as complete. You could also use an Integer, set it as 3 by default, and subtract 1 from it whenever one of the 3 Units dies. Once it reaches 0 you know the units are all dead and the Quest is complete.
 
Status
Not open for further replies.
Top