thank you for taking the time to go into so much detail redmarine. I will try this out later on it makes sense, i only have trouble sometimes finding the actually identical trigger
Also one last question, if i set a quest to a integer when the quest is complete eg kill a boss, the boss death trigger sets the integer for the quest to 1 for example and this triggers the quest complete action. Storing quests as variable will allow me to set a quest and come back to it later on whilst others have been made and completed is this how it all works?
Yep, I'll explain it: When a unit enters the quest giver's region, if the owner of entering unit got the value of his/her Quest_Pig_Hunt = 0 the entering player gets the quest when the value changes to 1.
It works for multiplayer because an array works like this.
You can make Quest_Pig_Hunt an array for all players. In this case you should set the Quest_Pig_Hunt array to (amount of players)
Quest_Pig_Hunt Array 1 = red
Quest_Pig_Hunt Array 2 = blue
Quest_Pig_Hunt Array 3 = teal
Quest_Pig_Hunt Array 4 = purple
Quest_Pig_Hunt Array 5 = yellow
and so on...
Which means if the entering unit is player 1, then Set Quest_Pig_Hunt[(Player number of (Owner of (Entering unit)))] = (Quest_Pig_Hunt[(Player number of (Owner of (Entering unit)))] + 1) sets the red's Quest_Pig_Hunt to value 1.
And if it is player 2 or player 3, the value will be 1 just like player 1 because the only thing that changes is the array.
Set Quest_Pig_Hunt[(Player number of (Owner of (Entering unit)))] = (
Quest_Pig_Hunt[(Player number of (Owner of (Entering unit)))] + 1)
The yellow text is the variable and the green text is the array(s).
---------------------------------------------------------------------------
Event
A guy eats taco.
Condition
Action
If, then, else Condition
If Value of
taco_left = 1 or more.
Then - Actions
Eat more tacos.
Set
taco_left =
taco_left - 1
Else - Actions
Buy more tacos.
Set
taco_left =
taco_left + 5
If we don't use arrays here the variable would just have 1 value. Example if player 1 eats taco(s) then player 2 will also be able to eat taco(s) from the same taco box.(
taco_left = a taco box in this case with a lot of tacos lol...) If we add array to 2 then there will be 2 taco boxes and they'll have a box each.
To fix this trigger:
Event
A guy eats taco.
Condition
Action
If, then, else Condition
If Value of
taco_left[(Player number of (Owner of (Eating Unit)))] = 1 or more.
Then - Actions
Eat more tacos.
Set
taco_left[(Player number of (Owner of (Eating Unit)))] =
taco_left[(Player number of (Owner of (Eating Unit)))] - 1
Else - Actions
Buy more tacos.
Set
taco_left[(Player number of (Owner of (Eating Unit)))] =
taco_left[(Player number of (Owner of (Eating Unit)))] + 5
Btw Eating Unit doesn't exist.
---------------------------------------------------------------------------
From my experiences a lot of examples gives a lot better understanding, because sometimes people don't understand right away. If you need anymore help just ask. Btw instead of using
"Quest - Display to (All players) the Quest Update message:" you can use
"Game - Display to (All players) the text:" but I would prefer
"Quest - Display to (All players) the Quest Update message:" because it is different and it also tells you that you are doing quests.
To be honest I haven't tested the triggers but they should work.
But if you just wanted to know how to reset the quest then just set the value of the quest and the kill variable to 0