Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: [SOLVED] Kills & Raz not conformingToMyComman
[SOLVED] Kills & Raz not conformingToMyComman
This topic is locked. You can no longer write replies here.
Aug 14 2012, 9:06 am
By: Kimaru2  

Aug 14 2012, 9:06 am Kimaru2 Post #1



Hello SEN, I have an issue that I'm really stumped on. Here is the scenario:
In my RPG map, you can choose an Ultralisk who has a spell that allows him to enter a "Berserker" rage for an initial 3 seconds. For every unit he kills while in the berserker rage, 0.5 seconds is added to the 3 second timer. My issue is that he is getting multiples of 0.5 for every unit he kills. I am using binary countoffs to dump K&R into a temporary death count so that it can be converted to money/experience, so theoretically, by the time the player gets the +0.5 seconds, the player should have 0 K&R. Here are the triggers:

LEGEND: Protoss Corsair: The timer for the "Berserker" rage. This constantly runs down at a rate of 12/sec.
Protoss Flag Beacon: The temporary death count to hold K&R.

Collapsable Box


Post has been edited 2 time(s), last time on Aug 14 2012, 7:55 pm by Kimaru2.



None.

Aug 14 2012, 9:33 am staxx Post #2



Your getting multiples of 0.5 seconds added because each unit is worth a different amount of kill/razing score. for instance, killing a supply depot would give you 150 razings. So your first trigger that would fire would be the one for 128 razings which would still leave 22 razings for your other triggers to carry out.

I would do something like this.

Plays kills and razings score is at least 1

Set kills razings to 0
set switch 7
whatever other actions u want

Post has been edited 1 time(s), last time on Aug 14 2012, 9:38 am by staxx.



None.

Aug 14 2012, 9:44 am Kimaru2 Post #3



You're right in the sense that units have different kill scores, but let me use your example of a depot (150):
The first trigger that would fire would be 128, leaving me with 22 remaining. All triggers below 128 have yet to be fired: 64 is skipped, 32 is skipped, but 16 < 22, so that is fired. We are left with 6. 8 is skipped, 4 < 6, so 4 is fired, leaving us with 2. 2 is then fired, making the score 0 by the end of the cycle.



None.

Aug 14 2012, 9:53 am staxx Post #4



Exactly.

1 kill just ran 4 triggers making 0.5 turn into 2.0.

If you use the method described above it wont matter the kill/razing score each kill is always worth more than 1. So the trigger will fire and set the kill/razing score back to 0 and will only give 0.5 seconds of time. This trigger then wont activate again until another unit is killed.



None.

Aug 14 2012, 10:16 am Kimaru2 Post #5



The 4 triggers are running in the same cycle. The only way I can get 2.0 seconds is if there are 4 cycles, which should be impossible with countoffs.



None.

Aug 14 2012, 2:28 pm NudeRaider Post #6

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

This is odd. Currently I have 4 theories, none of which are really convincing:

a) This should theoretically not be it with your setup, but maybe it's because you use a switch in a trigger that runs for the whole force. So maybe using a death counter set for Current Player works? (not really convinced of that)

b) Some other trigger is interfering with razings or the switch?

c) something odd with hyper triggers only partially running / blocked for a certain player

d) other waits causing additional trigger loops screwing with your trigger order




Aug 14 2012, 2:30 pm staxx Post #7



I don't have much experience with binary count off's to provide you with a solution using your current implementation. I can tell you 100% though that your getting your 0.5 seconds added 4 times for killing something worth 150. Other units worth more would activate it more than 4 times.

100% my solution will work. If you sit tight though i'm sure someone else will be able to explain things about why binary's do this and give you a solution using your current system.

None of the above @ nude. It still does this with DC's



None.

Aug 14 2012, 6:52 pm Azrael Post #8



If you send me the map via PM, I can tell you what's wrong. I think this is one of those instances where it will be much easier to just look at the map than to speculate about what else could be going on in the map to cause the issue.




Aug 14 2012, 7:15 pm staxx Post #9



Az, copy and paste the triggers he posted with nothing else in the map. Youll see it activates multiple times for 1 kills.



None.

Aug 14 2012, 7:27 pm Kimaru2 Post #10



I've attached a test map with only this system in place and still the problem persists.

Also, @staxx, I've tried setting K&R to 0 at the end of the cycle, and that DOES work, however I don't get the full score for killing a unit. I'm trying to retain the scores.

EDIT: Also I found a possible solution. If I replace the count off with 10,000 triggers that all subtract/add 1 K&R at a time in 1 cycle, the system will work. but it's not really ideal...
The only possibility that I see may be the cause is that there could be a duration from the time when you kill a unit to when your score actually reaches the amount the unit reportedly gives, but I really don't think that's the case.

Attachments:
Kill Scores Test.scm
Hits: 3 Size: 42.33kb

Post has been edited 1 time(s), last time on Aug 14 2012, 7:34 pm by Kimaru2.



None.

Aug 14 2012, 7:42 pm staxx Post #11



Thats not what i was referring to with the solution i posted. I'll explain again.

If it were me, i would delete all of your current binary count off triggers and replace it with this.

Player:
(whoever you want this to run for)

Conditions:
Current player has at least 1 kill/razings
Current player suffered 1 death of corsair

Actions:
Set kill/razings to 0
Add exp amount
Add mineral amount
Add 6 corsair deaths
Display text
preserve

This will be the only trigger needed to run your entire system.



None.

Aug 14 2012, 7:45 pm Kimaru2 Post #12



Yes, but each unit gives a different score amount, the value of which I still want.



None.

Aug 14 2012, 7:49 pm Azrael Post #13



The problem is that "Kills and Razings" are actually two different values.

When you are subtracting 2 from "Kills and Razings", you are actually subtracting 1 from "Kills" and 1 from "Razings".

That being the case, you should separate this into one check for Kills and another for Razings.




Aug 14 2012, 7:54 pm Kimaru2 Post #14



Wow, you are amazing, Azrael...I thought I had everyone stunned...
Thanks again!



None.

Aug 14 2012, 7:59 pm staxx Post #15



Ah ok, you want different amounts.

How many different types of units are there and races for your map?

You can use a system similar to what you have for that one.

Sample

Current player kills score is at least 350
Computer player suffered least 1 death of hydra
Current player suffered least 1 death of corsair

Subtract 350 kill score
subtract 1 death hydra for comp
etc

Kill Score Amounts

Very similar to binary, except its more specific and will subtract all of whats needed instead of just partial. This method is assuming you dont have 2 units of the same amount kill score.

*EDIT*
Nice Az, ignore the alternative methods now that Az found the problem



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
[2024-4-30. : 7:43 am]
NudeRaider -- Vrael
Vrael shouted: if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
Yeah I'm not a big fan of Westernhagen either, Fanta vier much better! But they didn't drop the lyrics that fit the situation. Farty: Ich bin wieder hier; nobody: in meinem Revier; Me: war nie wirklich weg
[2024-4-29. : 6:36 pm]
RIVE -- Nah, I'm still on Orange Box.
[2024-4-29. : 4:36 pm]
Oh_Man -- anyone play Outside the Box yet? it was a fun time
[2024-4-29. : 12:52 pm]
Vrael -- if you're gonna link that shit at least link some quality shit: https://www.youtube.com/watch?v=uUV3KvnvT-w
[2024-4-29. : 11:17 am]
Zycorax -- :wob:
[2024-4-27. : 9:38 pm]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider sing it brother
trust me, you don't wanna hear that. I defer that to the pros.
[2024-4-27. : 7:56 pm]
Ultraviolet -- NudeRaider
NudeRaider shouted: "War nie wirklich weg" 🎵
sing it brother
[2024-4-27. : 6:24 pm]
NudeRaider -- "War nie wirklich weg" 🎵
Please log in to shout.


Members Online: Roy