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:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[06:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[06:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[06:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
[2026-7-15. : 2:19 am]
Symmetry -- NudeRaider
NudeRaider shouted: Symmetry I can't tell if it's relevant. You provided literally no context so I was providing an equally generic answer.
Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
[2026-7-14. : 11:43 pm]
Ultraviolet -- let's take each other's clothes off :teach:
Please log in to shout.


Members Online: l)ark_ssj9kevin