# 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
thx Dave! I remember you did explain this to me before and I didn't understand, but now I do! haha

#### 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
Now you're doing [Wave number] == (10 mod 0), Dave told you to do [Wave number] mod 10 == 0.

#### MissKerrigan

##### Active Member
ohh I see! I'll try fix it

didn't my trigger shown up as trigger? I placed the no parse arround it

#### 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]
[/wc3]

Notice how only the second wc3 tag has a slash.

General chit-chat
Help Users
• No one is chatting at the moment.
• jonas:
• The Helper:
Have a great vacation Tom!
• The Helper:
Happy Friday Night!
+1
• V-SNES:
Happy Friday Night!
+1
• The Helper:
Going out of a town for the weekend will be back sunday night! Hope everyone has a great weekend!
+2
• The Helper:
Happy Monday!
• Ghan:
Monday? Speak for yourself.
+2
• The Helper:
Happy Taco Tuesday!
+1
• The Helper:
Tacos!
• The Helper:
Check out the discord for taco pictures You cannot put pictures in this chat
+1
• The Helper:
Damn here come the bots again - 193 online but they are totally invisible to any stats - bunch of bots!'
• C cubanismo:
Re: Taco Tuesday, if there were some way to share edible tacos over the internet, technology would be complete.
+2
• The Helper:
One can only wish!
• tom_mai78101:
I'm back from Taiwan
+1
• The Helper:
I am reorganizing the site I know nobody will notice but I am not done quite yet but the main forums order has been changed and there is a new news category in Other News which is all the remaining headline news stuff not categorized - Headline News is just the stuff that shows on the main page now and the news archive is off the main forums page
• The Helper:
and the real archive lives off of headline news
• The Helper:
Happy Monday!

### Members online

No members online now.