silentghoust 132 Posted July 21, 2014 Using Igi_PL load script, I have created a task that involved retrieving crates of medical supplies from a downed helicopter and bringing them back to base. I can get one crate to properly trigger, simply having cargo1 in thislist; in the condition of the trigger, but I can't seem to get the other containers grouped up under the same trigger. Meaning you need all 3 crates to finish the objective. I know Thislist is a array function but how do I add additionial items to this array? Share this post Link to post Share on other sites
squeeze 22 Posted July 21, 2014 (edited) Put mainArray = [] in the players init line or somewhere else . Then in each of your trigger condition mainArray = mainArray + thislist All three should be in mainArray once all three have been triggered. I'd help with the foreach command also but this is hard work writing code on a phone Edited July 21, 2014 by Squeeze auto correct on phone sucks....sometimes Share this post Link to post Share on other sites
Larrow 2820 Posted July 21, 2014 (edited) {_x in thislist}count [cargo1, cargo2, cargo3] == 3 For each [cargo1, cargo2, cargo3] it will run the code {_x in thislist}, where _x is each one of your cargo#'s in turn. If {_x in thislist} is true then a hidden counter will be incremented, here we ask if the total count is equal to 3. The whole expression returns TRUE if the each cargo# is in thislist. It is a short version of saying cargo1 in thislist && cargo2 in thislist && cargo3 in thislist Which would also work. Edited July 21, 2014 by Larrow Share this post Link to post Share on other sites