HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Defeat conditions

05-23-2009, 12:48 PM#1
Vervekke
Hi all,

I'm busy atm to create a defeat trigger. The player will be defeated when all of his units (Buildings not included) dies.

This is what I have got and (need).

VARIABLE
HumansPlayer1 ------- Unit Group ------ Empty Unit Group Default


Triggername: HumansPlayer 1


EVENT
Time - Every 2.00 seconds of game time

CONDITION

ACTION
Unit Group - Add (Trained unit) to HumansPlayer1
(Need an action that add all player one units (Not buildings))


Triggername: Defeat


EVENT
Unit - A unit owned by Player 1 (Red) Dies

CONDITION
All units of HumansPlayer1 are dead) Equal to True

ACTION
(Need an action that add tells the player that his has been defeated)

Is this the right way or is there another easier way to do this.

Regars,

Joris
05-23-2009, 01:06 PM#2
Michael Peppers
This

Trigger:
Victory Defeat
Collapse Events
Unit - A unit dies
Collapse Conditions
((Owner of (Dying unit)) slot status) Equal to In Game
(All Units of (Units owned by (Owner of (Dying unit)) matching ((((Matching Unit) is a land unit) Equal to True) And (Matching Unit) is an air unit) Equal to True))) are dead) Equal to True
(Owner of (Dying unit)) different from Neutral-hostile
Collapse Actions
Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
Game - Display to (All players controlled by an User player) the text: ((Name of (Owner of (Dying unit))) + has been defeated.)
Wait 2.00 seconds
Collapse Player Group - Pick Every Player in (All Players matching (((Matching player) Slot status) Equal to In Game)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are true) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of players in (All players Matching ((((Matching player) is an enemy of (Picked player)) Equal to True) and (((Matching Player) slot status) Equal to In Game)))) Equal to 0
Collapse Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Collapse Else - Actions
Do Nothing

Only this.

Modify it as you want
05-23-2009, 01:35 PM#3
Vervekke
Quote:
Originally Posted by Michael Peppers
This

Trigger:
Victory Defeat
Collapse Events
Unit - A unit dies
Collapse Conditions
((Owner of (Dying unit)) slot status) Equal to In Game
(All Units of (Units owned by (Owner of (Dying unit)) matching ((((Matching Unit) is a land unit) Equal to True) And (Matching Unit) is an air unit) Equal to True))) are dead) Equal to True
(Owner of (Dying unit)) different from Neutral-hostile
Collapse Actions
Game - Defeat (Owner of (Dying unit)) with the message: Defeat!
Game - Display to (All players controlled by an User player) the text: ((Name of (Owner of (Dying unit))) + has been defeated.)
Wait 2.00 seconds
Collapse Player Group - Pick Every Player in (All Players matching (((Matching player) Slot status) Equal to In Game)) and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are true) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of players in (All players Matching ((((Matching player) is an enemy of (Picked player)) Equal to True) and (((Matching Player) slot status) Equal to In Game)))) Equal to 0
Collapse Then - Actions
Game - Victory (Picked player) (Show dialogs, Show scores)
Collapse Else - Actions
Do Nothing

Only this.

Modify it as you want

Hey m8 thanks for the quick response

Is
((Owner of (Dying unit)) slot status) Equal to Is playing
the same as

((Owner of (Dying unit)) slot status) Equal to In Game

Because I don't have the option to select In Game.

Joris
05-23-2009, 02:08 PM#4
Michael Peppers
Yes, I mistranslated it...