# Odd or Even?

#### Grags_1977

##### Ultra Cool Member
Code:
``````Unit Group - Pick every unit in UnitGroup_HiddenHostile and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of (Picked unit)) Equal to Neutral Hostile
[B]Custom Value of picked unit = even[/B]
Or - Any (Conditions) are true
Conditions
(Unit-type of (Picked unit)) Equal to Spider Crab Shorecrawler
(Unit-type of (Picked unit)) Equal to Murloc Tiderunner
Then - Actions
Unit Group - Remove (Picked unit) from UnitGroup_HiddenHostile
Unit - Unhide (Picked unit)
Else - Actions``````
Custom Value of picked unit = even

How do I do this please?

Maths

#### merlinds

##### Member
First:
http://www.mathsisfun.com/numbers/even-odd.html
So if the number is an integer, just had to:
Divide the number in 2, then mulitply it by 2 and compare the result whit the original one, if they are equal is even if not is odd.

Custom Value of (Picked Unit) == (Custom Value of (Picked Unit) / 2) X 2

#### vypur85

##### Hibernate
Here. Solved this not too long ago.

#### merlinds

##### Member
Yeah, but in this case, the custom value is an integer, so is much simple.

#### Grags_1977

##### Ultra Cool Member
Thankyou. +rep both

EDIT: Bah! Seems I have to spread it about. Owe you one merlinds. Thanks again.

General chit-chat
Help Users
• No one is chatting at the moment.
• tom_mai78101:
Thanks for the context.
+1
• The Helper:
Happy Hump Day!!!
• Blackveiled:
TH old fart gotta have a beer with me one of these days
• The Helper:
I am down anytime Blackveiled
• Blackveiled:
count on it then cause you don't live that far from me hah
• The Helper:
really that is cool!
• The Helper:
Hey Tom I added a new Weird tag to the News Prefixes
• The Helper:
What is up Blackveiled?
• Blackveiled:
Chillin', lurkin'.
• The Helper:
I am working on a bunch of site projects right now doing a bunch of behind the scenes stuff and trying to clean up some stuff that I let slide when I got lazy with the site for a few years...
• The Helper:
Are you in Houston Blackveiled or just in Texas?
• Blackveiled:
Houston
• Blackveiled:
I've been living here since 2014.
• The Helper:
OK banlord we need to get together soon! The only other member of the site I know in Houston is XXX Conan
• The Helper:
and he does not want none lol
• The Helper:
he put up a picture of his mom one time and she was HOT!
• The Helper:
I wish we still had that
• Blackveiled:
Lmao you scared him off I see.
• The Helper:
he will be back
• The Helper:
Conan was like 12 when he started here
• The Helper:
I literally think I was his male role model
• Blackveiled:
Yeah I was 12 when I started here as well.
• The Helper:
you guys were just kids
• The Helper:
I was in my 30s when i got the Blizzard MVP
• The Helper:
I am 53

### Members online

No members online now.