wildbill2016 1 Posted April 16, 2018 In one of my trigger's "onActivation", I use exec "endcine.sqf"; and in this sqf file is like this Sleep 1; bomb = "Bo_GBU12_LGB" createVehicle (getPos dem1); Sleep 2; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget1); Sleepleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget2); sleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget3); sleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget4); sleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget5); this sleep causes generic error.. From all the googled results I only find it is caused by the unscheduled environment. I have found a similar case here It said as long as I put this [] spawn { Sleep 1; bomb = "Bo_GBU12_LGB" createVehicle (getPos dem1); Sleep 2; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget1); Sleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget2); sleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget3); sleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget4); sleep 1.5; bomb = "Bo_GBU12_LGB" createVehicle (getPos ramptarget5); }; In to the trigger's onActivate, it will be Ok, But I got a "Type Script, expect nothing " error.. So how can I add some delay between this explosions? Share this post Link to post Share on other sites
wildbill2016 1 Posted April 16, 2018 Looks like I forgot the null= ..... ...Can I find an updated wiki page to this.. https://community.bistudio.com/wiki/Function Share this post Link to post Share on other sites
theend3r 83 Posted April 16, 2018 Like wildbill2016 said, you need to add a handle (can be "null") to spawn directly in triggers. You don't need to do it when you run the code from a file/function (so putting the second code you posted into the endcine.sqf and execing it would work). Sqf is strange like that. Share this post Link to post Share on other sites
Dedmen 2590 Posted April 18, 2018 On 17.4.2018 at 1:17 AM, theend3r said: Like wildbill2016 said, you need to add a handle (can be "null") to spawn directly in triggers. You don't need to do it when you run the code from a file/function (so putting the second code you posted into the endcine.sqf and execing it would work). Sqf is strange like that. That's not SQF's fault. It's just BI's fault for intentionally bugging script text boxes in the Editor. If you run CBA you don't have that problem because they fixed it. On 16.4.2018 at 11:01 PM, wildbill2016 said: ...Can I find an updated wiki page to this.. https://community.bistudio.com/wiki/Function What update do you want? I don't see much to update. Besides the useless stuff like that function to get the bigger number of two numbers. We have a command for that now. Share this post Link to post Share on other sites