Variables for current rotation/zoom?

Accueil Forums Scripts Variables for current rotation/zoom?

2 sujets de 1 à 2 (sur un total de 2)
  • Auteur
    Messages
  • #2269 Répondre
    IanniX
    Maître des clés

    Could anyone tell me what the variables are for the current rotation? I read the manual and saw how to set it to a specific number, but I’d like to make a script that rotates it an addition 15 degrees each time it receives a message or something.

    #2817 Répondre
    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);

    }
    }
2 sujets de 1 à 2 (sur un total de 2)
Répondre à : Répondre #2817 dans Variables for current rotation/zoom?
Vos informations :





© IanniX Association

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