I've a map on which I want to have many required quest so that you need to compleat all of the other quest to win the game. Unfortunly I don't know how to pull it off. I want to run the quests parallelly but the only thing I've succseeded with is to have one quest that lead to victory. Could anybody help me?|||Create an Integer variable, call it for example QuestInteger
Create a Quest variable, that is an array. When you create a new main quest, do this action right after you create it:
Code:
Set QuestVariable[1] = (Last created quest)
For the next main quest, you just add 1 extra, so for the second quest, use [2], for the next [3] etc.
Then do this as trigger for when a quest is completed, lets just take if a Footman dies, the quest is completed.
We will take 3 quests that need to be completed in total for this example.
I will only show one, since it's about the Integer that is important.
Code:
QuestComplete1
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Footman
Actions
Quest - Mark QuestVariable[1] as Completed
Set QuestInteger = (QuestInteger + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
QuestInteger Equal to 3
Then - Actions
Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
Else - Actions
Do nothing
And there you have it, when the quest is completed, the Integer gets +1, if the integer has gotten in total +3, it will make the player that completed the last quest win the game.
(Make sure that you also set that the other players get defeat.)|||Thanks for the help. :)
No comments:
Post a Comment