I was wondering if you can make a script where if a variable is a multiple of say 3 then add item or another code?
scn myScriptfloat staticVar ;this is the number youd like to find a multiple offloat multiple ;this is the multiple float testNumber short intToFloat Begin ;add your begin block here set staticVar to 3 set multiple to ???? ;whatever you have in mind if ( multiple < staticVar ) message "is not a multiple" return endif set testNumber to (multiple/staticVar) set inToFloat to testNumber if ( inToFloat == testNumber ) message "it is a multiple" ;do stuff else ;do some other stuff endif End
scn myScriptfloat staticVar ;this is the number youd like to find a multiple offloat multiple ;this is the multiple short testNumber Begin ;add your begin block here set staticVar to 3 set multiple to ???? ;whatever you have in mind set testNumber to multiple / staticVar ; since testNumber is a short and not a float, it will contain a whole number if testNumber * staticVar == multiple message "it is a multiple" ;do stuff else ;do some other stuff endif End
scn myScriptlong staticVar ;this is the number youd like to find a multiple oflong multiple ;this is the multiple Begin ;add your begin block here set staticVar to 3 set multiple to ???? ;whatever you have in mind if multiple % staticVar == 0 message "it is a multiple" ;do stuff else ;do some other stuff endif End