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

Ending A Game

Status
Not open for further replies.
Level 7
Joined
Mar 5, 2009
Messages
254
Unit - a unit dies
Unit type of dying unit equal to - ENEMY BUILDING
For each integer from 5 to 10
Game defeat - player integer A

In this case if u want to defeat players 5-10 do this,if u want to defeat different players just change the numbers 5 and 10.
 
Level 4
Joined
Apr 11, 2012
Messages
66
Unit - a unit dies
Unit type of dying unit equal to - ENEMY BUILDING
For each integer from 5 to 10
Game defeat - player integer A

In this case if u want to defeat players 5-10 do this,if u want to defeat different players just change the numbers 5 and 10.

can u post an picture of that triggers ?
 
Level 3
Joined
Sep 30, 2011
Messages
60
like this?
  • Defeat
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to (TEAM 1 BUILDING)
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Game - Defeat (Player((Integer A))) with the message: Defeat!
      • For each (Integer B) from 7 to 12, do (Actions)
        • Loop - Actions
          • Game - Victory (Player((Integer B))) (Show dialogs, Show scores)
 
Level 5
Joined
Jan 12, 2010
Messages
132
  • Add to group
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to Player_group
      • Player Group - Add Player 2 (Blue) to Player_group
  • Game end
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Town Hall
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in Player_group[1]) Equal to True
          • (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
        • Then - Actions
          • Player Group - Pick every player in Player_group[1] and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
          • Player Group - Pick every player in Player_group[2] and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: Defeat!
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in Player_group[2]) Equal to True
          • (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
        • Then - Actions
          • Player Group - Pick every player in Player_group[2] and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
          • Player Group - Pick every player in Player_group[1] and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: Defeat!
        • Else - Actions
 
Level 4
Joined
Apr 11, 2012
Messages
66
like this?
  • Defeat
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Triggering unit) Equal to (TEAM 1 BUILDING)
    • Actions
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • Game - Defeat (Player((Integer A))) with the message: Defeat!
      • For each (Integer B) from 7 to 12, do (Actions)
        • Loop - Actions
          • Game - Victory (Player((Integer B))) (Show dialogs, Show scores)

yeah like that one
do i need to create just 1 trigger ?
or trigger for team 1 and team 2 ?
 
Level 5
Joined
Jan 12, 2010
Messages
132
You can do it in one trigger or into one trigger.Use "If then else action"
But if you use my trigger is much more easier to use or adapt to your action.
Is more flexible to work with many players in group then using loop action.
Ex: Player 1 ,Player 3 and Player 5 are ally
This means loop action wont work properly.
And also my trigger is faster.
 
Level 4
Joined
Apr 11, 2012
Messages
66
  • Add to group
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to Player_group
      • Player Group - Add Player 2 (Blue) to Player_group
  • Game end
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Town Hall
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in Player_group[1]) Equal to True
          • (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
        • Then - Actions
          • Player Group - Pick every player in Player_group[1] and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
          • Player Group - Pick every player in Player_group[2] and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: Defeat!
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Owner of (Killing unit)) is in Player_group[2]) Equal to True
          • (Owner of (Triggering unit)) Not equal to (Owner of (Killing unit))
        • Then - Actions
          • Player Group - Pick every player in Player_group[2] and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
          • Player Group - Pick every player in Player_group[1] and do (Actions)
            • Loop - Actions
              • Game - Defeat (Picked player) with the message: Defeat!
        • Else - Actions

Do i need to add all players in the Add Group trigger ?
 
Level 5
Joined
Jan 12, 2010
Messages
132
Do i need to add all players in the Add Group trigger ?

Only the players that are playing
Ex. Player_group1 is team one.Add al players of team 1 to this group.
Did u got the ideea?

EDIT
Hand written sry for that mistake
  • Add to group
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Add Player 1 (Red) to Player_group[1]
      • Player Group - Add Player 2 (Blue) to Player_group[2]
 
Level 4
Joined
Apr 11, 2012
Messages
66
i can do it for a rep+

questions

1, when the building dies should the killing player win or his allied to? if yes tell wich players it is

2. describe the auto cast more

1.when the building dies his allied will win too

2.when an unit is attack it will cast an skill to the enemy
example :
when the neautral hostile unit is attack by a player neautral hostile unit will cast an skill on the player

i want to cast brutal lord spell when the unit is attack by a player
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
victory trigger
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to BASE
    • Actions
      • Set Player_group = (All allies of (Player((Player number of (Owner of (Killing unit))))))
      • Player Group - Pick every player in Player_group and do (Actions)
        • Loop - Actions
          • Game - Victory (Picked player) (Show dialogs, Show scores)

auto cast on attack trigger
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacked unit)) Equal to Neutral Hostile
    • Actions
      • Unit - Order (Attacked unit) to Human Sorceress - Polymorph (Triggering unit)
note to use your spell insted of polymorph


you should read some GUI tutorials also it will help you to do it on your own

http://www.hiveworkshop.com/forums/tutorial-submission-283/darkgroms-gui-tutorial-begginers-214275/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basic-triggering-5885/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basics-triggers-32113/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/starting-gui-64286/
 
Level 4
Joined
Apr 11, 2012
Messages
66
victory trigger
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to BASE
    • Actions
      • Set Player_group = (All allies of (Player((Player number of (Owner of (Killing unit))))))
      • Player Group - Pick every player in Player_group and do (Actions)
        • Loop - Actions
          • Game - Victory (Picked player) (Show dialogs, Show scores)

auto cast on attack trigger
  • Untitled Trigger 002
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacked unit)) Equal to Neutral Hostile
    • Actions
      • Unit - Order (Attacked unit) to Human Sorceress - Polymorph (Triggering unit)
note to use your spell insted of polymorph


you should read some GUI tutorials also it will help you to do it on your own

http://www.hiveworkshop.com/forums/tutorial-submission-283/darkgroms-gui-tutorial-begginers-214275/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basic-triggering-5885/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/basics-triggers-32113/
http://www.hiveworkshop.com/forums/trigger-gui-editor-tutorials-279/starting-gui-64286/

i cant find the skill that i want to cast by the unit
 
Level 4
Joined
Apr 11, 2012
Messages
66
victory trigger
  • Untitled Trigger 001
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to BASE
    • Actions
      • Set Player_group = (All allies of (Player((Player number of (Owner of (Killing unit))))))
      • Player Group - Pick every player in Player_group and do (Actions)
        • Loop - Actions
          • Game - Victory (Picked player) (Show dialogs, Show scores)

i cant make the action of
  • Untitled Trigger 001
    • Actions
    • Set Player_group = (All allies of (Player((Player number of (Owner of (Killing unit))))))
 
Status
Not open for further replies.
Top