• 🏆 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!

multiple requirements quest

Status
Not open for further replies.
Level 6
Joined
Aug 27, 2013
Messages
103
i have quest to kill 4 different units, and after every kill i want to update it like they do it warcraft 3 campaigns (example):
Quest update
Quest name
- requirement 1 (completed)
- requirement 2
- requirement 3
I looked on demo campaign exodus of the horde, there is quest with 2 requirements and its pretty simple with "if then else" action if one is solved than show one display and if other one is solved it's reversed.
So, if i have 4 requirements do i need to make for every requirement 4 triggers, because of 4 different combinations and turn other triggers off when conditions is true, or there is any simplified solution
 
I think 1 trigger per requirement is enough, if I understand your question correctly. Why can't you just mark the quest requirement as completed when the quest unit dies?

  • Create Quest and Requirements
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Quest - Create a Required quest titled 1 with the description 2, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set Quest = (Last created quest)
      • Quest - Create a quest requirement for Quest with the description Requirement1
      • Set QR[1] = (Last created quest requirement)
      • Quest - Create a quest requirement for Quest with the description Requirement2
      • Set QR[2] = (Last created quest requirement)
      • Quest - Create a quest requirement for Quest with the description Requirement3
      • Set QR[3] = (Last created quest requirement)
      • Quest - Create a quest requirement for Quest with the description Requirement4
      • Set QR[4] = (Last created quest requirement)

  • Quest RQ 1
    • Events
      • Player - Player 1 (Red) types a chat message containing 1 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[1] as Completed

  • Quest RQ 2
    • Events
      • Player - Player 1 (Red) types a chat message containing 2 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[2] as Completed

  • Quest RQ 3
    • Events
      • Player - Player 1 (Red) types a chat message containing 3 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[3] as Completed

  • Quest RQ 4
    • Events
      • Player - Player 1 (Red) types a chat message containing 4 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[4] as Completed
 
Last edited:

Wrda

Spell Reviewer
Level 26
Joined
Nov 18, 2012
Messages
1,891
Apart from the first trigger, all others can be simplified with only one trigger:
  • Quest Req
    • Events
      • Player - Player 1 (Red) types a chat message containing <Empty String> as A substring
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Or - Any (Conditions) are true
            • Conditions
              • (Entered chat string) Equal to 1
              • (Entered chat string) Equal to 2
              • (Entered chat string) Equal to 3
              • (Entered chat string) Equal to 4
        • Then - Actions
          • Quest - Mark QR[(Integer((Entered chat string)))] as Completed
        • Else - Actions
Although it really depends on your needs. You can simply check which unit type died and then mark your quest requirement complete.
 
Level 6
Joined
Aug 27, 2013
Messages
103
I think 1 trigger per requirement is enough, if I understand your question correctly. Why can't you just mark the quest requirement as completed when the quest unit dies?

  • Create Quest and Requirements
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Quest - Create a Required quest titled 1 with the description 2, using icon path ReplaceableTextures\CommandButtons\BTNAmbush.blp
      • Set Quest = (Last created quest)
      • Quest - Create a quest requirement for Quest with the description Requirement1
      • Set QR[1] = (Last created quest requirement)
      • Quest - Create a quest requirement for Quest with the description Requirement2
      • Set QR[2] = (Last created quest requirement)
      • Quest - Create a quest requirement for Quest with the description Requirement3
      • Set QR[3] = (Last created quest requirement)
      • Quest - Create a quest requirement for Quest with the description Requirement4
      • Set QR[4] = (Last created quest requirement)

  • Quest RQ 1
    • Events
      • Player - Player 1 (Red) types a chat message containing 1 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[1] as Completed

  • Quest RQ 2
    • Events
      • Player - Player 1 (Red) types a chat message containing 2 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[2] as Completed

  • Quest RQ 3
    • Events
      • Player - Player 1 (Red) types a chat message containing 3 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[3] as Completed

  • Quest RQ 4
    • Events
      • Player - Player 1 (Red) types a chat message containing 4 as An exact match
    • Conditions
    • Actions
      • Quest - Mark QR[4] as Completed
i know how to mark quest requirements as completed and that stuff, i don't know how to set quest message when one of them die to mark it as completed but to show all other requirements completed or not.
 
Last edited:
Level 6
Joined
Aug 27, 2013
Messages
103
Can you post the message you're talking about?
|c00FFFF00OPTIONAL QUEST|r
Recruits
- Recruit Blackleg Logan
- Recruit Arania
- Recruit Bloodfang
- Recruit Kill'gull

So when for example Blackleg Logan dies i want it to show quest message as:
|c00FFFF00OPTIONAL QUEST|r
Recruits
- Recruit Blackleg Logan (completed)
- Recruit Arania
- Recruit Bloodfang
- Recruit Kill'gull

and after that for example when Bloodfang dies i want to show:
|c00FFFF00OPTIONAL QUEST|r
Recruits
- Recruit Blackleg Logan (completed)
- Recruit Arania
- Recruit Bloodfang (completed)
- Recruit Kill'gull

And so on
 
Level 13
Joined
May 10, 2009
Messages
868
String concatenation will probably help you a bit by doing something like this:
JASS:
set udg_QuestMessage = "|c00FFFF00OPTIONAL QUEST|r\nRecruit\n"

if udg_QuestRequirement[1] then // first requirement is completed
    set udg_QuestMessage = udg_QuestMessage + "- Recruit Blackleg Logan (completed)\n"
else
    udg_QuestMessage = udg_QuestMessage + "- Recruit Blackleg Logan\n"
endif

if udg_QuestRequirement[2] then
    set udg_QuestMessage = udg_QuestMessage + "- Recruit Arania (completed)\n"
else
    udg_QuestMessage = udg_QuestMessage + "- Recruit Arania\n"
endif
// etc...

// then display quest message using udg_QuestMessage var.
Sorry for not showing a perfect example, but I'm not at home and typed this on my phone. Also, you can easily do this in GUI.
 
Last edited:
Level 6
Joined
Aug 27, 2013
Messages
103
String concatenation will probably help you a bit by doing something like this:
JASS:
set udg_QuestMessage = "|c00FFFF00OPTIONAL QUEST|r|nRecruits|n"

if udg_QuestRequirement[1] then // first requirement is completed
    set udg_QuestMessage = udg_QuestMessage + "- Recruit Blackleg Logan (completed)|n"
else
    udg_QuestMessage = udg_QuestMessage + "- Recruit Blackleg Logan|n"
endif

if udg_QuestRequirement[2] then
    set udg_QuestMessage = udg_QuestMessage + "- Recruit Arania (completed)|n"
else
    udg_QuestMessage = udg_QuestMessage + "- Recruit Arania|n"
endif
// etc...

// then display quest message using udg_QuestMessage var.
Sorry for now showing a perfect example, but I'm not at home and typed this on my phone. Also, you can easily do this in GUI.
i would be grateful if you post in GUI,i don't use JASS
 
Status
Not open for further replies.
Top