armybob2000 0 Posted February 19, 2007 So far in my mission i have managed to get a guy i want to simulate he is talking. However when i shoot him he doesnt die. Is there another talk command that i could use. Or some way of ending the enabled .sqs when he is shot. would this stop him from talking and die upon his death? I know how to load a .sqs but no idea how to stop one. Share this post Link to post Share on other sites
armybob2000 0 Posted February 19, 2007 Please help someone, im sure theres at leasto ne person who knows a fix to this problem. Its the talk animation im initializing. But when hes shot he doesnt die. I was thinking of triggers that would end the script upon his death. Would this work? if so could some explain how to get the triggers to work? Share this post Link to post Share on other sites
celery 8 Posted February 19, 2007 Are you playing a sound with the talk animation? You can run a wav file through the Wav2Lip program, put the lip file and sound converted to ogg to mission\sound, do the description.ext modifications and use the guy1 say "soundname" command instead of animations. It makes a soldier move his mouth. Share this post Link to post Share on other sites
Guest Posted February 19, 2007 This might work well for you So you got a script running constantly thats apparently cycling a switchmove to keep him looking like hes talking, ok - Could use a global variable to declare when this guy is hit, so you dont even have to wait for him to actually be dead to end the animation - In either Init.sqs or in a trigger that is set to condition true, once, put in: Guy1Hit = 0 in that units init feild, try this: this addeventhandler ["hit", {Guy1Hit = 1,this switchmove "null", this setbehaviour "Aware"}]; this addeventhandler ["dammaged", {Guy1Hit = 1,this switchmove "null", this setbehaviour "Aware"}] Alright, then in your script, just be sure where ever your loop starts over, before it executes the animation again, just put this in there before it ?Guy1Hit == 1:Exit Untested, but seems this should work. Spent alot of time in the past messing with this same issue using dynamic dialogs, managing this sort of thing when a unit is hit during a continuous animation can get a lil tedious depening on the application, but in this case, this simple approach should work. Edit/ if anything odd comes up after multiple hits from executing those event handlers multiple times, I can prolly find a way to throw in removeEventHandler in there, dont think that would be an issue tho... Share this post Link to post Share on other sites
dr_eyeball 16 Posted February 20, 2007 I know how to load a .sqs but no idea how to stop one. Not sure if this might help you. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Script=[] ExecVM "Script.sqs"; Sleep 5; Terminate _Script; Hint "Script.sqs has been terminated after 5 seconds"; taken from BIKI: terminate Share this post Link to post Share on other sites