• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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