1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Minerals for killing a hive

Discussion in 'Maps and Replays' started by Hodl pu, Apr 2, 2008.

Minerals for killing a hive

Discussion in 'Maps and Replays' started by Hodl pu, Apr 2, 2008.

  1. Hodl pu

    Hodl pu New Member

    Joined:
    Aug 20, 2007
    Messages:
    925
    Likes received:
    2
    Trophy points:
    0
    I made a trigger so every time a player kills something they get 3 minerals.

    However, I don't know how to make it so when they kill a hive, they get 50. Can anyone help me please? =) thanks!
     
  2. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Conditions:
    Kills(CurrentPlayer,Exactly,1,Zerg Hive,All Players);

    Actions:
    SetResources(CurrentPlayer,Add,47,Minerals);


    copy this trigger once for every time you want it to work per player. you have to change the number in the kills condition to 2, then 3, etc.

    in the second trigger, i subtracted 3, because you already got 3 minerals for killing something.
     
  3. Hodl pu

    Hodl pu New Member

    Joined:
    Aug 20, 2007
    Messages:
    925
    Likes received:
    2
    Trophy points:
    0
    so I have to make a crap load of triggers for it to work huh? Well I suppose if there's no way to use 1-2 triggers, haha. Thanks man!
     
  4. LordKerwyn

    LordKerwyn New Member

    Joined:
    Jul 28, 2007
    Messages:
    2,259
    Likes received:
    9
    Trophy points:
    0
    From:
    Deep Space
    There is a way to do it Hodi Pu I just don't know nearly enough about the trigger system to explain it. I just know its possible from something Imagine said awhile back. I think it involves activating some form of score system and then giving a point for killing a Hive and then subtracting 1 point from the score and giving whatever player 50 minerals (or 47 same difference). Im just not sure how to put it in code format or if that is exactly correct.
     
  5. Wlck742

    Wlck742 New Member

    Joined:
    Jul 15, 2007
    Messages:
    2,867
    Likes received:
    0
    Trophy points:
    0
    From:
    In your head
    I'm no expert on triggers, but I think there was something called Preserve Trigger. Maybe that's what you're looking for?
     
  6. LordKerwyn

    LordKerwyn New Member

    Joined:
    Jul 28, 2007
    Messages:
    2,259
    Likes received:
    9
    Trophy points:
    0
    From:
    Deep Space
    There is that wick but depending on the trigger involved I think if a player killed a hive just once he would keep getting 50 minerals every cycle.
     
  7. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    lordkerwyn is correct, if the trigger was preserved, he would get 47 more minerals every single cycle that he had 1 hive kill.

    imagine's way involves finding out the actual starcraft score for killing a hive, then subtracting from your score that amount, then adding 47. but that changes your score, and not your minerals.
     
  8. Hodl pu

    Hodl pu New Member

    Joined:
    Aug 20, 2007
    Messages:
    925
    Likes received:
    2
    Trophy points:
    0
    yeah, I used the kill scoreboard give me minerals for unit kills. The kill scoreboard is already correlated to the players actual kills, so I didn't have to do much. I tried setting killing hives to a custom score, but then... It worked once, then after I killed my first hive, my income would change by getting 50 minerals for everything I killed (not just hives) instead of 3.
     
  9. Hunter

    Hunter New Member

    Joined:
    Aug 21, 2007
    Messages:
    1,057
    Likes received:
    0
    Trophy points:
    0
    From:
    Hungary,Székesfehérvár
    I guess the first idea of EatMeReturns is the sollution, I was thinking of that too. But that wouldn't contain much more triggers... Isn't the switch good for this? or could you solve the problem with preserving the trigger.
     
  10. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    my first idea would be 1 trigger for every time you want it to happen.

    ...basically, if you want to make sure no matter how many hives there are, you get 50 minerals, you would have to copy it about 200 times... maybe 100.
     
  11. Fenix

    Fenix Moderator

    Joined:
    May 21, 2007
    Messages:
    6,769
    Likes received:
    11
    Trophy points:
    0
    Is it just a regular melee map or is it a UMS is a storyline type thing where killing Hives is a prominent feature? I can't see one player making more than 10 hives MAX in any game, probably four at the most if they keep dying. If this is the case, 10 per player. If it is a UMS, have it for the set amount of Hives in tha game.
     
  12. Heres what I did for an rpg I made one time.

    Custom Cash for the hive (lets assume the kill score for killing a hive is 1000)

    (custom cash for one unit only) Works best with hyper triggers so it doesn't mess up


    first trigger
    Condition


    Player's kill score is (kill score for killing a hive)

    Actions:
    Set kill score 0
    Set player resources: add 50 mins
    preserve trigger


    Second trigger
    condition
    Players kill score is at least 1001

    actions
    action set kill score to 0
    preserve triggers


    third trigger
    condition
    Players kill score is at most 999

    actions
    action set kill score to 0
    preserve triggers


    This means that if the player kills anything but a hive, he gets nothing.




    Condition
    Player's kill score is twice the score for killing a hive

    Actions:
    Set kill score 0
    Set player resources: add 100 mins
    preserve trigger

    this is in case the player kills two hives at excactly the same time, faster than hyper triggers can detect and subtract the kill score from one of the two hives being killed.
    Place this before the previous two triggers if you want it to work
    Have fun ^^
     
  13. JakeKessler

    JakeKessler New Member

    Joined:
    Jun 3, 2009
    Messages:
    35
    Likes received:
    0
    Trophy points:
    0
    From:
    Tallahassee, FL
    I'm guessing this is some kind of RPG/campaign map, like the WarCraft III level where you're Grom Hellscream and you have to cut down all the lumber. If that's the case, you probably have a certain number of hives pre-placed on the map. If so, there are a few different ways you can set this up to work.

    1. EatMeReturns's idea is the simplest, because although you have to make a few variations of the trigger, you can just copy the first one you make and change a few of the fields without too much time investment.

    2. Place a location around each hive you've placed in the map. Set up a trigger where if the computer commands at most 0 hives at the location you get 50 minerals. Once again, you'll need a duplicate location and trigger for each hive. It's unlikely in a campaign map that a computer that's lost its hive will be able to build a new base and upgrade all the way to hive before being knocked out, but if you're worried about this you can add an action to the trigger that defeats the computer once its hive is gone. Then just use a different computer player for each of the hives/bases. The result will be a map that is similar to the third and final Terran missions in BroodWar.

    If, on the other hand, your map involves an indefinite number of hives in indefinite places being created over the course of the level, there's really no better way to do things than to use EatMeReturns's idea and just make a whole bunch of redundant triggers. 20... 30... you'll have to come up with a number that's appropriate to your map and a realistic expectation of how many hives a person could theoretically kill in one game.

    For what it's worth, decemberscalm has a really great idea for any map where you weren't already getting money for kills. His system rewards you for hives but nothing else. If you decided to scrap the general kill rewards and only reward killing of hives, his approach is the most simple and uses the fewest triggers.

    Good luck!
     
  14. An Idea...

    You can say:

    If <zerg player> suffers at least one death of Zerg Hive

    Modify resources for <you>: add 50 ore
    Modify death counts for <zerg player>: subtract 1 Zerg Hive
    Preserve trigger

    However, that won't work if there's other players
     
  15. marcmad

    marcmad New Member

    Joined:
    Feb 1, 2009
    Messages:
    166
    Likes received:
    0
    Trophy points:
    0
    I think it could work if you change the "you" by "curreny player" This would mean any player that kill a hive get 50 min(i dont know if it work for comp).

    Anyway I don't really remember but I made a map wich you get different amount of minerals by different building killed so it is possible.
     
  16. Saltamontes

    Saltamontes New Member

    Joined:
    Sep 11, 2011
    Messages:
    1
    Likes received:
    0
    Trophy points:
    0
    This can be done WAY more easy, and with 0 triggers......

    I know this is an old thread but I can't seem to find any related threads that show this solution so here it is:

    Just set the reward value for killing a hive to 47 minerals....
    @ data editor -> select hive -> combat tab -> Kill Resource (set 47 minerals)
    now each time a player kills a hive he/she gets 47 minerals (in addition to 3 for killing something)

    the only drawback is you get a floating number that says +47 when you kill it
    You can just set it to 50 and exclude the hive from the +3 trigger, then you get a nice +50 ;)
     
  17. EatMeReturns

    EatMeReturns Happy Mapper Moderator

    Joined:
    Jun 28, 2007
    Messages:
    1,730
    Likes received:
    11
    Trophy points:
    38
    From:
    Albuquerque, New Mexico
    Sorry saltamontes, but this thread is for a Starcraft: Brood War map, not a Starcraft II: Wings of Liberty map. :D