condition that checks 'integer'

MissKerrigan

Active Member
Hello,

I just can't remember how this is done:

Every next wave in my tower defense I set variable 'wave number' +1
Now I want to make a trigger that spawns a normal wave except if the integer is 10,20,30 etc...
Because every 10 waves a boss must be spawned

How do I check in a condition-comparison if the integer is 10,20,30 etc?

MissKerrigan
 

Dave312

Censored for your safe viewing
You need to use the "Mod" function. Mod (short for Modulo) returns the remainder when you divide two numbers. In your case, you want to check if your wave number is a multiple of 10 (i.e the remainder is 0) so you need to use "[Wave Number] Mod 10 = 0" as your condition
 

MissKerrigan

Active Member
Hey Guys,

I'm trying to create this trigger, did I made it correct now?

[/no parse]
Wave Respawn
Events
Unit - Any Unit dies
Local Variables
Conditions
(Number of Living units in Wave Units) == 0
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
Wave Number == (10 mod 0)
Then
General - Wait 2.0 Game Time seconds
Trigger - Run Small Mutalisk Wave (Check Conditions, Don't Wait until it finishes)
Else
General - Wait 2.0 Game Time seconds
Trigger - Run Small Mutalisk Wave (Check Conditions, Don't Wait until it finishes)
Variable - Modify Hitpoints Creeps: + 1
Variable - Modify Wave Number: + 1
[/no parse]
 

Siretu

Starcraft 2 Editor Moderator
Staff member
You're not supposed to place no parse around it. You're supposed to place wc3 around it.

Like this:

[wc3]
*Your trigger*
[/wc3]


Notice how only the second wc3 tag has a slash.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    they got a server engineer job opening :)
  • Ghan Ghan:
    I really do not want to move to California otherwise I might consider it.
  • The Helper The Helper:
    yeah California is not anywhere you really want to live
  • The Helper The Helper:
    That is why I did not take the job Blizzard offered me back in the day, there is no way I could have moved my family there on what they were offering, not even close and that was like 20 years ago
  • The Helper The Helper:
    yeah they wanted me on the tech support team when they did not get me they got one of the next MVPs in Dinobot
  • The Helper The Helper:
    Dinobot was one of the youngest of the MVPs tkron probably could have worked for Blizzard but he had a good job in Chicago doing business programming already
  • The Helper The Helper:
    Dinobot probably still works for Blizzard would love to reconnect with that guy
  • The Helper The Helper:
    I wonder what ever happened to Wargasm?
  • The Helper The Helper:
    This new version of Xenforo really is awesome
  • Ghan Ghan:
    Wargasm is still around. He works for the domain registrar where thehelper.net is kept.
  • Varine Varine:
    Is sqrage still around?
  • The Helper The Helper:
    I have not seen him on lately the forum says he was last on 2 years ago
  • The Helper The Helper:
    How are you doing Varine have not seen you around in a minute
  • thewrongvine thewrongvine:
    lol I live in CA
  • thewrongvine thewrongvine:
    I've got some friends in animation department who have been applying for Blizzard, doing interviews and such. They said the workplace seems nice, though now it'd be all remote work I suppose
  • The Helper The Helper:
    good for them I live close to Austin and am trying to get my kids interested in getting into Games but not having much luck. I would never let them move to Cali.
  • The Helper The Helper:
    unless it was huge money
  • The Helper The Helper:
    and even then with the taxes I really could never let them move there

    Members online

    No members online now.

    Affiliates

    Hive Workshop
    Top