Skip to content

Utilities

NextFTC has a bunch of utility commands to help you simplify your code!

InstantCommand

An InstantCommand runs a function and ends instantly.

kotlin
InstantCommand {
    // code here
}

NullCommand

A NullCommand is a placeholder command that does nothing. It can take an arbitrary amount of parameters when used as a placeholder for another command.

kotlin
NullCommand(parameter1, parameter2)

ForcedParallelCommand

A ForcedParallelCommand schedules another command and instantly ends. This can be useful in SequentialGroups where you want to start a command and move on.

kotlin
ForcedParallelCommand(command)

Alternatively, you can used the .forcedParallel() utility:

kotlin
command.forcedParallel()

PerpetualCommand

A PerpetualCommand wraps another command and never finishes unless it is interrupted. It simply ignores the isDone condition on the command it wraps.

kotlin
PerpetualCommand(commandToWrap)

Alternatively, you can use the .perpetually() utility:

kotlin
commandToWrap.perpetually()