Hold down button to activate

By LadylexUK

Description: In many AAA games you may have a button you have to hold down to activate something – that could be a door opening, a chest opening, skip a cut scene etc..

  1. WHEN [not][boolvar:activate]
  2. …WHEN DO [display][text:Hold to activate][icon:B][screen bottom right][priority][2]
  3. …WHEN [control:B] DO [numvar:hold B][incremented by][1]
  4. …WHEN [control:B][released DO [numvar:hold B][equals][0] // button returns to 0 when you release
  5. …WHEN[started to] [numvar:hold B][greater than or equal to][160] DO  [boolvar:activate][equals][true]
  6. …WHEN [numvar:hold][greater than][0][and][not][boolvar:activate]
  7. …/…WHEN DO [numvar:hold][greater than][0] DO [display][Quarter circle down][scale][0.4][screen bottom right][priority][1]
  8. …/…WHEN DO [numvar:hold][greater than][50] DO [display][Quarter circle left][scale][0.4][screen bottom right][priority][1]
  9. …/…WHEN DO [numvar:hold][greater than][100] DO [display][Quarter circle up][scale][0.4][screen bottom right][priority][1]
  10. …/…WHEN DO [numvar:hold][greater than][150] DO [display][Quarter circle right][scale][0.4][screen bottom right][priority][1]
  11. WHEN [boolvar:activate] DO // whatever happens when the button press is successful




Comments are closed.

Website Powered by WordPress.com.

Up ↑

%d bloggers like this: