Quote: --- Original message by: Glitcherguy
(script startup insertion
(begin
(ai_place insert_marines)
(wake get_prepared)
(ai_allegiance player human)
(ai_conversation jhonson)
(sleep (sound_impulse_time "sound\dialog\x10\sgt05"))
(ai_conversation jhonson_right)
)
)
He's not playing sound tags, he's using the AI conversations from the scenario.
You can check the status of a conversation:
(ai_conversation_status [conversation])
returns the status of a conversation (0=none, 1=trying to begin, 2=waiting for guys to get in position, 3=playing, 4=waiting to advance, 5=could not begin, 6=finished successfully, 7=aborted midway)
So if you want to wait until 'jhonson' finishes successfully (6), you can use (sleep_until) like so:
(sleep_until (= (ai_conversation_status jhonson) 6) 1)
But I would recommend checking for 7 and 5 as well, because if either of those end up happening then the script will hang there permanently since it won't finish successfully, so this is what I would do:
(sleep_until (or
(= (ai_conversation_status jhonson) 6)
(= (ai_conversation_status jhonson) 5)
(= (ai_conversation_status jhonson) 7)
) 1)