loop bitwise exponential with modulus ? (solved)

Jonforum

Veteran
Veteran
Joined
Mar 28, 2016
Messages
1,606
Reaction score
1,399
First Language
French
Primarily Uses
RMMV
I want to give a little headache to the mathematician.
I want to put a formula in a loop.

My context is the following.

awefdaf3.jpg

i need use Bitwise and Moduluse.
thank for sugestion
PHP:
            for (var i=0,D=p.f46e42DX;i<6;i++){
                D = (~D+1)*((i+1)%2);
                console.log('D : ', D );
                $gameScreen.showPicture(pID++, this.pFNR[0+i], 1, p.c85109[0]+D, p.c85109[1]).spine(spineIDReward); //#c85109 REWARD ICONS
            }
My little coffee with rum, which prevents me to find a formula coherente, I absolutely want to go through these 2 operators.
Do you have any mathematical suggestion?

I just have to spread the images here by the center
Therefore logically.
Pic 1: -50X
pic2: +50X
Pic3:-100X
Pix4:+100X
pic5:-150X
pic6:+150X .....
.........................

thank for help


edit:
easy way with random
PHP:
    var startingID = ~~(Math.random() * (this._aniControler._motionStep.starting[lastDX].length)); //starting
    var startingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.starting[lastDX][startingID]);
    var reverseID = ~~(Math.random() * (this._aniControler._motionStep.reversing[lastDX].length)); //reversing
    var reversingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.reversing[lastDX][reverseID]);
    var movingID = ~~(Math.random() * (this._aniControler._motionStep.moving[lastDX].length)); //moving
    var movingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.moving[lastDX][movingID]);
    var endingID = ~~(Math.random() * (this._aniControler._motionStep.ending[lastDX].length)); //ending
    var endingMotion = this._aniControler.getMotionFromName(this._aniControler._motionStep.ending[lastDX][endingID]);
 
Last edited:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

This little brat (my nephew) just invent a new way of enjoying his orange juice by pouring it inside of used perfume bottle and sprayed it to his mouth...
Jamaica? No, Aunty. I said, I'm on RPG Maker :*/
Lunar New Year is over :( but it's time to get back to work!
I keep giving myself deadlines because I'm so excited to finish something but I notice areas where I'm rushing the story and that's what's gonna weaken my overall project, gotta stop that

Forum statistics

Threads
93,692
Messages
914,669
Members
123,289
Latest member
mintminstrel
Top