A question about VCS

How to use the function “pressed()”?
I guess I should add something into “()”,but what?

My comment here was about .pressing(), my bad.


Vcs has been replaced with vexcode. Its the same language, but it is a good idea to switch at some point.

pressed() returns true or false based on if the corresponding button has well… been pressed. It is usually used in if statements like so:

If (Controller1.ButtonA.pressed()){
    Spin a motor

No. Pressed does not work like that. You need to make a function outside of your while loop. It looks like this

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.