Page 1 of 1

on_command_finshed event

Posted: Wed Jun 22, 2016 8:57 am
by SixpackButtermilch
The problem is that there is currently (in my opinion) no comfortable way to see whetever an unit has finished its command and how it finished it.
I don't like having to poll LuaEntity::has_command() or LuaUnitGroup::state.
So a on_command_finished event would be great, maybe with parameters of kind

event.player_index
event.entity

if the command was a compound command of type

Code: Select all

defines.compoundcommandtype.logical_and
or

Code: Select all

defines.compoundcommandtype.logical_or 
maybe also give the index into

Code: Select all

define.scommand.compound.commands
at which it stopped: event.stopped_index.

Furthermore I would have a question regarding

Code: Select all

defines.compoundcommandtype.return_last
The docs say:
compoundcommandtype.return_last Perform all the commands and return lasts result
Which kind of result does it return to whom?
nice one :D
How are commands compounded in a compounded compound command commanding compound composts.
Kind regards
SixpackButtermilch

Re: on_command_finshed event

Posted: Wed Jan 18, 2017 9:02 pm
by Humpfry
I would be interested in something along these lines, no one seems to be interested in this.

Re: on_command_finshed event

Posted: Thu Jan 19, 2017 9:37 pm
by Earendel
+1

Re: on_command_finshed event

Posted: Wed Feb 01, 2017 9:45 pm
by aubergine18
Such an event would facilitate custom waypoints / patrols, eg. for AI automated vehicles.

Re: on_command_finshed event

Posted: Tue Sep 01, 2020 8:29 am
by Bilka