• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Conditions question

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =)

How to I make this: In my action (with the event: Time - Every 0.03) is a counter ( Integer variable ) Every 0.03 seconds, this variable is set +1. Now I want check with a condition, when this variable goes to 30,60,90,120 ....

I know I can to this with or - conditions, but then I need a long list, which is not the plan, so is it possible to check this with only one condition?

I have a way with 2 counters, so it one gets +3 and other +4, they meet at 12,24,36,48..... but that's my last way is the other thing isn't possible ^^

Thanks and greetings
~ The Bomb King > Dr. Boom
 
Level 7
Joined
Dec 24, 2009
Messages
257
Well... In Condition - Integer Comparison, there's an option looks like this
Math - Modulo
Divided mod Divider
Set the divided number == the variable; the divider number is the number you want (30 for example); it will work well i think.
Good luck! =]
 
Level 16
Joined
May 1, 2008
Messages
1,605
Moin moin =O

THis cannot be I think, because look:

blpksn2qvma3lfhn8.jpg


First of all it looks like this and now I type in these 2 red thinks values. But if I press ok then I got this:

blpktc6wtk0c0q49g.jpg


So what have I put into the 0? Or I didn't get the point? =O

Thanks and greetings
The Bomb King > Dr. Boom
 
Level 7
Joined
Dec 24, 2009
Messages
257
Well... You said that you have a variable [X] and for each 0.03 secs it goes up by 1. You want to check if [X] is equal to 30/60/90.... but you don't want to make an infinity number of trigger right? well all numbers like 30, 60, 90... have the same result when you multiply 30 by [integer] time. So if [X] is divided by 30, it gives an integer result; means
[X] mod 30 = 0
So if you set trigger like
Event: Every 0.03 seconds of gameplay
Condition: Integer comparison - [X] mod 30 Equal to 0
Action:

All will work well
 
Status
Not open for further replies.
Top