Using relealsed function in VCS

  1. 2 weeks ago

    46102x

    Nov 6 antarctica 46102x

    When using the released function in VCS the API shows this format released(void(*callback)(void)) and i get an error using just this that says error: invalid operands to binary expression ('bool' and 'void') and cant figure out what i should do to resolve this issue
    if (Controller1.ButtonL1.released()) {
    random code
    }

    intstead of: Controller1.ButtonL1.released()

    use

    !Controller1.ButtonL1.pressing()

  2. Zach 929U

    Nov 6 Answer 929U

    intstead of: Controller1.ButtonL1.released()

    use

    !Controller1.ButtonL1.pressing()

  3. callen

    Nov 6 Braintree, MA, USA

    For some added clarity, .released is for use with event handlers. It looks for when the button is released and only fires off once. It does not check let you know about it not being held down, though. You stick a function into this, that function being activated when a held-down button becomes no longer held down.

 

or Sign Up to reply!