• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Quest multiplayer problem

Status
Not open for further replies.
Level 3
Joined
Jul 27, 2012
Messages
33
hi guys, i make quest trigger, that each player can get each quest, each cinematic and special effect, but i think i fail make this trigger, i try use getlocalplayer() (gui, i can't use jass), but i still confuse how to do it, when each player have complete quest, unit get exp/gold, determine unit own by player who take quest only, etc.., when i try multiplayer it desync and out other player, can anyone help me pls?

  • QuestCreator
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Qnumber = 0
      • -------- Exclamation --------
      • Special Effect - Create a special effect attached to the overhead of Chansey 0038 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Set QSpecial[1] = (Last created special effect)
      • Special Effect - Create a special effect attached to the overhead of Chansey 0053 <gen> using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
      • Set QSpecial[2] = (Last created special effect)
      • -------- Initialize Q-Unit --------
      • Set QGiver[1] = Chansey 0038 <gen>
      • Set QGiver[2] = Chansey 0053 <gen>
      • Set QUnitTypeDying[1] = Peasant
      • Set QUnitTypeDying[2] = Peon
      • Set QUnitTString[1] = (String(QUnitTypeDying[1]))
      • Set QUnitTString[2] = (String(QUnitTypeDying[2]))
      • -------- 1 --------
      • Quest - Create a Optional quest titled peasant with the description peasant desc, using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
      • Set Qquest[1] = (Last created quest)
      • Quest - Disable Qquest[1]
      • Set QMonsterCount[1] = 2
      • Set QTalk1[1] = ((Kills + (String(QMonsterCount[1]))) + Ratata for me thx)
      • Set QTalk2[1] = (Kill + ((String(QMonsterCount[1])) + ( + QUnitTString[1])))
      • Set QExp[1] = 100
      • Set QGold[1] = 50
      • Set QRewardS[1] = ((|cff800080+ + ((String(QExp[1])) + EXP|r)) + (|n + (|cffffcc00+ + ((String(QGold[1])) + GOLD|r))))
      • -------- 2 --------
      • Quest - Create a Optional quest titled peon KIller with the description peon Descr, using icon path ReplaceableTextures\WorldEditUI\Editor-Random-Unit.blp
      • Set Qquest[2] = (Last created quest)
      • Quest - Disable Qquest[2]
      • Set QMonsterCount[2] = 3
      • Set QTalk1[2] = ((Kills + (String(QMonsterCount[2]))) + Pika for me thx)
      • Set QTalk2[2] = (Kill + ((String(QMonsterCount[2])) + ( + QUnitTString[2])))
      • Set QExp[2] = 200
      • Set QGold[2] = 20
      • Set QRewardS[2] = |cff800080+1000XP|r|n|cffffcc00+200G|r


  • Qget
    • Events
      • Player - Player 1 (Red) Selects a unit
      • Player - Player 2 (Blue) Selects a unit
      • Player - Player 3 (Teal) Selects a unit
      • Player - Player 4 (Purple) Selects a unit
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Triggering unit) Equal to Chansey 0038 <gen>
          • (Triggering unit) Equal to Chansey 0053 <gen>
    • Actions
      • Set QEffect = <Empty String>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to Chansey 0038 <gen>
        • Then - Actions
          • Set Qnumber = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Triggering unit) Equal to Chansey 0053 <gen>
        • Then - Actions
          • Set Qnumber = 2
        • Else - Actions
      • Custom script: set udg_LocalPlayer = GetLocalPlayer()
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • LocalPlayer Equal to Player 1 (Red)
              • LocalPlayer Equal to Player 2 (Blue)
              • LocalPlayer Equal to Player 3 (Teal)
              • LocalPlayer Equal to Player 4 (Purple)
        • Then - Actions
          • Unit Group - Pick every unit in (Units owned by LocalPlayer matching (((Matching unit) is selected by LocalPlayer) Equal to True)) and do (Actions)
            • Loop - Actions
              • Set QPickUnit = (Picked unit)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • QXint[Qnumber] Equal to 0
                  • (Qquest[Qnumber] is enabled) Equal to False
                  • ((Region centered at (Position of QGiver[Qnumber]) with size (400.00, 400.00)) contains QPickUnit) Equal to True
            • Then - Actions
              • Sound - Play QuestNew <gen>
              • Sound - Destroy (Last played sound)
              • Set QXint[Qnumber] = 1
              • Unit - Order QPickUnit to Hold Position
              • Unit - Make QPickUnit face QGiver[Qnumber] over 0.30 seconds
              • Set QRewardBool[Qnumber] = 0
              • Quest - Enable Qquest[Qnumber]
              • Cinematic - Turn on letterbox mode (hide interface) for (Player group(LocalPlayer)): fade out over 0.20 seconds
              • Cinematic - Send transmission to (Player group(LocalPlayer)) from QGiver[Qnumber] named Chansey: Play No sound and display QTalk1[Qnumber]. Modify duration: Add 1.00 seconds and Wait
              • Sound - Play Hint <gen>
              • Game - Display to (Player group(LocalPlayer)) for 10.00 seconds the text: |cff00ff00-NEW QUES...
              • Game - Display to (Player group(LocalPlayer)) for 10.00 seconds the text: ( + QTalk2[Qnumber])
              • Cinematic - Turn off letterbox mode (show interface) for (Player group(LocalPlayer)): fade in over 0.50 seconds
              • Special Effect - Destroy QSpecial[Qnumber]
              • Special Effect - Create a special effect attached to the overhead of QGiver[Qnumber] using Objects\RandomObject\RandomObject.mdl
              • Set QSpecial[Qnumber] = (Last created special effect)
              • Selection - Select QPickUnit for LocalPlayer
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • QXint[Qnumber] Equal to 1
              • QRewardBool[Qnumber] Equal to 1
              • (Qquest[Qnumber] is enabled) Equal to True
              • (Qquest[Qnumber] is completed) Equal to True
              • ((Region centered at (Position of QGiver[Qnumber]) with size (400.00, 400.00)) contains QPickUnit) Equal to True
            • Then - Actions
              • Sound - Play QuestCompleted <gen>
              • Sound - Destroy (Last played sound)
              • Set QKills[Qnumber] = 0
              • Set QXint[Qnumber] = 0
              • Unit - Order QPickUnit to Hold Position
              • Unit - Make QPickUnit face QGiver[Qnumber] over 0.30 seconds
              • Set QRewardBool[Qnumber] = 0
              • Quest - Disable Qquest[Qnumber]
              • Quest - Mark Qquest[Qnumber] as Incomplete
              • Special Effect - Destroy QSpecial[Qnumber]
              • Cinematic - Turn on letterbox mode (hide interface) for (Player group(LocalPlayer)): fade out over 0.00 seconds
              • Cinematic - Send transmission to (Player group(LocalPlayer)) from QGiver[Qnumber] named Chansey: Play No sound and display Good Job!. Modify duration: Add 0.00 seconds and Wait
              • Game - Display to (Player group(LocalPlayer)) for 5.00 seconds the text: |cff00ff00-QUEST CO...
              • Sound - Play GoodJob <gen>
              • Sound - Destroy (Last played sound)
              • Cinematic - Turn off letterbox mode (show interface) for (Player group(LocalPlayer)): fade in over 0.00 seconds
              • Floating Text - Create floating text that reads QRewardS[Qnumber] at ((Position of QPickUnit) offset by (-40.00, 0.00)) with Z offset 140.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
              • Set QFText[Qnumber] = (Last created floating text)
              • Floating Text - Change QFText[Qnumber]: Disable permanence
              • Floating Text - Change the lifespan of QFText[Qnumber] to 2.50 seconds
              • Floating Text - Change the fading age of QFText[Qnumber] to 2.00 seconds
              • Selection - Select QPickUnit for LocalPlayer
              • Hero - Add QExp[Qnumber] experience to QPickUnit, Show level-up graphics
              • Special Effect - Create a special effect at (Position of QPickUnit) using Abilities\Spells\Other\Levelup\LevelupCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Special Effect - Create a special effect attached to the overhead of QGiver[Qnumber] using Abilities\Spells\Other\TalkToMe\TalkToMe.mdl
              • Set QSpecial[Qnumber] = (Last created special effect)
            • Else - Actions
        • Else - Actions


  • QKill
    • Events
      • Unit - A unit Dies
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Unit-type of (Dying unit)) Equal to Peasant
          • (Unit-type of (Dying unit)) Equal to Peon
    • Actions
      • Set QPGroup = (Player group((Owner of (Killing unit))))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Qquest[1] is enabled) Equal to True
          • (Unit-type of (Dying unit)) Equal to Peasant
          • ((Killing unit) is A Hero) Equal to True
        • Then - Actions
          • Set Qnumber = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Qquest[2] is enabled) Equal to True
          • (Unit-type of (Dying unit)) Equal to Peon
          • ((Killing unit) is A Hero) Equal to True
        • Then - Actions
          • Set Qnumber = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Qquest[Qnumber] is enabled) Equal to True
          • (Qquest[Qnumber] is completed) Equal to False
          • QKills[Qnumber] Less than or equal to QMonsterCount[Qnumber]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Dying unit)) Equal to QUnitTypeDying[Qnumber]
            • Then - Actions
              • Set QKills[Qnumber] = (QKills[Qnumber] + 1)
              • Set QStringKill = ((String(QKills[Qnumber])) + (/ + ((String(QMonsterCount[Qnumber])) + ( + (QUnitTString[Qnumber] + Killed)))))
              • Game - Display to (Player group((Owner of (Killing unit)))) for 2.00 seconds the text: QStringKill
            • Else - Actions
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Qquest[Qnumber] is enabled) Equal to True
          • (Qquest[Qnumber] is completed) Equal to False
          • QKills[Qnumber] Equal to QMonsterCount[Qnumber]
        • Then - Actions
          • Set QRewardBool[Qnumber] = 1
          • Quest - Mark Qquest[Qnumber] as Completed
        • Else - Actions
      • Custom script: call DestroyForce(udg_QPGroup)
 
Level 17
Joined
Mar 21, 2011
Messages
1,597
your triggers look way too complicated. try to do it step by step. ignore the cinematic and effects and try to get it work first.
what do you have to do to finish the quest? that would be important to know. kill some creeps? collect items?
 
Status
Not open for further replies.
Top