Survival Mode, Trigger Help
Moderator: Cheaters
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
-
- Honorary wc3edit.net Traitor
- Posts: 468
- Joined: December 10th, 2007, 10:50 pm
- Title: The Professional
- Location: USA
Re: Survival Mode, Trigger Help
Ok, I got it, I'll edit this post with the setup.
[Edit]
Variable: Variable Name = Your Choice (mine was DeathDefeat) | Variable Type = Integer Array (1) | Initial Value = 0 (Default)
Trigger:
Events
Unit - A unit owned by Player 1 (Red) Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set DeathDefeat[1] = (DeathDefeat[1] + 1)
If (DeathDefeat[1] Equal to 5) then do (Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!) else do (Do nothing)
Note:
Variable is for each player. Example Player 1 = 1, Player 2 = 2, etc..
You can change "DeathDefeat[1] equal to "5" to any value.
[Edit]
Variable: Variable Name = Your Choice (mine was DeathDefeat) | Variable Type = Integer Array (1) | Initial Value = 0 (Default)
Trigger:
Events
Unit - A unit owned by Player 1 (Red) Dies
Conditions
((Dying unit) is A Hero) Equal to True
Actions
Set DeathDefeat[1] = (DeathDefeat[1] + 1)
If (DeathDefeat[1] Equal to 5) then do (Game - Defeat (Owner of (Triggering unit)) with the message: Defeat!) else do (Do nothing)
Note:
Variable is for each player. Example Player 1 = 1, Player 2 = 2, etc..
You can change "DeathDefeat[1] equal to "5" to any value.
Do you support Durchdringen? If so, add the spoiler to your sig. Durch cares for you, so show your support for Durch!
Spoiler:
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Survival Mode, Trigger Help
[rant]I would first like to say how GUI sucks and how its limitations suck and how scrolling through 200 popup menus sucks.[/rant]
This is what I came up with ...
First you need some variables... I'm sure you might already have some of these.
And...you'll need 2 triggers
A revive trigger
And a hero dies trigger...
This is what I came up with ...
First you need some variables... I'm sure you might already have some of these.
And...you'll need 2 triggers
A revive trigger
Code: Select all
Revive Hero
Events
Time - ReviveTimer[1] expires
Time - ReviveTimer[2] expires
Time - ReviveTimer[3] expires
Time - ReviveTimer[4] expires
Time - ReviveTimer[5] expires
Time - ReviveTimer[6] expires
Time - ReviveTimer[7] expires
Time - ReviveTimer[8] expires
Time - ReviveTimer[9] expires
Time - ReviveTimer[10] expires
Time - ReviveTimer[11] expires
Time - ReviveTimer[12] expires
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Custom script: if GetExpiredTimer()==udg_ReviveTimer[bj_forLoopAIndex] then
Set Point_AntiLeak = (Center of Hero Respawn <gen>)
Hero - Instantly revive Heros[(Integer A)] at Point_AntiLeak, Show revival graphics
Custom script: call RemoveLocation(udg_Point_AntiLeak)
Custom script: endif
Code: Select all
Hero Dies
Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
IsSurvivalMode Equal to True
Actions
Set HeroDeathCount[(Player number of (Owner of (Triggering unit)))] = (HeroDeathCount[(Player number of (Owner of (Triggering unit)))] + 1)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
HeroDeathCount[(Player number of (Owner of (Triggering unit)))] Equal to 15
Then - Actions
Game - Defeat (Owner of (Triggering unit)) with the message: You're out of lives!
Else - Actions
Countdown Timer - Start ReviveTimer[(Player number of (Owner of (Triggering unit)))] as a One-shot timer that will expire in (5.00 x (Real((Hero level of (Triggering unit))))) seconds
-
- Honorary wc3edit.net Traitor
- Posts: 468
- Joined: December 10th, 2007, 10:50 pm
- Title: The Professional
- Location: USA
Re: Survival Mode, Trigger Help
Aero's will probably be best for you, as he is very familiar with WE and Jass will lead to less memory leaks.
I can make triggers, but I stick to mostly GUI, and am experienced enough to get by, but by far not a pro.
I can make triggers, but I stick to mostly GUI, and am experienced enough to get by, but by far not a pro.
Do you support Durchdringen? If so, add the spoiler to your sig. Durch cares for you, so show your support for Durch!
Spoiler:
-
- Forum Staff
- Posts: 506
- Joined: August 5th, 2007, 1:38 pm
- Title: Gui Expert
- Location: *Unknown*
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Survival Mode, Trigger Help
Do whatever you feel comfortable working with.
My set up will work for up to 12 players.
My set up will work for up to 12 players.