HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Prob

03-08-2004, 01:38 PM#1
Dragonspawn
I am making a map, where I would like the last surviver to be the winner(sound familiar eh? ^_^ ) How do i make a trigger for that?
Well, thats about it.

Hope this is not the wrong forum...

Would like to give you points... but well... u know... i havent really got anyone :\

l)r@g0n$p@\/\/n
03-08-2004, 01:44 PM#2
Draco
Quote:
Originally Posted by Dragonspawn
I am making a map, where I would like the last surviver to be the winner(sound familiar eh? ^_^ ) How do i make a trigger for that?
Well, thats about it.

Hope this is not the wrong forum...

Would like to give you points... but well... u know... i havent really got anyone :\

l)r@g0n$p@\/\/n

You could use the event of a unit dying. Then a condition to check wether the other units or players (You didn't say which you wanted) are all dead, and then give victory if there is only one left.
03-08-2004, 01:46 PM#3
Dragonspawn
Quote:
Originally Posted by Draco
You could use the event of a unit dying. Then a condition to check wether the other units or players (You didn't say which you wanted) are all dead, and then give victory if there is only one left.

That was indeed a fast reply(time, not that it was... well, something else)
Thx alot. :D
03-28-2004, 05:41 PM#4
Dragonspawn
Uhm... I must admit i cant make it work... could anyone write exactly whitch events/conditions/actions i would need(example below). It is when there is only one player left... all the others have lost theyre unit, and therefore Defeat.
Example:
Event: Unit - Specific unit event - "unit" dies
Conditions: All - Bolean Comparison - "unit" is a hero equal to true
Action: Game - Defeat - Defeat "player" with the message "message"

Then I would be very happy... very happy indeed :D :D

l)ragonspawn
03-28-2004, 06:01 PM#5
tay714man
I think that I understand what you are looking for. You want to have a player lose the game when all his allies lose their heros right? If that isn't what you want, explain it more clearly, if that is what you want, here is how you do it:

First, create an integer variable and set the initial value of that variable to be the same number as the amount of players on a team. (for example, if there are 4 players on the team, set it to 4)

You also need to set up a variable that is a player group, containing all the players on the team.

Next, make a trigger like this:

Quote:
Event:
Unit - Specific unit event - "unit" dies

Conditions:
None needed with specific unit.

Actions:
Set Variable - "integer variable" = "integer variable" - 1
Remove "Owner of Dying Unit" from "Player Group Variable"
If / Then / Else:
If: "integer variable" Equal To 1
Then: Pick Every Player in "Player Group Variable" and do Game - Defeat "Picked Player" with Message
Else: Do Nothing

I hope that helped you out. If that isn't what you want the game to do, be more clear on what you want and I'll tell you how to do it.
03-28-2004, 06:43 PM#6
Dragonspawn
Yes, thats about it. Exept that the last player would win... but even I know how to change that ^_^
Have just testet it... and my map, Sheeprun, works Extremely well... thanx a hole lot...

l)ragonspawn
03-28-2004, 08:49 PM#7
tay714man
No problem, glad I could help.