El Mariachi 0 Posted January 7, 2015 I'm trying to get an empty object to be present at mission start if a mission parameter is set to a certain number. I know I'm calling the right parameter because I can do it in other scripts in the mission, I just don't know if the syntax is different for whatever reason in the Condition of Presence field. The Mission Parameter's default is set to 1, so I know that this is the param called in the mission editor when previewing a mission. I've tried the following: ((paramsArray select 1) == 1) paramsArray select 1 == 1 (paramsArray select 1) == 1 The object is never present when I've tried any of the above options. Share this post Link to post Share on other sites
jshock 512 Posted January 7, 2015 Did you actual use an if statement or just one of the portions of code above? Share this post Link to post Share on other sites
El Mariachi 0 Posted January 7, 2015 Just one of the codes above. Why would I need to put an if statement, isn't that 'assumed' in the condition field? At least, that's how I've always assumed it has worked. For example: Place a unit in the editor, name it bob, and have its probability of presence set below 100% then, place a unit in the editor, name it phil, and set the condition to (alive bob) When you test the mission, phil won't spawn unless bob does. You haven't explicitly added an 'if' statement, yet it still works. Unless you're saying something else and I completely miss the point. Share this post Link to post Share on other sites
jshock 512 Posted January 7, 2015 (edited) Actually sorry, complete misread on my part. And it may be initialization order that is causing the issue, though I'm not sure, I personally haven't messed with CfgParams before (understand them, haven't used them). EDIT: Have you tried simply hinting the mission param variable to make sure it is defaulting/working properly? Edited January 7, 2015 by JShock Share this post Link to post Share on other sites
El Mariachi 0 Posted January 7, 2015 I'm pretty sure its working because I call on that mission parameter to determine what vehicles spawn at the beginning in a script. Share this post Link to post Share on other sites
Larrow 2800 Posted January 7, 2015 (edited) Seems ok here from a quick TEST using ((paramsArray select #) == #) in the Condition of Presence field. I was expecting as JShock said that perhaps paramsArray was not available at initial spawn and only became available at mission start, time > 0, but the above test worked for me first time. Edited January 7, 2015 by Larrow Share this post Link to post Share on other sites