View Single Post
Old 10-25-2013, 09:42 PM   #319
Fair Strides
@Fair Strides 2
Witty Programmer
Fair Strides 2's Avatar
Status: Moderator
Join Date: Jan 2012
Location: Oregon, United States
Posts: 756
Current Game: Master of Orion 2
Originally Posted by Taunger View Post
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.

All of my mods are available on Deadlystream.

Always remember modders: "Quality= Effort*Time"

KSE 3.3.7 is LIVE!!! Check it out here.
Fair Strides 2 is offline   you may: quote & reply,