Playmaker Forum

PlayMaker Feedback => Action Requests => Topic started by: westingtyler on October 08, 2018, 11:26:21 PM

Title: "Is Int a Multiple of Another Int?"[SOLVED]
Post by: westingtyler on October 08, 2018, 11:26:21 PM
depending on a setting, i want a sound to play every time a loop count int is a multiple of a certain number, during a looping process. (sound on string typwriter-ing.)

Is (Current Loop Int) a Multiple of 5? YES/NO.

Is (Current Loop Int) a Multiple of 9? YES/NO.
Title: Re: "Is Int a Multiple of Another Int?"
Post by: jeanfabre on October 11, 2018, 04:43:09 AM
Hi,

 for this, you need to check the modulus.

https://stackoverflow.com/questions/3216496/c-sharp-how-to-determine-if-a-number-is-a-multiple-of-another

Look for the IntModulo  custom action on the Ecosystem

Bye,

 Jean