Unit Kill Scores

Discussion in 'Maps and Replays' started by MadHaTr, Mar 3, 2009.

Unit Kill Scores

Discussion in 'Maps and Replays' started by MadHaTr, Mar 3, 2009.

  1. MadHaTr

    MadHaTr Guest

    Unit Kill Scores - killsandrazing is weird...(updated)

    UPDATE: Okay I figured it out. The problem is with the KillsandRazings. For whatever reason it behaves strangely or in a way I don't understand yet. I Test the same things with buildings. I used a forge. 300 Points. My trigger subtracted 300 K&R pts, but I was left with 150.. half of 300 even though I had 300 and subtracted 300... this was the same effect I was experiencing on the units. had 50pts subtracted 50pts was left with 25... You can still download my map for an example. Though I've switched to just using Kills score now.. which should do fine. I'm sure I can add in separate razing score if i need to(for money/XP purposes only)


    Hello, I'm pretty new to the map making scene. I'm using a mix of StarDraft and Starforge. I've been going over the tutorial for Unit Kill Scores and The scores I get do not add up...

    For example
    Conditions
    Score(CurrentPlayer, KillsAndRazings, AtLeast, 50);

    Action
    SetScore(CurrentPlayer, Subtract, 50, KillsAndRazings);
    SetScore(CurrentPlayer, Add, 2, Custom);
    PreserveTrigger();
    Comment("BOARD - Add 2 - Killed Alien Tremor");

    So I ran the game again... first zergling(Alien Tremor) gave 2 points just like its supposed to. The others after that give 4.... I have it set up so I am only killing one at a time to be sure.

    Suggestions?

    Edit: I just ran another game and first kill gives me 2 like its supposed to, than the next one gave me 4 again, but this time than another 4. so i have 10 points for 2 kills. I should only have 4 points/
     
    Last edited by a moderator: Mar 4, 2009
  2. Hayden351

    Hayden351 Member

    Joined:
    Jan 26, 2009
    Messages:
    465
    Likes received:
    1
    Trophy points:
    18
    Did you make sure that it doesn't have any of the same thing or connected with other triggers or that it doubles maybe your actions don't make sense

    if its not one of the above i would have no idea
     
  3. MadHaTr

    MadHaTr Guest

    Okay I made new map to test out whats was going on. My findings are weird to say the least.

    Okay so we know a zergling is worth 50 in killsandrazing.

    So my trigger is
    Conditions
    Score(CurrentPlayer, KillsAndRazings, AtLeast, 50);

    Action
    SetScore(CurrentPlayer, Subtract, 50, KillsAndRazings);
    SetScore(CurrentPlayer, Add, 1, Custom);
    PreserveTrigger();



    So this by all means should take away the 50 points I earn from killing one zergling. Right? Wrong.... It only takes away 25 freaking points while Still giving me the 1 Custom point.(ignore custom points from here on out. Im not worried about them is the kills and razing math that's messed up)

    I've found that killing one zergling does permit the trigger to execute but I am left with 25 kills and razing points for some unknown reason. So I decide to test things further.. I make a beacon that gives me 1000 Kills and razing points. With my trigger on.

    I step onto the Beacon, AND guess what. The trigger takes away 50 Points from the total until its at zero. NO PROBLEMS

    So i tinker some more. I step on the beacon. Than go kill a zergling while the points are still counting down. True enough the Ling adds 50 points, and things keep Subtracting per usual. But when its at the last 50 it only takes away 25... so I am left with 25.. WTF.

    So I try making my Trigger take away 25 twice... I go kill a zergling and i'm left with 24 !!

    I than try stepping on the beacon to get 1000 points with the double 25 subtracting.. and you know what it does! it takes away 52! it amazes me...

    WTF is going on? haha here's the test map if u want to see for yourself.

    Computer info.
    OS Vista x64

    Maybes its vista? maybe you'll know the solution once u download the map.... I welcome all help!

    Thanks.

    UPDATE: Also when I subtract 49, it still subtracts 50 after I've stepped on the beacon(1000pts) down to 0. Though when I go kill a zergling I get 50 points than the subtraction occurs and im left with 25. Very weird.

    Also when I subtract 48, it subtracts 48 from 1000 down too 40. Though When I get 50 points from a Zergling kill. it Subtracts to 26

    When I use 51, I end up with 24....
     

    Attached Files:

    Last edited by a moderator: Mar 4, 2009
  4. Hayden351

    Hayden351 Member

    Joined:
    Jan 26, 2009
    Messages:
    465
    Likes received:
    1
    Trophy points:
    18
    I probily can't help you with the map but i realized one of your pobleams a zergling cost 50 points but aren't there 2 zerglings in a egg that cost half a souls so is it that maybe you lost 25 becuse it was half? i don't know about the rest.

    PS
    im 11
     
  5. UnholyUrine

    UnholyUrine New Member

    Joined:
    Feb 3, 2008
    Messages:
    56
    Likes received:
    0
    Trophy points:
    0
    A simple solution would be to Set KillsAndRazings to zero.. rather than subtract... Altho that'd limit you to kill 1 unit at a time.
    Unless you make conditions such as:

    Current player as atleast 50 killsandrazings
    currentplayer as atmost 99 killsandrazings

    action:
    Set to 2 custom score
    set to 0 killsandrazings...

    It'd be also nice to test with subtracting 50 killscore (or just use kills and razings seperately..)

    I honestly have no idea why it doesn't work tho :p