Hi again everyone. Im making an ORPG and its starting to take shape. I'm now adding quests, but I hit a minor snag with some of the triggers, and I dont know what happened. Ill post them here, and I would be grateful if you help me find out what the problem is.
Basically, the idea of the quest is you go out and kill 15 satyrs, then come back and your whole team gets gold and xp, but the final trigger doesnt work for some reason.
Basically, the idea of the quest is you go out and kill 15 satyrs, then come back and your whole team gets gold and xp, but the final trigger doesnt work for some reason.
Code:
Blackwood Bothers Start
Events
Unit - A unit comes within 400.00 of Captain Leif 0016 <gen>
Conditions
((Entering unit) is A Hero) Equal to True
Actions
Special Effect - Destroy QuestEffect[1]
Quest - Display to (All players) the Quest Discovered message: Captain Leif: Hail ...
Quest - Create a Required quest titled Blackwood Bothers with the description Hail Adventurers. W..., using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
Set Quests[1] = (Last created quest)
Trigger - Turn off (This trigger)
Code:
Blackwood Bothers Progress
Events
Unit - A unit Dies
Conditions
(Unit-type of (Dying unit)) Equal to Blackwood Satyr
Actions
Set BlackwoodSatyrKills = (BlackwoodSatyrKills + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BlackwoodSatyrKills Equal to 15
Then - Actions
Quest - Mark Quests[1] as Completed
Quest - Display to (All players) the Quest Update message: The satyrs are dead...
Else - Actions
Do nothing
Code:
Blackwood Bothers End
Events
Unit - A unit comes within 400.00 of Captain Leif 0016 <gen>
Conditions
((Entering unit) is A Hero) Equal to True
BlackwoodSatyrKills Equal to 15
Actions
Quest - Display to (All players) the Quest Completed message: THNX
Unit Group - Pick every unit in (Units in (Playable map area) matching (((Picked unit) is A Hero) Equal to True)) and do (If ((Owner of (Picked unit)) Not equal to Player 4 (Purple)) then do (Hero - Add 1000 experience to (Picked unit), Hide level-up graphics) else do (Do nothing))
Player Group - Pick every player in (All players) and do (Player - Add 100 to (Picked player) Current gold)
Special Effect - Create a special effect attached to the overhead of Captain Leif 0016 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
Set QuestEffect[2] = (Last created special effect)
Trigger - Turn off (This trigger)
Wait 15.00 seconds
Trigger - Turn on Mushroom Soup Start <gen>