• 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.

Dialog Quest Error

Status
Not open for further replies.
Level 11
Joined
Jul 9, 2009
Messages
927
Apparently, My Quest System for my map uses dialogs, And this error states that my hero is not suitable for the quest but My character is the Requirement. I have set in a lvl 12 Samurai and 200 Kills but still it does not work anyone can check my triggers ?
The Error Occurs on this part here
  • (Unit-type of (Picked unit)) Not equal to Samurai
  • Then - Actions
  • Item - Remove (Item carried by (Hero manipulating item) of type Headhunter Job Change)
  • Game - Display to (Player group((Triggering player))) the text: Your class cannot c...
  • StoH Trigger
    • Events
      • Dialog - A dialog button is clicked for STOH
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of Samurai Practicer 0003 <gen>) matching ((Owner of (Picked unit)) Equal to Player 1 (Red))) and do (Actions)
        • Loop - Actions
          • Set ClassChangeItems = (Region centered at (Position of (Picked unit)) with size (500.00, 500.00))
          • Set ClassChangeExp = (Hero experience of (Picked unit))
          • Set HeroAttribute[1] = (Strength of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[2] = (Agility of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[3] = (Intelligence of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[4] = (Unspent skill points of (Picked unit))
          • Set ClassChangeLevel = (Hero level of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Not equal to Samurai
            • Then - Actions
              • Item - Remove (Item carried by (Hero manipulating item) of type Headhunter Job Change)
              • Game - Display to (Player group((Triggering player))) the text: Your class cannot c...
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Clicked dialog button) Equal to StoHDialogButton[1]
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • And - All (Conditions) are true
                • Conditions
                  • ClassChangeLevel Greater than or equal to 12
                  • (Unit-type of (Picked unit)) Equal to Samurai
                  • ((Owner of (Picked unit)) Current lumber) Greater than or equal to 200
            • Then - Actions
              • Trigger - Turn on StoH Quest Spider <gen>
              • Trigger - Turn on StoH Quest Treant <gen>
              • Trigger - Turn on StoH Monster Essence <gen>
              • Trigger - Turn on StoH Quest Gnoll <gen>
              • Trigger - Turn on StoH Quest Satyr <gen>
              • Game - Display to (Player group((Owner of (Picked unit)))) the text: (|cff80ff80Accepted the Quest "Headhunter Job Change" + !)
              • Set StoHInit[1] = Current
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • StoHInit[1] Equal to Current
                • Then - Actions
                  • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80You have already accepted this quest + !)
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Picked unit)) Not equal to Samurai
                    • Then - Actions
                      • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80Your Class does not support this quest + !)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • ClassChangeLevel Less than 12
                        • Then - Actions
                          • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80Your level is too low for this quest + !)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ((Owner of (Picked unit)) Current lumber) Less than 200
                            • Then - Actions
                              • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80Your kill count is not enough + !)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Clicked dialog button) Equal to StoHDialogButton[2]
                                • Then - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • Or - Any (Conditions) are true
                                        • Conditions
                                          • StoHSpiderKill[1] Not equal to 10
                                          • StoHTreantKill[1] Not equal to 10
                                          • StoHSatyrKill[1] Not equal to 10
                                          • StoHGnollKill[1] Not equal to 10
                                          • StoHMEKill[1] Not equal to 5
                                    • Then - Actions
                                      • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80You dont have the needed items for the quest + !)
                                    • Else - Actions
                                      • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
                                        • Loop - Actions
                                          • Item - Remove (Item carried by (Hero manipulating item) of type Headhunter Job Change)
                                          • Hero - Drop the item from slot 1 of (Picked unit)
                                          • Hero - Drop the item from slot 2 of (Picked unit)
                                          • Hero - Drop the item from slot 3 of (Picked unit)
                                          • Hero - Drop the item from slot 4 of (Picked unit)
                                          • Hero - Drop the item from slot 5 of (Picked unit)
                                          • Hero - Drop the item from slot 6 of (Picked unit)
                                          • Unit - Remove (Picked unit) from the game
                                          • Unit - Create 1 Headhunter for (Owner of (Picked unit)) at (Center of ClassChangeItems) facing Default building facing degrees
                                          • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
                                          • Special Effect - Destroy (Last created special effect)
                                          • Hero - Modify Strength of (Last created unit): Set to HeroAttribute[1]
                                          • Hero - Modify Agility of (Last created unit): Set to HeroAttribute[2]
                                          • Hero - Modify Intelligence of (Last created unit): Set to HeroAttribute[3]
                                          • Hero - Modify unspent skill points of (Last created unit): Set to HeroAttribute[4] points
                                          • Hero - Set (Last created unit) Hero-level to ClassChangeLevel, Hide level-up graphics
                                          • Hero - Set (Last created unit) experience to ClassChangeExp, Hide level-up graphics
                                          • Selection - Select (Last created unit) for (Owner of (Last created unit))
                                          • Item - Pick every item in ClassChangeItems and do (Actions)
                                            • Loop - Actions
                                              • Hero - Create (Item-type of (Picked item)) and give it to (Last created unit)
                                              • Item - Remove (Picked item)
                                • Else - Actions
        • Else - Actions
Thanks :)
 
Level 11
Joined
Jul 9, 2009
Messages
927
Oh is that it ? And how do I remove leaks ? xD

EDIT:
The Error now begins where the checking of the requirement happens.
 
You haven't shown all the triggers since I see other 5 triggers that are being executed here someway.

Ye error at beginging :D
  • Unit Group - Pick every unit in (Units within 512.00 of (Position of Samurai Practicer 0003 <gen>) matching ((Owner of (Picked unit)) Equal to Player 1 (Red))) and do (Actions)
((Owner of (Picked unit)) Equal to Player 1 (Red))) Returns null. It should be Matching unit instead.

Anyways, your trigger can be improved a lot. Give me 5 minutes.
  • Item - Remove (Item carried by (Hero manipulating item) of type Headhunter Job Change)
This retuns null too, reference (Hero manipulating item) is wrong, better use (Picked unit).

Note: You have to learn how to use proper references ect.

EDIT Try:
  • StoH Trigger
    • Events
      • Dialog - A dialog button is clicked for STOH
    • Conditions
    • Actions
      • Set tempp1 = (Position of Samurai Practicer 0003 <gen>)
      • Set tempforce = (PlayerGroup(Triggering player))
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 512.00 of tempp1 matching ((Owner of (Matching unit)) Equal to Player 1 (Red))) and do (Actions)
        • Loop - Actions
          • Set tempp2 = (Position of (Picked unit))
          • Set ClassChangeItems = (Region centered at tempp2) with size (500.00, 500.00))
          • Set ClassChangeExp = (Hero experience of (Picked unit))
          • Set HeroAttribute[1] = (Strength of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[2] = (Agility of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[3] = (Intelligence of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[4] = (Unspent skill points of (Picked unit))
          • Set ClassChangeLevel = (Hero level of (Picked unit))
          • Custom script: call RemoveLocation(udg_tempp2)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Picked unit)) Not equal to Samurai
            • Then - Actions
              • Item - Remove (Item carried by (Picked unit) of type Headhunter Job Change)
              • Game - Display to tempforce the text: Your class cannot c...
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to StoHDialogButton[1]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • ClassChangeLevel Greater than or equal to 12
                  • (Unit-type of (Picked unit)) Equal to Samurai
                  • ((Owner of (Picked unit)) Current lumber) Greater than or equal to 200
                • Then - Actions
                  • Trigger - Turn on StoH Quest Spider <gen>
                  • Trigger - Turn on StoH Quest Treant <gen>
                  • Trigger - Turn on StoH Monster Essence <gen>
                  • Trigger - Turn on StoH Quest Gnoll <gen>
                  • Trigger - Turn on StoH Quest Satyr <gen>
                  • Set tempforce2 = (Player group(Owner of (Picked unit)))
                  • Game - Display to tempforce2the text: (|cff80ff80Accepted the Quest "Headhunter Job Change" + !)
                  • Custom script: call DestroyForce(udg_tempforce2)
                  • Set StoHInit[1] = Current
                • Else - Actions
                  • < your else actions >
      • Custom script: call RemoveLocation(udg_tempp1)
      • Custom script: call DestroyForce(udg_tempforce)
I haven't written Else actions because I dont knwo what you are trying to achieve.
But for egzample, instead of removing items from 6 slots manually you can use loop:
  • For each Integer A from 1 to 6 do Actions
    • Loop - Actions
      • Hero - Drop the item from slot (Integer A) of (<your unit>)
When you elaborate subject, I can help you with the rest of the trigger.
 
Last edited:
Level 11
Joined
Jul 9, 2009
Messages
927
ok and here are the other triggers

  • Samurai to Headhunter Dialog
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set StoHInit[1] = Available
      • Set StoHInit[2] = Available
      • Dialog - Create a dialog button for STOH labelled Accept Quest
      • Set StoHDialogButton[1] = (Last created dialog Button)
      • Dialog - Create a dialog button for STOH labelled Accomplish Quest
      • Set StoHDialogButton[2] = (Last created dialog Button)
  • StoH Init
    • Events
      • Unit - A unit Acquires an item
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Hero manipulating item) has an item of type Headhunter Job Change) Equal to True
        • Then - Actions
          • Dialog - Show STOH for (Owner of (Hero manipulating item))
          • Item - Remove (Item carried by (Hero manipulating item) of type Headhunter Job Change)
        • Else - Actions
  • StoH Trigger
    • Events
      • Dialog - A dialog button is clicked for STOH
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units within 512.00 of (Position of Samurai Practicer 0003 <gen>) matching ((Owner of (Picked unit)) Equal to Player 1 (Red))) and do (Actions)
        • Loop - Actions
          • Set ClassChangeItems = (Region centered at (Position of (Picked unit)) with size (500.00, 500.00))
          • Set ClassChangeExp = (Hero experience of (Picked unit))
          • Set HeroAttribute[1] = (Strength of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[2] = (Agility of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[3] = (Intelligence of (Picked unit) (Exclude bonuses))
          • Set HeroAttribute[4] = (Unspent skill points of (Picked unit))
          • Set ClassChangeLevel = (Hero level of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to StoHDialogButton[1]
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • And - All (Conditions) are true
                    • Conditions
                      • ClassChangeLevel Greater than or equal to 12
                      • (Unit-type of (Picked unit)) Equal to Samurai
                      • ((Owner of (Picked unit)) Current lumber) Greater than or equal to 200
                • Then - Actions
                  • Trigger - Turn on StoH Quest Spider <gen>
                  • Trigger - Turn on StoH Quest Treant <gen>
                  • Trigger - Turn on StoH Monster Essence <gen>
                  • Trigger - Turn on StoH Quest Gnoll <gen>
                  • Trigger - Turn on StoH Quest Satyr <gen>
                  • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80Accepted the Quest "Headhunter Job Change" + !)
                  • Set StoHInit[1] = Current
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • StoHInit[1] Equal to Current
                    • Then - Actions
                      • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80You have already accepted this quest + !)
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Picked unit)) Not equal to Samurai
                        • Then - Actions
                          • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80Your Class does not support this quest + !)
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • ClassChangeLevel Less than 12
                            • Then - Actions
                              • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80Your level is too low for this quest + !)
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • ((Owner of (Picked unit)) Current lumber) Less than 200
                                • Then - Actions
                                  • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80Your kill count is not enough + !)
                                • Else - Actions
                                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                    • If - Conditions
                                      • (Clicked dialog button) Equal to StoHDialogButton[2]
                                    • Then - Actions
                                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                        • If - Conditions
                                          • Or - Any (Conditions) are true
                                            • Conditions
                                              • StoHSpiderKill[1] Not equal to 10
                                              • StoHTreantKill[1] Not equal to 10
                                              • StoHSatyrKill[1] Not equal to 10
                                              • StoHGnollKill[1] Not equal to 10
                                              • StoHMEKill[1] Not equal to 5
                                        • Then - Actions
                                          • Game - Display to (Player group((Triggering player))) the text: (|cff80ff80You dont have the needed items for the quest + !)
                                        • Else - Actions
                                          • Unit Group - Pick every unit in (Units owned by Player 1 (Red)) and do (Actions)
                                            • Loop - Actions
                                              • Item - Remove (Item carried by (Hero manipulating item) of type Headhunter Job Change)
                                              • Hero - Drop the item from slot 1 of (Picked unit)
                                              • Hero - Drop the item from slot 2 of (Picked unit)
                                              • Hero - Drop the item from slot 3 of (Picked unit)
                                              • Hero - Drop the item from slot 4 of (Picked unit)
                                              • Hero - Drop the item from slot 5 of (Picked unit)
                                              • Hero - Drop the item from slot 6 of (Picked unit)
                                              • Unit - Remove (Picked unit) from the game
                                              • Unit - Create 1 Headhunter for (Owner of (Picked unit)) at (Center of ClassChangeItems) facing Default building facing degrees
                                              • Special Effect - Create a special effect attached to the origin of (Last created unit) using Abilities\Spells\Human\Resurrect\ResurrectTarget.mdl
                                              • Special Effect - Destroy (Last created special effect)
                                              • Hero - Modify Strength of (Last created unit): Set to HeroAttribute[1]
                                              • Hero - Modify Agility of (Last created unit): Set to HeroAttribute[2]
                                              • Hero - Modify Intelligence of (Last created unit): Set to HeroAttribute[3]
                                              • Hero - Modify unspent skill points of (Last created unit): Set to HeroAttribute[4] points
                                              • Hero - Set (Last created unit) Hero-level to ClassChangeLevel, Hide level-up graphics
                                              • Hero - Set (Last created unit) experience to ClassChangeExp, Hide level-up graphics
                                              • Selection - Select (Last created unit) for (Owner of (Last created unit))
                                              • Item - Pick every item in ClassChangeItems and do (Actions)
                                                • Loop - Actions
                                                  • Hero - Create (Item-type of (Picked item)) and give it to (Last created unit)
                                                  • Item - Remove (Picked item)
                                    • Else - Actions
            • Else - Actions
  • StoH Quest Spider
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Owner of (Killing unit)) Equal to Player 1 (Red)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Unit-type of (Dying unit)) Equal to Spider
              • (Unit-type of (Dying unit)) Equal to Spitting Spider
              • (Unit-type of (Dying unit)) Equal to Giant Spider
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • StoHSpiderKill[1] Equal to 9
            • Then - Actions
              • Set StoHSpiderKill[1] = (StoHSpiderKill[1] + 1)
              • Game - Display to (Player group((Owner of (Killing unit)))) the text: (|cff80ff80Spider's [ + ((String(StoHSpiderKill[1])) + / 10 ]))
              • Trigger - Turn off (This trigger)
            • Else - Actions
              • Set StoHSpiderKill[1] = (StoHSpiderKill[1] + 1)
              • Game - Display to (Player group((Owner of (Killing unit)))) the text: (|cff80ff80Spider's [ + ((String(StoHSpiderKill[1])) + / 10 ]))
        • Else - Actions
All of the other triggers are just the same with the 4th trigger

Everything else worked after changing picked unit to matching unit.. thanks Spinnaker +rep
m073.gif

and if you can Improve my trigger please do so and I will give more rep later for your help xD
 
Level 11
Joined
Jul 9, 2009
Messages
927
test map? you mean my map, apparently there are too many unfinished business so I dont want to show it to the public yet xD
 
Level 11
Joined
Jul 9, 2009
Messages
927
Thanks Again Spinnaker, +rep :)
Apparently Im dropping the Items from the Samurai to give it to the New Hero Headhunter :)
 
Status
Not open for further replies.
Top