Hello guys, So I'd like to create GUI MPI Quests.
Every player need to take quest to advance quest.
Once 1 player takes it, it displays quest in quest log for everyone with list of player names what are on quest.
Everything works fine, tested it in multiplayer with my friends, only my problem is removing player name from player list when he/she complete quest.
Here are triggers.
Setting names of each Quest.
Here I have biggest problem, I don't know how to remove player name from quest list when completed
Every player need to take quest to advance quest.
Once 1 player takes it, it displays quest in quest log for everyone with list of player names what are on quest.
Everything works fine, tested it in multiplayer with my friends, only my problem is removing player name from player list when he/she complete quest.
Here are triggers.
Setting names of each Quest.
-
QuestNames
-
Events
- Map initialization
- Conditions
-
Actions
- Set Quest_Names[1] = Delivery
-
Events
-
QuestAccept
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Tome of Experience
-
Actions
- Set DeliveryQ_i = (DeliveryQ_i + 1)
- Set DeliveryQ_r = (Real(DeliveryQ_i))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DeliveryQBoolean[(Player number of (Owner of (Triggering unit)))] Equal to True
-
Then - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) the text: You are already on ...
-
Else - Actions
- Quest - Display to (All players) the Quest Discovered message: ((Name of (Owner of (Triggering unit))) + ( has accepted: + Quest_Names[1]))
- Set DeliveryQBoolean[(Player number of (Owner of (Triggering unit)))] = True
- Set DeliveryQPList = (DeliveryQPList + ( + (Name of (Owner of (Triggering unit)))))
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DeliveryQ_i Equal to 1
-
Then - Actions
- Set DeliveryQuestCreated = True
- Quest - Create a Required quest titled Delivery with the description (Players on this Quest: + DeliveryQPList), using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
- Set DeliveryQ_Q = (Last created quest)
-
Else - Actions
- Quest - Change the description of DeliveryQ_Q to (Players on this Quest: + DeliveryQPList)
-
If - Conditions
-
Events
Here I have biggest problem, I don't know how to remove player name from quest list when completed
-
QuestFinish
-
Events
- Unit - A unit Acquires an item
-
Conditions
- (Item-type of (Item being manipulated)) Equal to Tome of Agility
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- DeliveryQBoolean[(Player number of (Owner of (Triggering unit)))] Equal to True
-
Then - Actions
- Quest - Display to (All players) the Quest Update message: (((Name of (Owner of (Triggering unit))) + has completed ) + Quest_Names[1])
- Set DeliveryQ_i = (DeliveryQ_i - 1)
- Set DeliveryQ_r = (Real(DeliveryQ_i))
- Set DeliveryQBoolean[(Player number of (Owner of (Triggering unit)))] = False
-
Else - Actions
- Game - Display to (All players) the text: You cannot complete...
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
QuestDestroy
-
Events
- Game - DeliveryQ_r becomes Equal to 0.00
- Conditions
-
Actions
- Quest - Destroy DeliveryQ_Q
-
Events