- Joined
- Oct 22, 2010
- Messages
- 29
I have 2 quests that involve collecting quest items. After collecting the first item it stops counting the remaining quest items as they are retrieved. I figure this is because the items are being stacked in one slot rather than taking up multiple slots in my inventory. How would I code the quest so that: a) the quest counter will still show how many items I have picked up b) make the quest complete when x amount of items are picked up and c) make the trigger that creates the quest items turn back off so that the player doesn't keep getting quest items.
I know I can make the items worth 0 but I'd really like the code to work. I'll post an example trigger for anyone that needs more info about my question.
As a matter of fact:
I know I can make the items worth 0 but I'd really like the code to work. I'll post an example trigger for anyone that needs more info about my question.
As a matter of fact:
-
Antler Drops
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
(Quests[3] is enabled) Equal to True
-
(Unit-type of (Triggering unit)) Equal to Stag
-
-
Actions
-
Item - Create Antler at (Position of (Triggering unit))
-
-
-
Molly
-
Events
-
Unit - A unit comes within 100.00 of Molly 0243 <gen>
-
-
Conditions
-
(This trigger) Equal to Molly <gen>
-
(Owner of (Triggering unit)) Equal to Player 1 (Red)
-
-
Actions
-
Special Effect - Destroy SpecialEffects[3]
-
Quest - Display to (All players) the Quest Update message: Let's see... Add f...
-
Quest - Create a Required quest titled Antlers with the description Retrieve 10 Antlers..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
-
Set Quests[3] = (Last created quest)
-
Trigger - Turn on Antler Drops <gen>
-
Trigger - Turn off (This trigger)
-
-
-
Antler Quest
-
Events
-
Unit - A unit owned by Player 1 (Red) Acquires an item
-
-
Conditions
-
(Quests[3] is enabled) Equal to True
-
(Item-type of (Item being manipulated)) Equal to Antler
-
-
Actions
-
Set Antler = (Antler + 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Antler Equal to 15
-
-
Then - Actions
-
Trigger - Turn on Antler Turn In <gen>
-
Trigger - Turn off Antler Drops <gen>
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
Quest - Change the description of Quests[3] to ((Gather 15 Antlers: + (String(Antler))) + /15)
-
Quest - Display to (All players) the Quest Update message: ((Antler: + (String(Antler))) + /15)
-
-
-
-
-
Antler Turn In
-
Events
-
Unit - A unit owned by Player 1 (Red) Is issued an order targeting an object
-
-
Conditions
-
(This trigger) Equal to Molly <gen>
-
(Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Antlers Equal to (Item being manipulated)
-
(Quests[3] is enabled) Equal to True
-
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Triggering unit) has an item of type Antler) Equal to True
-
(Owner of (Triggering unit)) Equal to Player 1 (Red)
-
Antler Equal to 15
-
-
Then - Actions
-
Hero - Give (Item being manipulated) to Molly 0243 <gen>
-
Quest - Mark Quests[3] as Completed
-
Quest - Display to (All players) the Quest Update message: Thank you, Hero! I ...
-
Player - Add 500 to Player 1 (Red) Current gold
-
Hero - Add 500 experience to (Triggering unit), Show level-up graphics
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-