• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] RPG Quests, only works for player 1?

Status
Not open for further replies.
Level 7
Joined
May 21, 2009
Messages
289
I've never really been able to get quests specific for multiple players to work. Figured I would see if anyone more experienced than myself could point out how to fix this.
My current "3 Trigger System"
Trigger 1:
  • Recruiter 1
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Item-type of (Sold Item)) Equal to Talk
      • (Selling unit) Equal to Imperial Recruiter 0013 <gen>
      • Imperial_Recruiter[(Player number of (Owner of (Killing unit)))] Equal to -1
    • Actions
      • Set Imperial_Recruiter[(Player number of (Owner of (Buying unit)))] = 0
      • Game - Display to (Player group((Owner of (Buying unit)))) for 30.00 seconds the text: |c000042FFRecruiter...
Trigger 2:
  • Gnolls
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to Gnoll
      • Imperial_Recruiter[(Player number of (Owner of (Killing unit)))] Greater than or equal to 0
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Imperial_Recruiter[(Player number of (Owner of (Killing unit)))] Greater than or equal to 9
        • Then - Actions
          • Game - Display to (Player group((Owner of (Killing unit)))) for 5.00 seconds the text: |c000042FFGnolls fo...
        • Else - Actions
          • Set Imperial_Recruiter[(Player number of (Owner of (Killing unit)))] = (Imperial_Recruiter[(Player number of (Owner of (Killing unit)))] + 1)
          • Game - Display to (Player group((Owner of (Killing unit)))) for 5.00 seconds the text: ((String(Imperial_Recruiter[(Player number of (Owner of (Killing unit)))])) + |c000042FFGnolls|r killed.)
Trigger 3:
  • Recruiter hand in
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Target unit of issued order) Equal to Imperial Recruiter 0013 <gen>
      • Imperial_Recruiter[(Player number of (Owner of (Killing unit)))] Greater than or equal to 9
    • Actions
      • Set Imperial_Recruiter[(Player number of (Owner of (Ordered unit)))] = -2
      • Game - Display to (Player group((Owner of (Ordered unit)))) for 30.00 seconds the text: |c000042FFRecruiter...
This trigger works for player 1. When I test it with player 2, I can accept the quest and the second trigger tells me when I'm killed my required creature. However, it will not let me hand in the quest.

Imperial_Recruiter[] is an integer array of 5 (for 5 players)
 
Status
Not open for further replies.
Top