marki980908 23 Posted July 10, 2021 I am trying to make an animation for an execution, for some reason, when I try to execute a sequence of animations, it gives me an error and just plays the last one, here is my code: shooter switchMove "Acts_Executioner_Kill"; shooty switchMove "Acts_ExecutionVictim_Kill"; sleep 1.733; shooty switchMove "Acts_ExecutionVictim_Kill_End"; sleep 2.7; shooty switchMove "Acts_ExecutionVictim_KillTerminal"; Shooter being the executioner, and shooty being the victim. What it does now for some reason, it just starts playing Acts_execution_KillTerminal emote without anything above And gives me "Error generic error in expression" Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 10, 2021 (edited) Show the complete error message copy/pasted from .rpt file! Edit: https://community.bistudio.com/wiki/Crash_Files#Location But I guess there could be an invisible character on the position of the hashtag (or maybe the < sign) in the error message. Edited July 16, 2021 by sarogahtyp Share this post Link to post Share on other sites
marki980908 23 Posted July 11, 2021 On 7/10/2021 at 6:41 PM, sarogahtyp said: Show the complete error message copy/pasted from .rpt file! Edit: https://community.bistudio.com/wiki/Crash_Files#Location But I guess there could be an invisible character on the position of the hashtag (or maybe the < sign) in the error message. 20:16:22 Suspending not allowed in this context 20:16:22 Error in expression <witchMove "Acts_ExecutionVictim_Kill"; sleep 1.733; shooty switchMove "Acts_Ex> 20:16:22 Error position: <sleep 1.733; shooty switchMove "Acts_Ex> 20:16:22 Error Generic error in expression 20:16:22 Suspending not allowed in this context 20:16:22 Error in expression <hMove "Acts_ExecutionVictim_Kill_End"; sleep 2.7; shooty switchMove "Acts_Exec> 20:16:22 Error position: <sleep 2.7; shooty switchMove "Acts_Exec> 20:16:22 Error Generic error in expression Here is how rpt file looks like Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 11, 2021 Quote Suspending not allowed in this context this is the important information... You are using a suspension method (sleep in this case) in an unscheduled environment. This is not allowed as you can read in the biki entry of Scheduler. Therefore you have to ensure that your code runs scheduled. You can achieve that with a simple spawn: private _dummy = [] spawn { shooter switchMove "Acts_Executioner_Kill"; shooty switchMove "Acts_ExecutionVictim_Kill"; sleep 1.733; shooty switchMove "Acts_ExecutionVictim_Kill_End"; sleep 2.7; shooty switchMove "Acts_ExecutionVictim_KillTerminal"; }; 1 Share this post Link to post Share on other sites
marki980908 23 Posted July 16, 2021 On 7/11/2021 at 8:27 PM, sarogahtyp said: this is the important information... You are using a suspension method (sleep in this case) in an unscheduled environment. This is not allowed as you can read in the biki entry of Scheduler. Therefore you have to ensure that your code runs scheduled. You can achieve that with a simple spawn: private _dummy = [] spawn { shooter switchMove "Acts_Executioner_Kill"; shooty switchMove "Acts_ExecutionVictim_Kill"; sleep 1.733; shooty switchMove "Acts_ExecutionVictim_Kill_End"; sleep 2.7; shooty switchMove "Acts_ExecutionVictim_KillTerminal"; }; Thanks it worked, any idea how to add sound to that? Like: private _dummy = [] spawn { shooter switchMove "Acts_Executioner_Kill"; shooty switchMove "Acts_ExecutionVictim_Kill"; sleep 1.733; playSound3D [getMissionPath "sound\exeshot.ogg", shooter, false, getPosASL _this, 5, 1, 0]; shooty switchMove "Acts_ExecutionVictim_Kill_End"; sleep 2.7; shooty switchMove "Acts_ExecutionVictim_KillTerminal"; }; Gives me generic error Share this post Link to post Share on other sites
sarogahtyp 1105 Posted July 16, 2021 try to learn from what you read and restart here: Share this post Link to post Share on other sites
pierremgi 4738 Posted July 16, 2021 40 minutes ago, marki980908 said: private _dummy = [] spawn { shooter switchMove "Acts_Executioner_Kill"; shooty switchMove "Acts_ExecutionVictim_Kill"; sleep 1.733; playSound3D [getMissionPath "sound\exeshot.ogg", shooter, false, getPosASL _this, 5, 1, 0]; shooty switchMove "Acts_ExecutionVictim_Kill_End"; sleep 2.7; shooty switchMove "Acts_ExecutionVictim_KillTerminal"; }; getposASL _this? .... _this is what? 1 Share this post Link to post Share on other sites
marki980908 23 Posted July 17, 2021 On 7/16/2021 at 6:30 PM, pierremgi said: getposASL _this? .... _this is what? Thanks, but I have solved it, I noticed it maybe 30 seconds after I started looking into logs. Thanks anyway, it worked perfectly, that code above does a pretty nice execution with sound and stuff, if you have ogg file Share this post Link to post Share on other sites
johnnyboy 3741 Posted July 19, 2021 On 7/16/2021 at 7:48 AM, marki980908 said: Thanks it worked, any idea how to add sound to that? This will work for the sound. Its for the in-game .45 pistol. _s = "a3\sounds_f\arsenal\weapons\pistols\4-five\4-five_01.wss"; _unit = shooty; playSound3D [_s,_unit, false, getPosASL _unit, 1.5]; Share this post Link to post Share on other sites
marki980908 23 Posted July 20, 2021 On 7/19/2021 at 6:30 PM, johnnyboy said: This will work for the sound. Its for the in-game .45 pistol. _s = "a3\sounds_f\arsenal\weapons\pistols\4-five\4-five_01.wss"; _unit = shooty; playSound3D [_s,_unit, false, getPosASL _unit, 1.5]; I had a custom sound file, but yours is even better thanks! 1 Share this post Link to post Share on other sites