Asmodeuz 54 Posted November 19, 2017 Hello, so far I've managed to find two actions that probably govern what can be done with a fireplace object. These actions are: FirePutDown and FireInflame but I'm falling short on how to put these to use in a meaningfull way. What might be a good way to prevent players from using Put out fire and Light fire actions from the action menu when they are close to a fireplace (that can be lit or put down)? Share this post Link to post Share on other sites
pierremgi 4906 Posted November 20, 2017 run in init.sqf or any common script / init field of an object inGameUISetEventHandler ["Action", " if ((_this select 3) in ['FireInflame','FirePutDown']) then { hint 'you cant do that!'; true } "]; 1 1 Share this post Link to post Share on other sites
lexx 1392 Posted November 20, 2017 If it should *never* be possible, I guess I would just spawn the fireplace as simple object? Share this post Link to post Share on other sites
fn_Quiksilver 1636 Posted November 20, 2017 simple object would not have fire effect, if he wants it Share this post Link to post Share on other sites
Asmodeuz 54 Posted November 20, 2017 10 hours ago, lexx said: If it should *never* be possible, I guess I would just spawn the fireplace as simple object? 9 hours ago, fn_Quiksilver said: simple object would not have fire effect, if he wants it Almost the first thing I tried was that I set the fireplace to be a simple object and like fn_Quiksilver mentioned there the effect was just that. No fire, where fire was needed. 14 hours ago, pierremgi said: run in init.sqf or any common script / init field of an object inGameUISetEventHandler ["Action", " if ((_this select 3) in ['FireInflame','FirePutDown']) then { hint 'you cant do that!'; true } "]; pierre, that worked like a charm from the in-game editor when placing that script in the Init -field of the fireplace. I'd take a guess you already knew that though :) How would that needed to changed so that it would work on a dedicated server, since there the game is giving the following error: 16:57:33 Error in expression <inGameUISetEventHandler ["Action", " " if ((_this select 3) in ['FireInflame','> 16:57:33 Error position: <if ((_this select 3) in ['FireInflame','> 16:57:33 Error Missing ] Share this post Link to post Share on other sites
Dedmen 2716 Posted November 20, 2017 1 minute ago, Asmodeuz said: How would that needed to changed so that it would work on a dedicated server, since there the game is giving the following error: 16:57:33 Error in expression <inGameUISetEventHandler ["Action", " " if ((_this select 3) in ['FireInflame','> 16:57:33 Error position: <if ((_this select 3) in ['FireInflame','> 16:57:33 Error Missing ] That error is just because you copy pasted it incorrectly. As you can see in the color of the syntax highlighting here. Change the "Action", " " to "Action", " with just one quote. Also the script doesn't work if you only run it serverside. You have to run it clientside. Either put it into the init box of one object or into init.sqf 2 Share this post Link to post Share on other sites
Asmodeuz 54 Posted November 20, 2017 35 minutes ago, dedmen said: That error is just because you copy pasted it incorrectly. As you can see in the color of the syntax highlighting here. Change the "Action", " " to "Action", " with just one quote. Also the script doesn't work if you only run it serverside. You have to run it clientside. Either put it into the init box of one object or into init.sqf How the h*ll I managed to mix that additional quote in there between! Either way removing the surplus quote got everything in working order and now pierre's little script runs just fine in dedicated server too. Thank you @pierremgi for the initial script and @dedmen for correcting my stupidity! Share this post Link to post Share on other sites