HotosHideout 1 Posted March 20, 2018 I have a function: shout_sound = { player say ["sound", 100, 1]; sleep 2; }; called here: class interact_button7: RscButton { idc = 1606; text = "SHOUT"; //--- ToDo: Localize; x = 0.456847 * safezoneW + safezoneX; y = 0.514004 * safezoneH + safezoneY; w = 0.0986365 * safezoneW; h = 0.0280088 * safezoneH; action = "call shout_sound;"; }; It will fire on gui mouse button click but it will not repeat when clicked again. No matter what i do even if i force the player say command in debug it will not fire. Any help would be appreciated. Share this post Link to post Share on other sites
AZCoder 921 Posted March 20, 2018 Why not just put the player say command inside the action? You can't suspend execution of a thread called with "call" anyway. In fact, it may be throwing an error which would break it. Could also change 'call' to 'spawn' and see if it works better. Share this post Link to post Share on other sites
HotosHideout 1 Posted March 20, 2018 I plan on adding more code including a titleText to the function. I'll try switching it to spawn and see what happens. Share this post Link to post Share on other sites
HotosHideout 1 Posted March 20, 2018 I must have my syntax wrong. I should be able to spawn a function correct? Share this post Link to post Share on other sites
AZCoder 921 Posted March 20, 2018 15 hours ago, HotosHideout said: I must have my syntax wrong. I should be able to spawn a function correct? Absolutely. I will double-check one of my own addons when I get home, I call a bunch of functions from a dialog. action = "[] spawn shout_sound;"; Share this post Link to post Share on other sites
HotosHideout 1 Posted March 20, 2018 Ok, so either way the result is the same. On first click the sound fires. on any click after it does not. Share this post Link to post Share on other sites
AZCoder 921 Posted March 21, 2018 I created a sample mission you can grab here http://www.azcoder.com/arma3/speaktest.Stratis.zip I can click many times and it speaks. Sound sample is from Arma 2. Share this post Link to post Share on other sites