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

a rescue mission

Status
Not open for further replies.

C0j

C0j

Level 2
Joined
Apr 19, 2022
Messages
2
i wanted to replicate the mission on warcraft 2 of rescuing units and placing them in a region to trigger a victory condition and i dont know how to do i would like a help
 

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,877
You'll have to go into greater detail if you want the correct solution but here's the general idea:
  • Rescue Example
    • Events
      • Unit - A unit enters RescueMe <gen>
    • Conditions
      • (Triggering unit) Equal to Knight 0003 <gen>
    • Actions
      • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
Here's a more advanced version that works for multiple units. In this example I have a Footman, Knight, and Rifleman that need to be rescued and brought to the Region to win. All 3 must be standing in the region at the same time:
  • Rescue Unit
    • Events
      • Unit - A unit owned by Player 2 (Blue) Is rescued
    • Conditions
    • Actions
      • Unit Group - Add (Triggering unit) to RescueGroup
  • Rescue Region
    • Events
      • Unit - A unit enters RescueMe <gen>
    • Conditions
      • ((Triggering unit) is in RescueGroup.) Equal to True
    • Actions
      • -------- Region related conditions can be buggy and this Wait helps fix that: --------
      • Wait 0.00 game-time seconds
      • -------- --------
      • -------- Check if all 3 units are in the region: --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in RescueGroup) Equal to 3
        • Then - Actions
          • Set VariableSet RescueSuccess = True
          • Unit Group - Pick every unit in RescueGroup and do (Actions)
            • Loop - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (RescueMe <gen> contains (Picked unit)) Equal to False
                • Then - Actions
                  • Set VariableSet RescueSuccess = False
                • Else - Actions
          • -------- --------
          • -------- If they were then trigger a victory: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • RescueSuccess Equal to True
            • Then - Actions
              • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
            • Else - Actions
        • Else - Actions
Again, without details it's hard to come up with a proper solution.
 

Attachments

  • Rescue Example.w3m
    17.6 KB · Views: 15

C0j

C0j

Level 2
Joined
Apr 19, 2022
Messages
2
i got lost in the trigger editor for a bit until i got it
this actually worked thank you:thumbs_up::thumbs_up:
 
Status
Not open for further replies.
Top