AddCommand is a weird Callback. When you have to set the ExtraData, you have to fill all other parameters with 0 and have to count how many 0's (I think there were 8 of them) and the datatypes are not clear (A Script Call needs casted types)
An other manko is that you cannot define your own AI-Commands (AttackBow, Guard) (you have to write helper callbacks)
My Suggestion is that the Parameters are stored into an array and you can define your own Commands:
with the new Callbacks
This function is called every 10 Frames till Done is true or 'Timeout' frames are over.
An other manko is that you cannot define your own AI-Commands (AttackBow, Guard) (you have to write helper callbacks)
My Suggestion is that the Parameters are stored into an array and you can define your own Commands:
AddCommand (object Clonk, string Command, array Params, int Timeout)
with the new Callbacks
function CommandAttackBow(object Clonk, array Params, bool& Done)
This function is called every 10 Frames till Done is true or 'Timeout' frames are over.
No, AddCommand is not a callback, it's a global function. And this is something you can already do as a script function. Simply reissue a call command every time it's executed before calling the callback.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill