Difficulty with victory trigger

Avaleirra

Is back. Probably.
Reaction score
128
Hey guys, I'm having some trouble creating a victory trigger for my map and was wondering if I could get sone help.



There are 3 forces in my map and each have a boss. I wish to make it so that when 2 of the bosses die the other force wins.

Forces are:

1) red, purple, yellow, orange
2) blue, green, pink, grey
3) teal, light blue, dark green, brown


Thanks :).
 

Raizn

New Member
Reaction score
2
so if boss A will die force A will lose. if boss B will die Force B will lose. And if Force Boss A and B are dead Force C wins. is that correct ? or want you the force without boss still play the game ?
 

Raizn

New Member
Reaction score
2
Only tested in WE. But maybe thats what you asked for. if not just ignore it^^

Trigger:
  • Win1
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (Unit-type of Boss1 <gen>)
    • Actions
      • Game - Display to (All players) the text: Team X lost.
      • Game - Defeat Player 2 (Blue) with the message: Defeat!
      • Player Group - Pick every player in (All allies of Player 2 (Blue)) and do (Actions)
        • Loop - Actions
          • Game - Defeat (Picked player) with the message: Defeat!


Trigger:
  • Win2
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (Unit-type of Boss2 <gen>)
    • Actions
      • Game - Display to (All players) the text: Team Y lost.
      • Game - Defeat Player 3 (Teal) with the message: Defeat!
      • Player Group - Pick every player in (All allies of Player 3 (Teal)) and do (Actions)
        • Loop - Actions
          • Game - Defeat (Picked player) with the message: Defeat!


Trigger:
  • Win3
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Dying unit)) Equal to (Unit-type of Boss3 <gen>)
    • Actions
      • Game - Defeat Player 1 (Red) with the message: Defeat!
      • Player Group - Pick every player in (All allies of Player 1 (Red)) and do (Actions)
        • Loop - Actions
          • Game - Defeat (Picked player) with the message: Defeat!


Trigger:
  • Win4
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Unit-type of (Dying unit)) Equal to (Unit-type of Boss1 <gen>)) or (((Unit-type of (Dying unit)) Equal to (Unit-type of Boss2 <gen>)) or (((Unit-type of (Dying unit)) Equal to (Unit-type of Boss3 <gen>)) and (((Dying unit) belongs to an enemy of (Owner of (Killing unit))) Equal to True)))
    • Actions
      • Set Killer[(Player number of (Owner of (Killing unit)))] = (Killer[(Player number of (Owner of (Killing unit)))] + 1)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Killer[(Player number of (Owner of (Killing unit)))] Equal to 2
        • Then - Actions
          • Game - Victory (Owner of (Killing unit)) (Show dialogs, Show scores)
          • Player Group - Pick every player in (All allies of (Owner of (Killing unit))) and do (Actions)
            • Loop - Actions
              • Game - Victory (Picked player) (Show dialogs, Show scores)
        • Else - Actions


bye
raizn
 

kingkwong92

Well-Known Member
Reaction score
25
A unit dies

unit equal to boss

set boss_group = all units matching (unit type of matching unit equal to boss)

If number of boss less than 2 then
victory to owner of random unit in boss_group

Edit!! Did you have to repeat yourself so much Raizn? You could have made it simpler.

This won't work if the last two bosses die at the same time.
I'm not sure if you wanted boss A to die and force A losses or not. This way when a boss dies the force hasn't been defeated yet so they can gang up on the other force. If you want boss A dies and force A losses and ......

unit dies

unit equal to boss

pick every player matching ( matching player is an ally of triggering unit)
loop
game defeat picked player
 

Avaleirra

Is back. Probably.
Reaction score
128
@Raizn
I'l try it out

@kingkwong92
1. all bosses are different units
2. I have defeat triggers done already :)


EDIT:
@Raizn
Would your last trigger make it so that 1 team would have to kill 2 bosses in order to win?
 

Avaleirra

Is back. Probably.
Reaction score
128
Oh, hehe :p oops.

EDIT:
wait.... what if this happens

force 1 kills force 2

force 3 kills force 1

would it still work?


EDIT2:

Didn't work


EDIT3:

lied...
 
General chit-chat
Help Users

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top