Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Kills to Cash Perfect - Extended [solved]
Kills to Cash Perfect - Extended [solved]
Dec 12 2007, 11:59 pm
By: NudeRaider  

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

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

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);
}

Post has been edited 7 time(s), last time on Aug 21 2008, 9:03 am by NudeRaider.




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

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

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:
test dotx.scm
Hits: 2 Size: 56.24kb




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



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.]

Post has been edited 1 time(s), last time on Aug 20 2008, 7:59 am by StrikerX22.



None.

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



Way to revive a dead topic.



None.

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



Oh c'mon striker.. he did this 8 months ago. You gotta assume he fixed it already.



None.

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



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).



None.

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

We live in a society.

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.




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



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.



None.

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

We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

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 name: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 name: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.




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:53 am]
Ultraviolet -- :lol:
[06:51 pm]
Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
[06:50 pm]
NudeRaider -- Vrael
Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
sounds like moisture control is often a pressing concern in your city
[06:50 pm]
Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
[06:49 pm]
Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
[06:48 pm]
Vrael -- On this Topic, I could definitely use some Introductions.
[06:48 pm]
Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
[06:47 pm]
Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
[06:45 pm]
NudeRaider -- Vrael
Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
beats me, but I'd make sure to pick the epitome of excellence and nothing less.
[06:41 pm]
Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
Please log in to shout.


Members Online: Oh_Man, jun3hong