thefluffyraisin 10 Posted October 14, 2014 Hello everyone! I just have a simple question I need answered for a mission. I'm using a script called the ASOR Gear Selector, and in order to us it, you need to place a command in a unit's Init field, using the this addAction command. My question is, can I instead of using the addAction command and using the script via menu, can I have the script run at the start of the mission via trigger. (I.E. : As soon as the mission starts, the gear menu pops up instead of having to select it manually.) Share this post Link to post Share on other sites
maddogx 13 Posted October 15, 2014 What exactly do you have to put in the unit's init field? The addAction command simply calls a script (or code) when the action is selected by the player, so it should be possible to call that script directly instead, for example by using execVM "SCRIPT\PATH". Btw. thread moved to mission editing & scripting. Share this post Link to post Share on other sites
thefluffyraisin 10 Posted October 15, 2014 Thanks for the reply! The init command is as follows: this addAction["<t color=#111111'>Gear Select</t>", "execvm 'ASORGS\open.sqf']; So would how would I directly execute the script? Share this post Link to post Share on other sites
jshock 513 Posted October 15, 2014 (edited) You just pull out the call to the script, being: [] execVM "ASORGS\open.sqf"; ^ This is directly calling the script. Edited October 15, 2014 by JShock Share this post Link to post Share on other sites
thefluffyraisin 10 Posted October 15, 2014 Hmm, when I put that into a trigger it gives me a "Type Script, expected Nothing" error. I'm assuming I have to specify the unit in which I want the script to affect? Share this post Link to post Share on other sites
jshock 513 Posted October 15, 2014 Hmm, when I put that into a trigger it gives me a "Type Script, expected Nothing" error. I'm assuming I have to specify the unit in which I want the script to affect? Yea that or this: null = [unitName] execVM "ASORGS\open.sqf"; And depending on how the script is put together, you may need to make a few modifications to it since you aren't using the addAction any longer. Share this post Link to post Share on other sites