Originally Posted by Taunger
Say, can anyone enlighten me on the exact difference between the ActionDoCommand and AssignCommand functions (in K1)?
I found someone saying that ActionDoCommand works for assigning actions, and AssignCommand for non-actions. If that is true, then what exactly is an action and what is a non-action (that is still assignable)?
Well, the documentation for both are:
// 294: Do aActionToDo.
void ActionDoCommand(action aActionToDo);
// 6: Assign aActionToAssign to oActionSubject.
// * No return value, but if an error occurs, the log file will contain
// "AssignCommand failed."
// (If the object doesn't exist, nothing happens.)
void AssignCommand(object oActionSubject,action aActionToAssign);
In my experience, one should/would use the first function at times where the target is one's self, ie: in the On***(Fill in with: Spawn, Heartbeat, Attacked, and the other events), or in a cutscene.
What happens with each? Well...
ActionDoCommand adds the action to the front(top?) of the action queue, making it happen immediately.
AssignCommand, however, adds the action to the end(bottom?) of the action queue, allowing for one to "chain" actions together.