I wrote a little skill routine. It works but when it is finished, I have to end each other commands with done before being able to call the next one ("Finish current command before starting new command")If I run other skill routines, when I finish it, this strange behaviour disappears.So, something in these other routines si needed in the new one to avoid this behaviour.But in my stop/cancel I have a axlCancel(Finish)EnterFun, an axlClearSelSet but nothing put Allegro back to normal.I saw that my stop routine set some variables to nil but if I go to skill mode in allegro and display these variables, some are not set like they should be after a stop....Any help would be greatly appreciated...Thanks.
axlShell("done") should do the trick. It ends the active command similar like the ESC key or entering done in the command window.another way would be to enclose your skill code in this if:if( axlOKToProceed(t) then .. your codeelse printf( "E- finish current command first!\n"));end-if Tobias
thanks for this. that helps me not to crash Allegro while forgetting to finish the active command by launching my routine.But I still have the problem that at the end of my routine, I hhave to "done" all commands to be able to get next one.
How are you starting the command?If you put a procedure that calls axlShell("done") into a command register, then the command is called automatically when starting a new command.procedure(MYFinishCommand() axlShell("done"))axlCmdRegister("mycommand" 'MYCommandStart ?doneCmd 'MYFinishCommand ?cancelCmd 'MYFinishCommand)This also automatically makes a context menu (Right mouse click) with "Done" and "Cancel" in it.