I would suggest the following:
- Remove
1 =
,2 =
, etc. This is implied with "array" initialization syntax. - Use whitespace to improve readability.
- Consider being more verbose in the action tables by using names instead of indexes. (This will also make the structure more future-proof, as you can add/remove support for certain attributes without having to change the index where each attribute exists.)
For example:
TaskList = {
{ action="MoveTo", location={3,5} },
{ action="AimTo", location={5,2} },
{ action="Fire" },
{ action="MoveTo", location={23,21} }
}