Log in

View Full Version : Extending command groups


Arhowk
26-01-2013, 20:35
Lets say I make a command group with two commands:

commandA
commandB

in commandA, commandA executes commandC. commandA finishes before commandC does. following me? :p

now heres the thing. i want commandC to finish executing before commandB starts. So the flow of events is this

commandA -> commandC (if certain conditions are met) -> commandB

i dont want to put commandC in the commandgroup because commandC could be looped over and over again

arithehun
26-01-2013, 20:54
You could call "isFinished()" in CommandC at the end of the execute method...

Arhowk
26-01-2013, 20:55
You could call "isFinished()" in CommandC at the end of the execute method...

I dont follow

arithehun
26-01-2013, 21:15
Oh, I'm saying you could do that to prevent a loop.

Arhowk
26-01-2013, 23:48
Oh, I'm saying you could do that to prevent a loop.

I have no idea what your talking about. I dont want to prevent any loop?

commandC goes to ->
commandD goes to ->
commandE checks for conditions, if false than repeat commandc if true than go to commandB->

except my group has about 50 commands in it