RotaMafia 0 Posted August 6, 2017 Hello c",) first of love this forum, it has really helped me a lot ! . . . well over to my first post in here. Or this is more of a question; how do i get a chopper to wait untill it has been fully loaded before take off?.. "i meen not like if player is in, or if a spesific group is in. I only want a line to make the chopper wait untill every seat is full, or no more space in cargo." Maybe somthing like: waitUntil {heli is full} AND {!isNull player}; or waitUntil {heli fullcargo} AND {!isNull player}; Please help me you see i have made a mission where you must contact, rescue and finally load rescued civilian units on to a waiting chopper. "i started with a dream to count the rescued units onboard the heli, and then give score fore each. But seeing as this was a bit over my skill level i choose to have it only take of when fully loaded and the give a static score. I am using simple shop by HoverGuy i was hoping to give money for each rescued civilian loaded." Hope you are the right person to help me, i have really searched everywhere . . . Best regards RotaMafia. Share this post Link to post Share on other sites
Larrow 2821 Posted August 6, 2017 waitUntil{ { isNull ( _x select 0 ) }count fullCrew[ heli, "cargo", true ] isEqualTo 0 }; Wait until none of the cargo seats are null (_x select 0 (the object occupying the seat) is objNull if it is not occupied). 50 minutes ago, RotaMafia said: i started with a dream to count the rescued units onboard the heli Roughly the same _numRescuedCivs = { !isNull ( _x select 0 ) && { side ( _x select 0 ) isEqualTo civilian } }count fullCrew[ heli, "cargo", true ]; Count all cargo spots in the heli that are not null and the occupant is side civilian. 1 Share this post Link to post Share on other sites
RotaMafia 0 Posted August 13, 2017 Thank you @Larrow, You are a true legend ! c", ) The Commands works like a charm ! have really struggled with this one, True Newbie :) Since i am on the topic of being a newbie at scripting, how would i go about getting these lines: [50,0] call HG_fnc_addOrSubCash; AND [25,0] call HG_fnc_addOrSubXP; to run for each _numRescuedCivs? Also seeing as I am on a roll, of questions.. Are there a easy why do display how many that was rescued to the player/players?... - If this was too many questions, thats no problem You have helped me plenty already ! Thanx Again, RotaMafia c", ) Share this post Link to post Share on other sites
HazJ 1289 Posted August 14, 2017 Use a forEach loop. https://community.bistudio.com/wiki/forEach { [50, 0] call HG_fnc_addOrSubCash; [25, 0] call HG_fnc_addOrSubXP; } forEach (fullCrew [heli, "cargo", true]); I'm not sure what those functions look like... Maybe you will need to pass the unit to them? In that case, something like: { [_x, 50, 0] call HG_fnc_addOrSubCash; [_x, 25, 0] call HG_fnc_addOrSubXP; } forEach (fullCrew [heli, "cargo", true]); You'll need to modify your function though, unless it already has that. Inside the function, use the passed unit when adding XP/cash. 1 Share this post Link to post Share on other sites
RotaMafia 0 Posted August 14, 2017 Woww ! # Why i Love Bohemia, Arma 3 and its community.... Thanx @HazJ ! c", ) { [50, 0] call HG_fnc_addOrSubCash; [25, 0] call HG_fnc_addOrSubXP; } forEach (fullCrew [heli, "cargo", true]); Works perfectly ! With Larrow and your help this become even better then i thought ! Much more then a game, this is a full-blown hobby Can't wait till Laws of War, bet it will be perfect with this play goal, in different ways ! Thank you both, so many nights i have wished i knew some one how also enjoy this, and maybe could help me, with just a push in the right direction Recommend all stuck i the same position, just ask ! This is clearly a very helpfull and friendly community ! Share this post Link to post Share on other sites