ok from what i understand
firing a weapon will run a series of animations
if you then fire while the animations are running, then it will cause another anim to run.
this can be done with a booleans, arrays and some form of timing counter
dunno whether this is ai and player or just player, so will try and make an ai compatible version for ya
excuse the long variable names, they are for clarity
Init.sqs tx_Unit_in_Anim = []
tx_stopPlay = false
tx_firedevents = 0
fired event script_unit = _this select 0
if(_unit in tx_Unit_in_Anim)then{goto "INTERRUPT_ANIM"}else{tx_Unit_in_Anim = tx_Unit_in_Anim + [_unit]}
tx_start_time = time
_unit playmove "AAA"
if(tx_stopPlay)then{exit}
_unit playmove "BBB"
if(tx_stopPlay)then{exit}
_unit playmove "CCC"
if(tx_stopPlay)then{exit}
tx_Unit_in_Anim = tx_Unit_in_Anim - [_unit]
exit
#INTERRUPT_ANIM
tx_firedevents = tx_firedevents +1
if(tx_firedevents > 1)then{exit}
tx_stopPlay = true
#LOOP
if ((time - tx_start_time) <= 5)then{_unit switchmove "XXX"}else{unit switchmove "YYY"}
~1
tx_firedevents = tx_firedevents -1
if(tx_firedevents > 0)then{goto "LOOP"}else{tx_Unit_in_Anim = tx_Unit_in_Anim - [_unit];tx_stopPlay = false;exit}
ok the basics
first fired event1) places the unit in a global array
2) creates a global variable which saves the mission time that the initial fired event occurred at
3) If no other fired events occur, then :
..........all the anims are played through
.......... the unit is removed from the array
.......... and the system is reset
4) If another fired event occurs during these anims, this second fired eveny then:
.......... Issues a boolean "tx_stopPlay" which stops the playmoves in the first fired event script
.......... Increases a fired event counter by 1 (used if a 3rd or more fired events occur during the switchmove anims)
5) If a third or more fired event DOES NOT occur, then:
.......... it plays the switchmoves once
.......... decreases the counter back to 0
.......... exits the loop
.......... and removes the unit from the array
6) If a third or more fired events occured while the second fired event script is running then:
.......... It loops its switchmoves until the counter reaches 0
7) Any additional fired events that occur while the second event is running, will simply increase the counter then exit
The reason for the array (ai compatability) for ai local to the players client
If this is only run on a player, then use a boolean instead
hope that helps
NB>>> you may have to place pauses after each playmove or switchmove, not sure if the script waits for the move to be played before reading the next line or if it runs through all the lines and places the moves in a queue