HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Trigger Question!

06-08-2004, 12:26 AM#1
Vizjerie
Can you tell me how to make a trigger that change the handicap of a players units life depending on how many people are playing?

Please gimme detail steps.... im terrible at understanding trigger ><

7 player is the maximum. 2 enemy computer. If there is one player, 50% handicap, 2 player 100%, 3 player 150%, after that each player adds 60%.

Thankx.
06-08-2004, 12:35 AM#2
Xinlitik
Sorry if I sound harsh, but really...how hard is it to read the first thread on the page?
06-08-2004, 01:32 AM#3
Nabren
Trigger 1:
Event - Map Initialization
Actions:
Player Group - Pick Every Player in(All Players Controlled by a User player) and do (Actions)
Set totalplayers = totalplayers + 1

For trigger 2, you need a variable of type trigger and set to trigger 3.
Trigger 2:
Event - Player 1(Red) leaves the game(need a seperate event for each player, but can use same trigger)
Actions:
Set totalplayers = totalplayers - 1
Run Trigger3Variable (Ignoring Conditions)

Trigger 3:
For this one create a variable of type real, call it anything you want.
Actions:
if(totalplayers less than or equal to 3)
Set realvariable = totalplayers * 50.00
if(totalplayers greater than 3)
Set realvariable = (3 * 50.00) + ((totalplayers - 3) * 60.00)
Player Group - Pick Every Player in(All Players Controlled by a User player) and do (Actions)
Set (Picked Player) handicap to realvariable%

The problem with what you got is the minimum handicap is 1%, so you can't apply a negative percentage, the above will be applying a bonus. I'll leave it to you to figure out how to turn the percentage into a penalty, if you still need help let me know.