Canderis Posted October 26, 2008 Share Posted October 26, 2008 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. Link to comment Share on other sites More sharing options...
stoffe Posted October 26, 2008 Share Posted October 26, 2008 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("[color=SkyBlue]Creature1Tag[/color]"); object oNPC2 = GetObjectByTag("[color=SkyBlue]Creature2Tag[/color]"); location lLoc1 = Location(Vector([color=Yellow]1.0, 1.0[/color], 0.0), [color=Plum]0.0[/color]); location lLoc2 = Location(Vector([color=Yellow]1.0, 1.0[/color], 0.0), [color=Plum]0.0[/color]); 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. Link to comment Share on other sites More sharing options...
Canderis Posted October 26, 2008 Author Share Posted October 26, 2008 The circumstances under wich it should be done is when a trigger fires but i can set up the trigger. Thannks stoffe =) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.