anfo 118 Posted October 6, 2018 Hi Just wondering if anything can be configured in an Addaction statement to prevent it from being used more then once? Thanks! Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted October 6, 2018 1 minute ago, anfo said: Hi Just wondering if anything can be configured in an Addaction statement to prevent it from being used more then once? Thanks! Inside the addAction: _this#0 removeAction _this#2 Cheers 3 Share this post Link to post Share on other sites
major-stiffy 281 Posted October 6, 2018 Within a SQF itself I found this to work. Objectvariablename removeAction 0; Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted October 6, 2018 2 minutes ago, major-stiffy said: Within a SQF itself I found this to work. Objectvariablename removeAction 0; With multiple actions on the same object this could lead to unwanted removal of actions added by other scripts/addOns. Cheers 2 Share this post Link to post Share on other sites
anfo 118 Posted October 6, 2018 Thanks Grumpy Just having issues knowing where in the Addaction syntax your suggestion would reside: object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint] maybe an argument? Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted October 6, 2018 3 minutes ago, anfo said: Thanks Grumpy Just having issues knowing where in the Addaction syntax your suggestion would reside: object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint] maybe an argument? In the script parameter. Cheers 1 Share this post Link to post Share on other sites
davidoss 552 Posted October 6, 2018 32 minutes ago, anfo said: Thanks Grumpy Just having issues knowing where in the Addaction syntax your suggestion would reside: object addAction [title, script, arguments, priority, showWindow, hideOnUse, shortcut, condition, radius, unconscious, selection, memoryPoint] maybe an argument? param "arguments" will be "_this select 3" in executed script. Action id will be "_this select 2" params ["_target", "_caller", "_actionId", "_arguments"]; 1 Share this post Link to post Share on other sites
anfo 118 Posted October 7, 2018 Thanks guys, thread closed. @Grumpy Old Man pointed me in the right direction, but thanks @davidoss for following through Share this post Link to post Share on other sites