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

rescue quest

Status
Not open for further replies.
Level 20
Joined
Feb 23, 2014
Messages
1,264
You mean the quest update message telling the player that he saved, for example, 1 out of 4 units?

You need to have an integer variable to track how many of the unit groups were saved. Once a unit group is saved, add 1 to the value of that variable:
  • Set <IntegerVariable> = (<IntegerVariable> + 1) // use Set Variable action
As for the message/quest log update, the easiest way to do it would be to use a bunch of If/Then/Else blocks, where depending on the value of the integer variable you have different messages and quest requirement updates:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • <IntegerVariable Equal> to <Value>
    • Then - Actions
      • Quest - Change the description of <QuestRequirementVariable> to <Updated Text>
      • Quest - Display to (All players) the Quest Update message: <Quest Message>
    • Else - Actions
Obviously you have to have your quest requirement bound to an appropriate variable and the final If/Then/Else block (one where all units are saved) should be different to reflect that the quest was completed - i.e. instead of just updating the description and sending a quest message, it should also complete the quest and so on.
 
Level 25
Joined
Sep 26, 2009
Messages
2,378
I'll just add that you can make unit rescuable via the trigger action "Unit - Make rescuable". As arguments you set which unit shall be rescuable and by which player (group) can it be rescued.
A rescued unit will fire a generic unit event "A unit is rescued" - in this case the (Triggering unit) is the rescued unit, so you can use the (Triggering unit) for some conditions (like unit-type comparison, etc.)

  • Unit - Make Your_unit Rescuable by Player Group - Player 1 (Red)
  • Rescue
    • Events
      • Unit - A unit Is rescued
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • -------- execute quest actions --------
 
Status
Not open for further replies.
Top