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

[Trigger] Will this work?

Status
Not open for further replies.
Level 9
Joined
Apr 23, 2010
Messages
312
I'm trying to create a revival system for my map that once you use a specific item, the game prompts you with a dialog window that lists all the dead players Heroes (1 per person). I can't test this for myself and am not sure if this actually will work or not, some help would be appreciated.


  • Ressurection Stone
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to Ressurection Stone
    • Actions
      • Dialog - Clear d_Ressurection_T1
      • Dialog - Clear d_Ressurection_T2
      • Dialog - Change the title of d_Ressurection_T1 to Who would you like ...
      • Dialog - Change the title of d_Ressurection_T2 to Who would you like ...
      • Player Group - Pick every player in Team1 and do (Actions)
        • Loop - Actions
          • Dialog - Hide d_Ressurection_T1 for (Picked player)
          • Dialog - Hide d_Ressurection_T2 for (Picked player)
          • Dialog - Create a dialog button for d_Ressurection_T1 labelled (Name of (Picked player))
      • Player Group - Pick every player in Team2 and do (Actions)
        • Loop - Actions
          • Dialog - Hide d_Ressurection_T1 for (Picked player)
          • Dialog - Hide d_Ressurection_T2 for (Picked player)
          • Dialog - Create a dialog button for d_Ressurection_T2 labelled (Name of (Picked player))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Triggering unit)) is an ally of Player 9 (Gray)) Equal to True
        • Then - Actions
          • Unit Group - Pick every unit in uga_All_Heroes[0] and do (Actions)
            • Loop - Actions
              • If (((Triggering unit) is alive) Equal to True) then do (Set i_Dialog_Temp = (i_Dialog_Temp + 1)) else do (Do nothing)
        • Else - Actions
          • Unit Group - Pick every unit in uga_All_Heroes[1] and do (Actions)
            • Loop - Actions
              • If (((Triggering unit) is alive) Equal to True) then do (Set i_Dialog_Temp = (i_Dialog_Temp + 1)) else do (Do nothing)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • i_Dialog_Temp Greater than 0
          • ((Owner of (Triggering unit)) is an ally of Player 9 (Gray)) Equal to True
        • Then - Actions
          • Set i_Dialog_Temp = 0
          • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) of type Commander) and do (Actions)
            • Loop - Actions
              • If (((Picked unit) is alive) Equal to False) then do (Dialog - Create a dialog button for d_Ressurection_T1 labelled (Name of (Picked player))) else do (Do nothing)
              • Set i_Dialog_Temp = (i_Dialog_Temp + 1)
              • Set i_Dialog_PN[i_Dialog_Temp] = (Player number of (Picked player))
              • Set dba_Ressurection[i_Dialog_Temp] = (Last created dialog Button)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • i_Dialog_Temp Greater than 0
            • Then - Actions
              • Dialog - Show d_Ressurection_T1 for (Owner of (Triggering unit))
            • Else - Actions
              • Hero - Create Ressurection Stone and give it to (Triggering unit)
        • Else - Actions
          • Set i_Dialog_Temp = 0
          • Unit Group - Pick every unit in (Units owned by (Owner of (Triggering unit)) of type Commander) and do (Actions)
            • Loop - Actions
              • If (((Picked unit) is alive) Equal to False) then do (Dialog - Create a dialog button for d_Ressurection_T2 labelled (Name of (Picked player))) else do (Do nothing)
              • Set i_Dialog_Temp = (i_Dialog_Temp + 1)
              • Set i_Dialog_PN[i_Dialog_Temp] = (Player number of (Picked player))
              • Set dba_Ressurection[i_Dialog_Temp] = (Last created dialog Button)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • i_Dialog_Temp Greater than 0
            • Then - Actions
              • Dialog - Show d_Ressurection_T2 for (Owner of (Triggering unit))
            • Else - Actions
              • Hero - Create Ressurection Stone and give it to (Triggering unit)
  • Chosen to Revive
    • Events
      • Dialog - A dialog button is clicked for d_Ressurection_T1
      • Dialog - A dialog button is clicked for d_Ressurection_T2
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 8, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Clicked dialog button) Equal to dba_Ressurection[(Integer A)]
            • Then - Actions
              • Hero - Instantly revive ua_Player_Hero[i_Dialog_PN[(Integer A)]] at (Center of (Playable map area)), Show revival graphics
            • Else - Actions
      • Game - Display to (All players) the text: ((Name of (Owner of (Reviving Hero))) + has been revived!)
      • Set i_Dialog_Temp = 0
 
Status
Not open for further replies.
Top