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

[Trigger] "Quest" question!!

Status
Not open for further replies.
Level 5
Joined
May 27, 2007
Messages
126
Hey!

I'm getting straight to business:

I.
I need help with finding a way to make "objectives" in a quest; in several RPG maps I found quests that have objectives as for example: x/y creeps killed (x=amount of killed monsters, y=required amount of monsters killed). I personally got not a single clue on how to make such objectives and how to actually count when a player (specific and non specific) fulfills to these objectives.

(Example casus:

"<text> kill 20 trolls!

0/20 trolls killed"

---- after you kill 1 troll ----

1/20 trolls killed

----- etc. ------ ")

II.
I need help with finding a way to make quests so, that when someone finished a quest, that specific quest is completed, and not "last created" quest. Cause that would mean that when you finish the quest just after someone "obtained" a new quest, that THAT new obtained quest would be signed as completed.

I hope someone could help me with point I, II or both.

Thanks sincerely,

Syntic
 
Level 18
Joined
Aug 23, 2008
Messages
2,319
I.
Every time you kill a foe, set KillCount (integer variable) to KillCount + 1. Then change the quest description to "((KillCount) + ((/20) + (foes killed)))". When KillCount = 20, you set the quest as completed.

II.
Once you create a quest, set it to a Quest variable. Then set the variable to completed.



It seems like you're not very known with variables yet. So I suggest you read the Variables Tutorial.
 
Level 6
Joined
Mar 15, 2005
Messages
112
  • Point1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Rat
    • Actions
      • -------- When you start the quest set it as a variable --------
      • -------- Then set the quest as complete --------
      • -------- If you use a wait "killing unit" will need to be set to a local unit variable. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 1 (Red)
        • Then - Actions
          • -------- Sets and interger variable counter --------
          • Set RatsKilled[1] = (RatsKilled[1] + 1)
          • -------- Text Substrings: The integer variable+/20 +Rats Killed. --------
          • Game - Display to Player Group - Player 1 (Red) the text: ((String(RatsKilled[1])) + (/20 + Rats killed.))
          • -------- Check if the integer viariable = 20 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RatsKilled[(Player number of (Owner of (Killing unit)))] Equal to 20
            • Then - Actions
              • Quest - Display to (Player group((Owner of (Killing unit)))) the Quest Update message: 20 Rats killed! Ret...
              • Quest - Mark RatQuest as Completed
              • -------- Add rewards etc here --------
              • Player - Add 200 to (Owner of (Killing unit)) Current gold
            • Else - Actions
        • Else - Actions
Hope this helps.
 
Level 5
Joined
May 27, 2007
Messages
126
  • Point1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Rat
    • Actions
      • -------- When you start the quest set it as a variable --------
      • -------- Then set the quest as complete --------
      • -------- If you use a wait "killing unit" will need to be set to a local unit variable. --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Killing unit)) Equal to Player 1 (Red)
        • Then - Actions
          • -------- Sets and interger variable counter --------
          • Set RatsKilled[1] = (RatsKilled[1] + 1)
          • -------- Text Substrings: The integer variable+/20 +Rats Killed. --------
          • Game - Display to Player Group - Player 1 (Red) the text: ((String(RatsKilled[1])) + (/20 + Rats killed.))
          • -------- Check if the integer viariable = 20 --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RatsKilled[(Player number of (Owner of (Killing unit)))] Equal to 20
            • Then - Actions
              • Quest - Display to (Player group((Owner of (Killing unit)))) the Quest Update message: 20 Rats killed! Ret...
              • Quest - Mark RatQuest as Completed
              • -------- Add rewards etc here --------
              • Player - Add 200 to (Owner of (Killing unit)) Current gold
            • Else - Actions
        • Else - Actions
Hope this helps.

Thanks, I made this part work, but I dont know how to implement it in a quest, that it actually counts in the quest and how to make the quest complete when its done. Maybe you could make an example quest of it too?

Thanks sincerely,

Syntic
 
Status
Not open for further replies.
Top