Moving text blocks in ModKit

  1. 2 weeks ago

    In VEX coding studio, is there a way to move text blocks around without going back to block view? (When programming robots with Modkit.)

  2. callen

    Nov 5 Braintree, MA, USA

    Yes. You can just cut and paste stuff in the text section, and the blocks will adjust. To confirm it, I just made this code using blocks:

    when(STARTED){
      while(true){
        wait(1,seconds);
        if(Brain.Screen.pressing()){
        }
      }
    }

    I cut and pasted the wait() command to here:

    when(STARTED){
      while(true){
        if(Brain.Screen.pressing()){
        }
        wait(1,seconds);
      }
    }

    The blocks adjusted appropriately. So just cut and paste like you might otherwise do to move a line of code.

  3. Edited 2 weeks ago by sreynolds8

    What about when you have different event handlers?

  4. callen

    Nov 7 Braintree, MA, USA

    I didn't realize Modkit had event handlers built into it. When I looked at sensing the controller I didn't see the .pressed and .released methods, so I just figured Modkit didn't use event handlers. That wouldn't have been surprising to me since VEX stated more things would be available at higher levels of coding.

 

or Sign Up to reply!