Re: Variables for current rotation/zoom?

Accueil Forums Scripts Variables for current rotation/zoom? Re: Variables for current rotation/zoom?

#2817
IanniX
Maître des clés

After looking at the sticky and understanding it a bit more clearly, I was able to solve my own question by creating a global variable.

var rotation = 0;

//If a message is received
function onMessage(protocol, host, port, destination, values) {
//Message reception

if((protocol == 'midi') && (values[1] == 56)) { //rotates right
rotation += 15;
run('rotate 0 0 ' + rotation);

}
if((protocol == 'midi') && (values[1] == 57)) { //rotates left
rotation += 15;
run('rotate 0 0 ' + rotation);

}
}

© IanniX Association

Qu'est-ce que IanniX ? | Téléchargement | Showcase | Forum | Recherche | À propos