Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: A question concerning kills to cash
A question concerning kills to cash
This topic is locked. You can no longer write replies here.
Aug 31 2010, 4:12 am
By: l3lack-l3ahamut  

Aug 31 2010, 4:12 am l3lack-l3ahamut Post #1



During the process of testing my defense map, I noticed that I was receiving about twice as many minerals as I should have. I am wondering if there is any known issues with my kills to cash system... Theoretically it should operate in this order...

- Player kills unit(s) [lets say 5]
- first binary countoff subtacts the value of 4 of the units from the players kill score [in this case an overlord 4 x 200]
- 4 points are added to a dc which will convert to minerals pending another check which is irrelevent
- second countoff skips over
- third countoff subtracts the remaining 200
- adds 1 to the same dc
- the dc should at this point be converted to minerals using binary countoffs

I am almost certain I didn't make a typo in my triggers so I was wondering if it was possible that the countoffs are triggering a second time before the kill score is updated?

Post has been edited 1 time(s), last time on Aug 31 2010, 4:18 am by l3lack-l3ahamut.



None.

Aug 31 2010, 4:26 am Aristocrat Post #2



I am almost certain that mineral adding triggers are ran for more than one player. Put in "display text message" in the countoffs and mineral conversions for debugging and tell us what happens.



None.

Aug 31 2010, 4:29 am l3lack-l3ahamut Post #3



I will test this, however I was testing alone when this happened, so these could not have run for any other player.

Code
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
    Deaths("Player 7", "Cave", Exactly, 1);
    Score("Current Player", Kills and razings, At least, 800);

Actions:
    Set Score("Current Player", Subtract, 800, Kills and razings);
    Set Deaths("Current Player", "Norad II (Crashed Battlecruiser)", Add, 4);
    Preserve Trigger();
}

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

Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
    Deaths("Player 7", "Cave", Exactly, 1);
    Score("Current Player", Kills and razings, At least, 400);

Actions:
    Set Score("Current Player", Subtract, 400, Kills and razings);
    Set Deaths("Current Player", "Norad II (Crashed Battlecruiser)", Add, 2);
    Preserve Trigger();
}

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

Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
    Deaths("Player 7", "Cave", Exactly, 1);
    Score("Current Player", Kills and razings, At least, 200);

Actions:
    Set Score("Current Player", Subtract, 200, Kills and razings);
    Set Deaths("Current Player", "Norad II (Crashed Battlecruiser)", Add, 1);
    Preserve Trigger();
}


These are my kill score count offs.
- Cave tracks what the current level is so that it only subtracts the kill score during the appropriate level.
- First level is the regular overlord which has a killscore of 200...
- Adds to Norad II which is used in the triggers below to convert into minerals.

Code
Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
    Deaths("Current Player", "Ion Cannon", Exactly, 1);
    Deaths("Current Player", "Norad II (Crashed Battlecruiser)", At least, 2);

Actions:
    Set Deaths("Current Player", "Norad II (Crashed Battlecruiser)", Subtract, 2);
    Set Resources("Current Player", Add, 2, ore);
    Preserve Trigger();
}

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

Trigger("Player 1","Player 2","Player 3","Player 4","Player 5","Player 6"){
Conditions:
    Deaths("Current Player", "Ion Cannon", Exactly, 1);
    Deaths("Current Player", "Norad II (Crashed Battlecruiser)", At least, 1);

Actions:
    Set Deaths("Current Player", "Norad II (Crashed Battlecruiser)", Subtract, 1);
    Set Resources("Current Player", Add, 1, ore);
    Preserve Trigger();
}


and these convert the dc Norad II into minerals...
- Ion Cannon is the irrelevent dc which is used to alter the amount of minerals under special situations which was not present
- Norad II is again or at least should be an accurate number of kills the player has made.

Post has been edited 1 time(s), last time on Aug 31 2010, 4:42 am by l3lack-l3ahamut.



None.

Aug 31 2010, 4:49 am Aristocrat Post #4



Replace Kills and Razings with just Kills; see if that fixes the problem.

Your glitch is giving you 10 minerals instead of 5, I take it?



None.

Aug 31 2010, 5:04 am l3lack-l3ahamut Post #5



I am happy to say that small change did the trick, thank you. I would never have guessed that was the culprit.

Post has been edited 1 time(s), last time on Aug 31 2010, 5:17 am by l3lack-l3ahamut.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[02:47 pm]
MTiger156 -- u u
[08:01 am]
UEDCommander -- Suicidal Insanity
Suicidal Insanity shouted: http://photos.arlinghaus.org/Animals/Species/WesternJackdaw/2019.11.16-FSH_3770-QHD-%7BFA19D1D3-182C-4723-964D-C30A764A7D13%7D.jpg <- Its missing a speech bubble about SCR bad blizzard bad modding good 1.16 good
u
[02:16 am]
Ultraviolet -- Suicidal Insanity
Suicidal Insanity shouted: http://photos.arlinghaus.org/Animals/Species/WesternJackdaw/2019.11.16-FSH_3770-QHD-%7BFA19D1D3-182C-4723-964D-C30A764A7D13%7D.jpg <- Its missing a speech bubble about SCR bad blizzard bad modding good 1.16 good
http://www.staredit.net/uploads/avatars/4811.png?312523688 pretty solid ;)
[02:14 am]
Ultraviolet -- That's supposed to be pr0nogo :P
[12:43 am]
MTiger156 -- Not sure why it takes an ultra-high resolution image of a bird to get that point across, but ok
[2019-11-20. : 6:36 pm]
Suicidal Insanity -- fortheovermind
fortheovermind shouted: my turn rate bar from the Create panel is no longer there. my games are created with the default 12 and i can no longer modify it, what could be causing this?
Known patch bug
[2019-11-20. : 6:07 pm]
Ultraviolet -- lifebot This version appears to be older than the version I already have downloaded (1.5). Why is this one being posted?
[2019-11-20. : 6:03 pm]
Ultraviolet -- Zoan
Zoan shouted: MTiger156 lifebot woah, that's awesome! I'm too lazy right now to check, but does it work with Remastered or 1.1.16 only?
I haven't used it in the latest version of remastered, but I assume it still works. It definitely did before. It's pretty neat. Super fast & easy way to create a save/load system
[2019-11-20. : 5:02 pm]
fortheovermind -- my turn rate bar from the Create panel is no longer there. my games are created with the default 12 and i can no longer modify it, what could be causing this?
Please log in to shout.


Members Online: Roy, Goinse70, tomarz103288, ymymupum