each 10 waves a boss must appear

Discussion in 'Starcraft 2 (SC2) Editor Help' started by MissKerrigan, Apr 8, 2013.

  1. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    Hello Guys,

    My problem is multi-way, I try to explain it down here

    - I want the new wave to run ONLY if all creeps in the game are killed (also other players)
    - So I placed the creeps in the unit group wave units after they spawned
    - The trigger-event is creep dies/escapes and the condition is when the unit group wave units is empty, then a new wave will be spawned

    This works very nice but I got one question:

    - How do I spawn 9 normal waves and a boss after? (1 boss each 10 levels)

    Marloes


    note: I can't create a trigger that repeats 9 times and creates a boss after, because the new wave must start only when the last creep in the game is killed or has escaped
     
  2. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    Have a global integer variable that keeps track of your current level. So have the integer start at 1 and then every time you spawn a wave, add one to the integer. Then you can have a check that checks if it's level 10, spawn a boss wave, otherwise spawn a normal wave.

    To adapt this to make it every 10 waves and not just wave 10, set up the condition to be Modulo(level, 10) == 0
     
  3. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    which condition is checking if the integer is 10? and what's a module?
     
  4. Phubar

    Phubar Well-Known Member

    Ratings:
    +30 / 0 / -0
    Modulo(X,Y) gives you the remainder of the division X/Y
    Es Modulo(5,2) gives 1 (5/2=2 with remainder 1)
    Modulo(12,7) gives 5 (12/7=1 with remainder 5)
    Modulo (12,10) gives 2 (12/10=1 with remainder 2)
    Modulo (20,10) gives 0 (20/10=2 with remainder 0)

    When you need to start a weave make an If/Then/Else action and use the conditions to check if the value of "Modulo(level, 10) == 0" is true (you are in a 10, 20, 30, 40 wave) and then spawn a Boss, else you are in a middle weave so spawn normal creeps.
     
  5. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    sorry I don't get it

    module 12,7 = 5
    module 12,10 is 2

    why then module 20,10 isn't 10??

    I guess we're going to much into math now :(


    Can't I just make a trigger like this?

    action:

    if: integer is 10
    then: create boss
    else: create normal wave

    ??
     
  6. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    It's a simple operation. You don't have to know how it works, just use it.

    If you want to understand:
    You put the second number as many times as possible in the first one, how much is left? Imagine that the first number is a box of that size and the second number is an item.

    Example: modulo 12,7: How many times can you put 7 in 12? Well, you can only put it there one time. So what do you have left? Well you have 12-7 = 5 left.

    Example modulo 13,4: How many times can you put 4 in 13? You can put it 3 times because if you take four of it, you get 16 which doesn't fit in the 13 box, so the max is 3. If you put 3 4's in the 13 box, how much do you have left? Well 3 boxes of 4 has the size 4*3 = 12. If you put 12 in 13, you got 1 left.

    Example: modulo 20,10: How many times can you put 10 in 20? Well, two times because 2*10 is 20. If you put 20 in a 20 box, how much do you have left? Nothing! It's all full! So you got 0 left.
     
  7. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    so what's the point of this?
    which numbers do I have to make now?

    I have 24 creep waves, and the 25th is a boss

    Maximum level is 200, so it are 8 bosses in total


    Let me guess: I have to make a module 24,1 now?
     
  8. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    No, you'd have modulo 24,25. How many times does 25 fit in 24? 0 times. How much is left? 24!

    Also, I thought you had boss levels every 10 levels?
     
  9. X-maul

    X-maul AKA: Demtrod

    Ratings:
    +200 / 0 / -0
    If your boss waves are not in a specific order (every 5 or 10 wave) then just make a condition that checks if the wave is 10, another one checking if it's 25 and so on, for every boss level.
     
  10. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    1. yes I had bosses each 10 waves, but after each boss, a new unit in the command card will be unlocked, it's too fast if I create this after each 10 rounds

    2. I still don't get it, I'm very sorry I must sounds really stupid now

    25 fits 0 times in 24, but why then is 24 left???
    and how can I understand, if the number is 24, then 24 waves are coming and 1 boss after?



    (X-Maul: if there would be a condition that checks if the integer is a specific number, then I already would figured it out)
     
  11. X-maul

    X-maul AKA: Demtrod

    Ratings:
    +200 / 0 / -0
    If you go right click the conditions and click New Element, you will see this screen;
    [​IMG]
    Then you click where I marked with red.
    Then you will see this;
    [​IMG]
    Click the red circle, and you will see all your variables (Global and local for that trigger).
    Now select the variable you want to compare, and depending on what type it is, you can set the camparing part to something. If it's an integer variable, you can set it to a number, if it's a boolean you can set it to true or false, and so on.

    In the end it will look like this;
    Code:
    Untitled Trigger 001
        Events
        Local Variables
            X = 0 <Integer>
        Conditions
            X == 1
        Actions
            YOUR ACTIONS!
    
     
    • Like Like x 2
  12. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    !!!! I DIDN'T KNOW THIS YET !!!!

    Does this means, that if I add +1 to an integer every wave, I can trigger the boss waves if the variable is 24/49/74 and 99?

    That would just be making 4 condition triggers for 4 bosses, I'm gonna try this out


    THANK YOU!
     
  13. X-maul

    X-maul AKA: Demtrod

    Ratings:
    +200 / 0 / -0
    You're very welcome. You have to understand that a condition is just a camparison of 2 values. each value can be set to either a variable, or a function to get a value.
     
  14. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    There's also a condition called compare. If you look at X-mauls first picture, there's a list of conditions with "Comparison" currently selected. If you want it to trigger at 24/49/74/99, you have to use an OR and then afterwards create the conditions with X-mauls instructions. This way, it checks if the wave is 24 OR 49 OR 74 OR 99.

    If you don't do this, it'll check if the wave is 24 AND 49 AND 74 AND 99, and that obviously wont work since it cant be two different waves at the same time.
     
  15. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    so instead of making 4 triggers, I can just make an 'or' condition with the values 24,49,74 and 99? thanks

    But there must come only 1 boss when the condition is true
     
  16. X-maul

    X-maul AKA: Demtrod

    Ratings:
    +200 / 0 / -0
    The OR condition returns true, if any of the conditions are true :)

    In your case, it will check if any of the 4 values, then it will return true, if not, then false.
     
  17. Siretu

    Siretu Starcraft 2 Editor Moderator Staff Member

    Ratings:
    +295 / 0 / -0
    So yes, there will only come one boss when the condition is true.
     
  18. MissKerrigan

    MissKerrigan Active Member

    Ratings:
    +23 / 0 / -0
    txx
     

Share This Page