Crimson Mage 2 Posted May 5, 2020 Hello, I want to have a bunch of objects in my mission have custom ambient sound effects. The way I do this is not very performance friendly but I don't know any other way to do it. Is there a better way to have objects loop a sound effect? Object's init call{ []spawn { while {true} do { tentlight_1 say ["light",10]; sleep 9; }; };} Share this post Link to post Share on other sites
M1ke_SK 230 Posted May 5, 2020 object's init: this spawn { while { alive _this } do { _this say ["light", 10]; sleep 9; }; }; 2 Share this post Link to post Share on other sites
Crimson Mage 2 Posted May 5, 2020 So with that I can delete the object after the player exits the area and it won't harm performance? Share this post Link to post Share on other sites
M1ke_SK 230 Posted May 5, 2020 6 minutes ago, Crimson Mage said: So with that I can delete the object after the player exits the area and it won't harm performance? yes, when you delete object, loop will end and sound will stop Share this post Link to post Share on other sites
Crimson Mage 2 Posted May 5, 2020 Would it be worthwhile to use a trigger to activate the sounds when a player enters the area? Or is the performance loss already minimal. Share this post Link to post Share on other sites
M1ke_SK 230 Posted May 5, 2020 37 minutes ago, Crimson Mage said: Would it be worthwhile to use a trigger to activate the sounds when a player enters the area? Or is the performance loss already minimal. you will probably add heavier condition to loop with checking if any of player is near Share this post Link to post Share on other sites