How would i make a script that does one thing then another thing without making 2 seperate scripts?
Details:
i want 2 creatures to move to 2 differnt points then turn arround and play the salute animation.
i want 2 creatures to move to 2 differnt points then turn arround and play the salute animation.
An example of this as its simplest, since you didn't specify under what circumstances it should be done:
void main() {
object oNPC1 = GetObjectByTag("Creature1Tag");
object oNPC2 = GetObjectByTag("Creature2Tag");
location lLoc1 = Location(Vector(1.0, 1.0, 0.0), 0.0);
location lLoc2 = Location(Vector(1.0, 1.0, 0.0), 0.0);
AssignCommand(oNPC1, ClearAllActions());
AssignCommand(oNPC2, ClearAllActions());
AssignCommand(oNPC1, ActionMoveToLocation(lLoc1));
AssignCommand(oNPC2, ActionMoveToLocation(lLoc2));
AssignCommand(oNPC1, ActionDoCommand( SetFacing(GetFacingFromLocation(lLoc1)) ));
AssignCommand(oNPC2, ActionDoCommand( SetFacing(GetFacingFromLocation(lLoc2)) ));
AssignCommand(oNPC1, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE));
AssignCommand(oNPC2, ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE));
}
Where Creature1Tag and Creature2Tag should be the tags of the creatures to do the moving and saluting, 1.0, 1.0 should be changed to the X and Y coordinates within the area they should move to and 0.0 should be set to the angle (0.0 - 360.0 degrees) they should be facing when they arrive at that location.
The circumstances under wich it should be done is when a trigger fires but i can set up the trigger.
Thannks stoffe =)