Staredit Network

Staredit Network -> UMS Assistance -> Kills to Cash 'perfect'
Report, edit, etc...Posted by pixels on 2005-08-30 at 22:49:13
http://www.staredit.net/index.php?tutorial=25

I copied the triggers from the sample map then tried duplicating to fit my map with 6 players that can kill.

CODE
Trigger("Player 1"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);

Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}

//-----------------------------------------------------------------//

Trigger("Player 2"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);

Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}

//-----------------------------------------------------------------//

Trigger("Player 3"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);

Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}

//-----------------------------------------------------------------//

Trigger("Player 4"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);

Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "5");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}

//-----------------------------------------------------------------//

Trigger("Player 5"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);

Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "6");
}

//-----------------------------------------------------------------//

Trigger("Player 6"){
Conditions:
Most Kills("Men");
Command("Player 8", "Terran Civilian", Exactly, 0);

Actions:
Comment("Most Kills");
Preserve Trigger();
Create Unit("Player 8", "Terran Civilian", 1, "7");
Set Resources("Current Player", Add, 1, gas);
Set Score("Current Player", Add, 1, Custom);
Create Unit("Player 8", "Terran Civilian", 1, "1");
Create Unit("Player 8", "Terran Civilian", 1, "2");
Create Unit("Player 8", "Terran Civilian", 1, "3");
Create Unit("Player 8", "Terran Civilian", 1, "4");
Create Unit("Player 8", "Terran Civilian", 1, "5");
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Command("Player 1", "Any unit", Exactly, 0);

Actions:
Remove Unit At Location("Player 7", "Men", All, "1");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Command("Player 2", "Any unit", Exactly, 0);

Actions:
Remove Unit At Location("Player 7", "Men", All, "2");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Command("Player 3", "Any unit", Exactly, 0);

Actions:
Remove Unit At Location("Player 7", "Men", All, "3");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Command("Player 4", "Any unit", Exactly, 0);

Actions:
Remove Unit At Location("Player 7", "Men", All, "4");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Command("Player 5", "Any unit", Exactly, 0);

Actions:
Remove Unit At Location("Player 7", "Men", All, "5");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7"){
Conditions:
Command("Player 6", "Any unit", Exactly, 0);

Actions:
Remove Unit At Location("Player 7", "Men", All, "6");
Preserve Trigger();
}

//-----------------------------------------------------------------//

Trigger("Player 7","Player 8"){
Conditions:
Always();

Actions:
Comment("Ally");
Set Alliance Status("Player 7", Enemy);
Set Alliance Status("Player 8", Enemy);
}

//-----------------------------------------------------------------//


[attachmentid=13417]

Problem: Its not doing anything. I'm horrible with triggers and I dont even understand how it works, but I'm almost certain I replicated everything fine. Any help = thx.
Report, edit, etc...Posted by PCFredZ on 2005-08-30 at 23:03:59
It's better to know how a system works before you try it out.

Here's how this one works:

At first everyone has 0 kills for every unit. Say 1 person kills a Zergling. He now has the leaderboard for Most Kills for Zerglings. Now what you do is create a Zergling for all the other players present, in an isolated area (which would prevent interference) for them to kill individually. After they play catch up with the kills, nobody has the leaderboard, which is essentially meaning that everyone has 0 kills again. Obviously you'd want to make sure that each person kills his own in the isloated area, and that the kills are done very quick to make the update seem instaneous. While some people create one of these triggers for each player present (to make it so that the OTHER people are the only ones who get the catch-up kills), there's a much easier way. Simply set the player to the force with the human players, create 1 unit for All Players (which would create 1 for each of them), then remove 1 of that unit for Current Player. This way you only have to do 1 trigger for each unit killed, versus 1 for each unit killed times the number of players.

Would you like me to rephrase any part of that explanation to make it easier to understand?
Report, edit, etc...Posted by pixels on 2005-08-31 at 00:11:48
QUOTE(PCFredZ @ Aug 30 2005, 10:03 PM)
It's better to know how a system works before you try it out.

Here's how this one works:

At first everyone has 0 kills for every unit. Say 1 person kills a Zergling. He now has the leaderboard for Most Kills for Zerglings. Now what you do is create a Zergling for all the other players present, in an isolated area (which would prevent interference) for them to kill individually. After they play catch up with the kills, nobody has the leaderboard, which is essentially meaning that everyone has 0 kills again. Obviously you'd want to make sure that each person kills his own in the isloated area, and that the kills are done very quick to make the update seem instaneous. While some people create one of these triggers for each player present (to make it so that the OTHER people are the only ones who get the catch-up kills), there's a much easier way. Simply set the player to the force with the human players, create 1 unit for All Players (which would create 1 for each of them), then remove 1 of that unit for Current Player. This way you only have to do 1 trigger for each unit killed, versus 1 for each unit killed times the number of players.

Would you like me to rephrase any part of that explanation to make it easier to understand?
[right][snapback]301777[/snapback][/right]

So..

Hm. How do I make it so that it makes the civilian in each spot with one trigger, since they all have different locations. How would I modify the current set of triggers?

blah. i understand the concept i just cant get the triggers to work. disgust.gif
Report, edit, etc...Posted by (U)Bolt_Head on 2005-08-31 at 01:32:58
QUOTE(pixels @ Aug 30 2005, 11:11 PM)
So..

Hm. How do I make it so that it makes the civilian in each spot with one trigger, since they all have different locations. How would I modify the current set of triggers?

blah. i understand the concept i just cant get the triggers to work.  disgust.gif
[right][snapback]301868[/snapback][/right]


Use Center Location, Center a location on a burrowed unit, or the tank. (or just another location if you know how)
Next Page (1)