Staredit Network

Staredit Network -> UMS Assistance -> How would I make the victory trigger?
Report, edit, etc...Posted by Kyuubi. on 2005-06-20 at 03:44:31
Ok, I have made an arena-ish type map. Heres a little info that might help how I should make the victory trigger.
-There are 6 human players going against each other
-The players are all in one force
-The players each have 5 Lives(Displayed on a custom leaderboard and 0 counting as a last life)
-The arena field is not supposed to be visioned with each other

I want the player that is last standing to be the winner, when he is in control of a unit(of course). I want it to be like gravity ball's victory condition where when people lose, they can still watch the rest of the game. The vision part works, but the rest doesn't. I looked at the triggers usign the trigger viewer and tried to do that nearly the same but it messes up.

Here's how I did the trigger:
Condition:
'Force 1(The players 1-6)' commands 'exactly 1' of 'specific unit(Zealot)'
'Current player' commands 'exactly 1' 'specific unit(Zealot)'
Action:
Victory

This trigger I tried messes up either sooner or later when someone dies and respawns. It should be when the last player with a zealot standing wins.
Report, edit, etc...Posted by (U)Bolt_Head on 2005-06-20 at 04:23:55
I assume by your note about the respawn that when a higher numbered player dies the in a 1v1 then the lower player will get a victory even if the higher number has more lifes.

This happens cause the lower numbered player's trigger will check before the next players trigger creates the replacement zelot.

... Mmm i can't for the life of me think of a better way to do this. Maybe its too late at night. Anyways this will work.
In your respawn trigger add this in the actions.
- Set deaths for Zealot for current player to subtract 1

Then add this trigger

Players:
-Force 1
Conditions:
-Current player custom score is exactly 0
-Current player commands exactly 0 Zealot
Actions:
-Set deaths for zealot for current player to subtract 1


Lastly in your main victory trigger use these conditions:
- Force 1 commands exactly 1 zealot
- Current Player Commands at least 1 zealot
- Force 1 suffers exactly 0 deaths of zealot.

Report, edit, etc...Posted by Kyuubi. on 2005-06-20 at 06:09:02
I did what you said but it still didn't work right. All the help I have gotten is for one map.

http://www.staredit.net/index.php?showtopic=16715

The victory trigger happens right after when everyone is done choosing their abilities/options. After everyone has chosen the abilties and everyone is ready the zealots are created on the field at the same time, but then the victory or draw pops up.
Report, edit, etc...Posted by KiLLeR2001 on 2005-06-20 at 06:55:41
I'm pretty sure when you give a player the 'Victory' command Starcraft automatically gives a 'Defeat' command for everyone else that didn't get a Victory or Draw command unless otherwise stated in your triggers.
Report, edit, etc...Posted by Oo.Deamon.oO on 2005-06-20 at 08:45:50
Just use the bring conidition. - And do this. Force 1 brings atleast 2 zealots to the arena location, set a switch like deaths, or just a switch... - make a trigger for players 1-6 current player brings exactly 1 zealot to arena location, switch is set, lives for force 1 is 0, end game in victory for current player - then everyone else should end in defeat at the end and the guy with the zealot will win.

And if you dont undersand that...

Force 1
Force 1 brings atleast 2 zealots to "arenalocation"
-----------------------------------------------------------
set switch 1 (or set deaths for p7 on unit "whatever" to "whatever"
_______________________________________________________
Then...
------------------------------------------------------------------
players 1-6
current player brings exactly 1 zealot to "arenalocation"
switch 1 is set
lives for force 1 is exactly 0
-----------------------------------------------------------------
end game in victory for current player
Report, edit, etc...Posted by (U)Bolt_Head on 2005-06-20 at 14:09:00
QUOTE(Shadowlash @ Jun 20 2005, 05:09 AM)
I did what you said but it still didn't work right.    All the help I have gotten is for one map.

http://www.staredit.net/index.php?showtopic=16715

The victory trigger happens right after when everyone is done choosing their abilities/options.  After everyone has chosen the abilties and everyone is ready the zealots are created on the field at the same time, but then the victory or draw pops up.
[right][snapback]239157[/snapback][/right]


Oh i see what your doing. Put the victory trigger above the trigger that creates the zealots at the start. (i guess the bug i told you how to fix you havn't seen yet).

The thing is your zealots are not being created at the same time, Their created one at a time with each players trigger. And other triggers are allowed to fire between them.

Think of your trigger order like this...
==Player 1==
-Create Zealot trigger
-Victory Trigger
==Player 2==
-Create Zealot trigger
-Victory Trigger
==Player 3==
-Create Zealot trigger
-Victory Trigger

So after player 1 runs his trigger to create the zealot the victory trigger has a chance to fire directly after it. If you put the Victory trigger above the Create Zealot Trigger then it will work differantly.

==Player 1==
-Victory Trigger
-Create Zealot trigger
==Player 2==
-Victory Trigger
-Create Zealot trigger

Here in this example the victory trigger would of already checked and been faulse, so after that the Zealot is created. Next P2 will check his victory trigger but since he won't have a zealot yet his won't fire ither.

I'm pretty sure this is what your problem is (even if your victory or create zealot triggers are owned by the force).

PS. What Oo.Deamon.oO said should fix your problem too.
Next Page (1)