Staredit Newtork
Community
StarCraft
Games
Site
Favourites
Kills to Cash Perfect - Extended [solved], Setup: 3v3 with each side 1 allied comp

Creator: NudeRaider
Time: Dec 12 2007, 11:59 pm

Post #1     NudeRaider Dec 12 2007, 11:59 pm

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact
Hi, this is a very complicated problem, thats why I posted so many details. My apologies for that. But I really hope someone can figure out my mistake.

Map Setup:
3 Terran Players (P1-3) + 1 Terran Comp (P7) vs 3 Toss Players (P4-6) + 1 Toss Comp (P8)
Players choose a hero of their race, comps spawn regular units of their race and sometimes heroes

What I want:
- When a Player kills another Player of the Opposing Team he shall get some minerals and gas and his Teammates some minerals only.
- When a Player kills a hero unit from the Enemy Comp he shall NOT get a reward. Same for Teamkills, obviously.
- When a Player is killed by a Comp also nobody shall get a reward.

What I have:
An extended Kills to Cash Perfect Method where the Allied Comp is the score keeper for the hero units of his race.
That means there are actually 2 score keepers. Each responsible for counting the kills of his own race.

I had to do that because the score keeper Comps can kill units too - unfortunately there's no spare comp left.
So I have chosen the Terra Comp to keep track of the kills of Terran Heroes because its unlikely that he kills a Terran Hero. (Same for Toss Comp)
It is unlikely, not impossible that the score keeper Comp kills a Player hero (splash!), that's why I added a trigger that keeps track of the deaths of the heroes and updates the kills accordingly.

Just in case it matters: I update the kills with a sunken colony that kills every hero with 1 hit.

The exact triggers are below. I just posted example triggers for 1 hero of each race.

The Problem:
The system works fine - except one scenario: When a Terran Hero is killed by the Toss Comp (P8). (Toss hero killed by Terra Comp (P7) is np!)
The kills are updated a lot of times instead of only once which kinda screws the system until after some time the system sorts itself out and stops updating. Also I noticed that while these "wild updates" the trigger which is responsible for Teamkills fires...

Here is where I need your help. I can't figure why the teamkills-triggers is fired or why there are so many updates. But it seems to have something to do with order because when P8 kills a player hero (comp hero is also np!) it screws and when P7 kills a player hero it works fine.

Display of Usage for the Kills Update DC (=Unused type 1)

?0 = no reward / ?1 = team reward / ?2 = personal reward
1? = Fenix | 7? = Alan Shezar
2? = Soul of the Dead | 8? = Edmund Duke (Siege)
3? = Shadow of Death | 9? = Edmund Duke (Tank)
4? = Tassadar | 10? = Guy Montag
5? = Warbringer | 11? = Jim Raynor
6? = Invisible Death | 12? = Sarah Kerrigan

That means the first digit marks which hero was killed and the second digit saves if the player is to be rewarded or just has to update kills.

The triggers:
The first 4 triggers of the 2 sets of 8 are for determining what happened (who killed who)
and the second 4 triggers give the rewards depending on the Kills Update DC and place a hero to update the kills if necessary.

//Player killed a Player -> give current player a reward and another reward to his team, just update kills for the rest

Trigger("Player 4","Player 5","Player 6"){
Conditions:
Most Kills("Sarah Kerrigan (Ghost)");
Switch("start", set);
Bring("All players", "Sarah Kerrigan (Ghost)", "KillA.Region", At most, 0);
Deaths("\x003Terran Heroes", "Sarah Kerrigan (Ghost)", At least, 1);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 120);
Set Deaths("\x003Protoss Heroes", "Unused type 1", Set To, 121);
Set Deaths("Current Player", "Unused type 1", Set To, 122);
Set Deaths("\x003Terran Heroes", "Sarah Kerrigan (Ghost)", Set To, 0);
}


//Player killed a Comp Hero -> Just update the kills

Trigger("Player 4","Player 5","Player 6"){
Conditions:
Most Kills("Sarah Kerrigan (Ghost)");
Switch("start", set);
Bring("All players", "Sarah Kerrigan (Ghost)", "KillA.Region", At most, 0);
Deaths("\x003Terran Heroes", "Sarah Kerrigan (Ghost)", At most, 0);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 120);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}


//Teamkill or Enemy Comp Killed the Hero -> Just update kills and message in case of Teamkill//

Trigger("Player 1","Player 2","Player 3","Player 8"){
Conditions:
Most Kills("Sarah Kerrigan (Ghost)");
Switch("start", set);
Bring("All players", "Sarah Kerrigan (Ghost)", "KillA.Region", At most, 0);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 120);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
Set Deaths("\x003Terran Heroes", "Sarah Kerrigan (Ghost)", Set To, 0);
Display Text Message(Always Display, "\x004Don't \x006Teamkill!!!");
}


//Allied Comp Killed the hero through splash -> just update the kills//

Trigger("Player 7"){
Conditions:
; Most Kills("Sarah Kerrigan (Ghost)");
Switch("start", set);
Bring("All players", "Sarah Kerrigan (Ghost)", "KillA.Region", At most, 0);
Deaths("\x003Terran Heroes", "Sarah Kerrigan (Ghost)", At least, 1);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 120);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
Set Deaths("\x003Terran Heroes", "Sarah Kerrigan (Ghost)", Set To, 0);
}


//Personal reward for the Toss Player killing the Hero//

Trigger("Player 4","Player 5","Player 6"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 122);

Actions:
Preserve Trigger();
; Comment("");
Display Text Message(Always Display, "\x007You have killed a Hero\x004, here's your reward!");
Set Resources("Current Player", Add, 200, ore);
Set Resources("Current Player", Add, 5, gas);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}


//Teamreward for killing a Hero by a Teammate//

Trigger("Player 4","Player 5","Player 6"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 121);

Actions:
Preserve Trigger();
Comment("");
Display Text Message(Always Display, "\x004Your \x003team has killed a Hero\x004, here's your reward!");
Move Location("Current Player", "Zerg Sunken Colony", "KillA.Region", "KillA.Update");
Create Unit with Properties("Player 7", "Sarah Kerrigan (Ghost)", 1, "KillA.Update", 36);
Set Resources("Current Player", Add, 200, ore);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}


//Just Update for Toss//

Trigger("Player 4","Player 5","Player 6","Player 8"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 120);

Actions:
Preserve Trigger();
Comment("");
Move Location("Current Player", "Zerg Sunken Colony", "KillA.Region", "KillA.Update");
Create Unit with Properties("Player 7", "Sarah Kerrigan (Ghost)", 1, "KillA.Update", 36);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}


//Just Update for Terra//

Trigger("Player 1","Player 2","Player 3","Player 7"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 120);

Actions:
Preserve Trigger();
Comment("");
Move Location("Current Player", "Zerg Sunken Colony", "KillA.Region", "KillA.Update");
Create Unit with Properties("Player 8", "Sarah Kerrigan (Ghost)", 1, "KillA.Update", 36);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}



//Player killed a Player -> give current player a reward and another reward to his team, just update kills for the rest

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Most Kills("Warbringer (Reaver)");
Switch("start", set);
Bring("All players", "Warbringer (Reaver)", "KillA.Region", At most, 0);
Deaths("\x003Protoss Heroes", "Warbringer (Reaver)", At least, 1);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 50);
Set Deaths("\x003Terran Heroes", "Unused type 1", Set To, 51);
Set Deaths("Current Player", "Unused type 1", Set To, 52);
Set Deaths("\x003Protoss Heroes", "Warbringer (Reaver)", Set To, 0);
}


//Player killed a Comp Hero -> Just update the kills

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Most Kills("Warbringer (Reaver)");
Switch("start", set);
Bring("All players", "Warbringer (Reaver)", "KillA.Region", At most, 0);
Deaths("\x003Protoss Heroes", "Warbringer (Reaver)", At most, 0);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 50);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}


//Teamkill or Enemy Comp Killed the Hero -> Just update kills and message in case of Teamkill//

Trigger("Player 4","Player 5","Player 6","Player 7"){
Conditions:
Most Kills("Warbringer (Reaver)");
Switch("start", set);
Bring("All players", "Warbringer (Reaver)", "KillA.Region", At most, 0);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 50);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
Set Deaths("\x003Protoss Heroes", "Warbringer (Reaver)", Set To, 0);
Display Text Message(Always Display, "\x004Don't \x006Teamkill!!!");
}


//Allied Comp Killed the hero through splash -> just update the kills//

Trigger("Player 8"){
Conditions:
; Most Kills("Warbringer (Reaver)");
Switch("start", set);
Bring("All players", "Warbringer (Reaver)", "KillA.Region", At most, 0);
Deaths("\x003Protoss Heroes", "Warbringer (Reaver)", At least, 1);
Deaths("All players", "Unused type 1", At most, 0);

Actions:
Preserve Trigger();
Comment("");
Set Deaths("All players", "Unused type 1", Set To, 50);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
Set Deaths("\x003Protoss Heroes", "Warbringer (Reaver)", Set To, 0);
}

//Personal reward for the Toss Player killing the Hero//

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 52);

Actions:
Preserve Trigger();
; Comment("");
Display Text Message(Always Display, "\x007You have killed a Hero\x004, here's your reward!");
Set Resources("Current Player", Add, 200, ore);
Set Resources("Current Player", Add, 5, gas);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}

//Teamreward for killing a Hero by a Teammate//

Trigger("Player 1","Player 2","Player 3"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 51);

Actions:
Preserve Trigger();
Comment("");
Display Text Message(Always Display, "\x004Your \x003team has killed a Hero\x004, here's your reward!");
Move Location("Current Player", "Zerg Sunken Colony", "KillA.Region", "KillA.Update");
Create Unit with Properties("Player 8", "Warbringer (Reaver)", 1, "KillA.Update", 36);
Set Resources("Current Player", Add, 200, ore);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}

//Just Update for Terra//

Trigger("Player 1","Player 2","Player 3","Player 7"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 50);

Actions:
Preserve Trigger();
Comment("");
Move Location("Current Player", "Zerg Sunken Colony", "KillA.Region", "KillA.Update");
Create Unit with Properties("Player 8", "Warbringer (Reaver)", 1, "KillA.Update", 36);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}

//Just Update for Toss//

Trigger("Player 4","Player 5","Player 6","Player 8"){
Conditions:
Deaths("Current Player", "Unused type 1", Exactly, 50);

Actions:
Preserve Trigger();
Comment("");
Move Location("Current Player", "Zerg Sunken Colony", "KillA.Region", "KillA.Update");
Create Unit with Properties("Player 7", "Warbringer (Reaver)", 1, "KillA.Update", 36);
Set Deaths("Current Player", "Unused type 1", Set To, 0);
}
This post was edited 7 times, last edit by NudeRaider: Aug 21 2008, 9:03 am.
(signature image)
sonsofwar.pyrom.net/current/index2.html_0% (user posted image) 100%
Top

Post #2     NudeRaider Dec 13 2007, 11:56 pm

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact
Hm... noone even had an idea... :(

What's the problem guys? Is there missing information? Don't you understand what I'm doing at all?
I will answer any questions that arose. Any help is appreciated!

Well to make it easier finding the error I made a testmap now which has only the kills to cash triggers and a few needed extras.
So you can view the triggers in the editor and there's nothing that can intervene.

Hope I get some feedback now.
Attachments:
scm file
test dotx.scm (56.24 kb)
2 hits.
(signature image)
sonsofwar.pyrom.net/current/index2.html_0% (user posted image) 100%
Top

Post #3     StrikerX22 Aug 20 2008, 5:59 am

[Avatar]
eight archons burning...
 online contact
Let's get this some more attention. I'll be looking at it all soon. *bump*

[edit: And yeah, the file above isn't there anymore, so if you still have it, perhaps a reload would be in order.]
This post was edited 1 times, last edit by StrikerX22: Aug 20 2008, 7:59 am.
"If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason." - Jack Handey
Top

Post #4     Morphling Aug 20 2008, 6:03 am

[Avatar]
 offline contact
Way to revive a dead topic.
Top

Post #5     madroc Aug 20 2008, 6:33 am

[Avatar]
t(' 't) Kirby Flips You Off.
 online contact
Oh c'mon striker.. he did this 8 months ago. You gotta assume he fixed it already.
() )) (CRAYOLA) )) >

Jump in the crayon box and copy/paste this into your signature! You must make it a different color tho and copy and (EDIT) paste this sentence too.

Ha! This is not actually a link.
This is tho.
Top

Post #6     StrikerX22 Aug 20 2008, 7:54 am

[Avatar]
eight archons burning...
 online contact
On the contrary, he's asking me for help on it and linked me to this. Also, reviving "dead" topics is fine within the rules. Furthermore, no one here made much of an attempt to even help him. I believe these points make the bump quite valid. Instead of complaining, ask him yourself, or actually help.

Nude, I just want to make sure, do you remember if you tried the lack of proper hero kill tracking with every hero, and not just one. I've still got a lot to look at, but I figured I'd ask that since you're only showing for one hero's worth of trigs (per team).
"If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason." - Jack Handey
Top

Post #7     Mini Moose 2707 Aug 20 2008, 12:31 pm

[Avatar]
 offline contact
Quote from StrikerX22
On the contrary, he's asking me for help on it and linked me to this. Also, reviving "dead" topics is fine within the rules. Furthermore, no one here made much of an attempt to even help him. I believe these points make the bump quite valid. Instead of complaining, ask him yourself, or actually help.
It's valid when you add to discussion. Not when you say "Let's give this topic some attention. I'll take a look at this soon." A post like that is spam because it does not contribute, regardless of whether the topic is 8 minutes old or 8 months old.
Top

Post #8     StrikerX22 Aug 21 2008, 3:27 am

[Avatar]
eight archons burning...
 online contact
You're right, somehow that slipped by my mind, sorry. On the other hand, I am intending to contribute, and was hoping for others to possibly do so as well. It's a bit hard to jump into and state something profound. However, I overlooked the fact that the issue I'm looking for is the system not working eventually. I am not sure if the specific problem stated is still an issue. So perhaps this topic could be locked in favor of a new one more specified if he wishes to create one, or update the initial post to reflect the current situation. Sorry for the misunderstanding.

In any case, one more little thing I was going to ask for verification on: whether or not the death count identification system was always "in order," as it applies to all players first, then specifies rewards.
"If trees could scream, would we be so cavalier about cutting them down? We might, if they screamed all the time, for no good reason." - Jack Handey
Top

Post #9     NudeRaider Aug 21 2008, 9:10 am

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact
Sry, SEN is being gay since the last 12 hours, it doesn't let me respond. I get time out errors all the time... But now I finally managed:

Quote from StrixerX22
Let's get this some more attention. I'll be looking at it all soon. *bump*

[edit: And yeah, the file above isn't there anymore, so if you still have it, perhaps a reload would be in order.]
Quote from madroc
Way to revive a dead topic.
Quote from StrixerX22
On the contrary, he's asking me for help on it and linked me to this. Also, reviving "dead" topics is fine within the rules. Furthermore, no one here made much of an attempt to even help him. I believe these points make the bump quite valid. Instead of complaining, ask him yourself, or actually help.
Nude, I just want to make sure, do you remember if you tried the lack of proper hero kill tracking with every hero, and not just one. I've still got a lot to look at, but I figured I'd ask that since you're only showing for one hero's worth of trigs (per team).
OK, in reply to all these:
Yeah I got it fixed, this topic can be closed. I got no clue if I still have the testmap because it's not needed anymore. My current problem is even more complex.
And as I did't get any feedback on the "easy" problem I didn't bother to make a new topic.
I just linked you here so you get a basic idea of what I'm doing.
What do you mean with "lack of proper hero kill tracking with every hero, and not just one"?
If you want to know if the above system works with every hero, then yes. It's the reward system I added that made it buggy.
(signature image)
sonsofwar.pyrom.net/current/index2.html_0% (user posted image) 100%
Top
Users in this topic:


[01:54 am]
[The Great Yam]:] -- Man, once you put one devo hat on something... you just can't stop doing it.
[01:39 am]
Magicide -- o/` i wanna rock with you yeahhahahahahahah
[01:19 am]
FlyingHat -- ..
You must log in to shout.

©2003-2008 Staredit Network.
Starcraft & Starcraft II are trademarks of Blizzard Entertainment.
Site Index   |   Terms of Service   |   Privacy Policy   |   Contributions