J
Jethro
Guest
Calling out to Guru's, (Read the Trigger First) this trigger runs perfect but when none of the players have the money they whole trigger stops working until atleast 1 player has the money to cover the new life or so on it is strange the trigger looks perfect to me right now. So if anyone needs the map to see it in action just post. Please this is so ouch. Or if anyone has a better way of performing the task.
BTW its 2:30 AM here so this might not make any sence sorry if it doesnt.
BTW its 2:30 AM here so this might not make any sence sorry if it doesnt.
Code:
Lives Left
Events
Unit - A unit enters Center <gen>
Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 9 (Gray)
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)
(Owner of (Triggering unit)) Equal to Player 12 (Brown)
Actions
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
Set BuyLives_PlayerIn[(Integer A)] = False
Set BuyLives_Succeed = False
Set BuyLives_PlayerCounter = 0
Set BuyLives_PayOut = 0
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Initilization_Lives Equal to 1
Or - Any (Conditions) are true
Conditions
BuyLives_Boolean[1] Equal to True
BuyLives_Boolean[2] Equal to True
BuyLives_Boolean[3] Equal to True
BuyLives_Boolean[4] Equal to True
BuyLives_Boolean[5] Equal to True
BuyLives_Boolean[6] Equal to True
BuyLives_Boolean[7] Equal to True
BuyLives_Boolean[8] Equal to True
Then - 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
BuyLives_Boolean[(Integer A)] Equal to True
Then - Actions
Set BuyLives_PlayerCounter = (BuyLives_PlayerCounter + 1)
Set BuyLives_PlayerIn[(Integer A)] = True
Else - Actions
For each (Integer A) from 1 to 8, do (Actions)
Loop - Actions
For each (Integer B) from 1 to 8, do (Actions)
Loop - Actions
Set BuyLives_PayOut = ((Levels_CurrentLevel x 7) / BuyLives_PlayerCounter)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BuyLives_PlayerIn[(Integer B)] Equal to True
((Player((Integer B))) Current gold) Less than BuyLives_PayOut
Then - Actions
Set BuyLives_PlayerIn[(Integer B)] = False
Set BuyLives_PlayerCounter = (BuyLives_PlayerCounter - 1)
Else - 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
BuyLives_PlayerIn[(Integer A)] Equal to True
Then - Actions
Set BuyLives_Succeed = True
Player - Set (Player((Integer A))) Current gold to (((Player((Integer A))) Current gold) - BuyLives_PayOut)
Game - Display to (All players) for 10.00 seconds the text: (((Initilization_PlayerColor[(Integer A)] + (Name of (Player((Integer A))))) + |r) + ( has paid + ((String(BuyLives_PayOut)) + Gold toward a life!)))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
BuyLives_Succeed Equal to True
Then - Actions
Set Initilization_Lives = (Initilization_Lives + 1)
Else - Actions
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Initilization_Lives Greater than 0
Then - Actions
Set Initilization_Lives = (Initilization_Lives - 1)
Multiboard - Set the text for (Last created multiboard) item in column 2, row 1 to (String(Initilization_Lives))
Game - Display to (All players) for 10.00 seconds the text: (|c00ff0000You have lost 1 life you have + ((String(Initilization_Lives)) + left!|r))
Else - Actions
Game - Defeat Player 1 (Red) with the message: Defeat!
Game - Defeat Player 2 (Blue) with the message: Defeat!
Game - Defeat Player 3 (Teal) with the message: Defeat!
Game - Defeat Player 4 (Purple) with the message: Defeat!
Game - Defeat Player 5 (Yellow) with the message: Defeat!
Game - Defeat Player 6 (Orange) with the message: Defeat!
Game - Defeat Player 7 (Green) with the message: Defeat!
Game - Defeat Player 8 (Pink) with the message: Defeat!
Unit - Remove (Triggering unit) from the game
Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Human\MassTeleport\MassTeleportTarget.mdl


