View Single Post
  #12   Spotlight this post!  
Unread 09-02-2013, 17:20
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 543
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Run Command Once When Trigger is Pressed

Quote:
Originally Posted by inkspell4 View Post
Will that work even if the command takes more time to execute than the trigger is held for?
No.

if you use whenPressed (or whenActive), it will activate when the button is pressed and wont stop untill isFinished returns true

if you use whileHeld (or whileActive), it will activate when the button is pressed and wont stop untill isFinished returns true OR the button is released (if the button is released, the command is cancelled but the "end" method will not run and the "interrupted" method will. Keep that in mind when setting things like shooter jags)

Last edited by Arhowk : 09-02-2013 at 17:22. Reason: made wording more clear
Reply With Quote