gstar 10 Posted January 23, 2011 Is there a way to combine one init.sqs with another? For example: If I copy the contents of one init.sqs to the existing of another mission - it will just run the top code not the added. Probably not wording this well.:confused: Share this post Link to post Share on other sites
Militant1006 11 Posted January 23, 2011 have you got something in the init thats is ending it earlier? otherwise I would suggest making a completely new init.sqs and copy/paste both codes into it before it is loaded into the game. Share this post Link to post Share on other sites
gstar 10 Posted January 23, 2011 This is what I have: The top part is for an air support script and the bottom is for a coin module script. The airsupport will run, but the coin won't. They both work fine independant from one another. I'm guessing I need to edit something so it won't stop right after the air support? ASfirstrun = true; nul = [r2,"jadam","lgb","cbuap","cbuat","cbumine","cas","helo","trans"] execVM "airSup\airSupInit.sqf"; if(true)exitWith{}; ////////////////////////////////////////////////////////////////// // Function file for Armed Assault // Created by: TODO: Author Name ////////////////////////////////////////////////////////////////// // START OF COIN SETTINGS myMoney = 1000; myCoin setvariable ["BIS_COIN_name","Base"]; myCoin setvariable ["BIS_COIN_rules",[player]]; myCoin setvariable ["BIS_COIN_areasize",[50,50]]; myCoin setvariable ["BIS_COIN_categories",["Base", "Defence"]]; myCoin setvariable ["BIS_COIN_items", [ //--- Class, Category, Cost or [fundsID,Cost], (display name) ["US_WarfareBBarracks_Base_EP1","Base",200,"Barracks"], ["US_WarfareBFieldhHospital_EP1","Base",400], ["US_WarfareBHeavyFactory_EP1","Base",600], ["WarfareBMGNest_M240_US_EP1","Defence",100] ] ]; myCoin setvariable ["BIS_COIN_funds",["myMoney"]]; myCoin setvariable ["BIS_COIN_fundsDescription",["$"]]; myCoin setvariable ["BIS_COIN_onPurchase",{sleep 2}]; // END OF COIN SETTINGS _done = []; { if (side _x == east) then { if ((vehicle _x != _x) && !(vehicle _x in _done)) then { (vehicle _x) addAction ["Salvage","addSalvage.sqf",[],1,false,true,"","!alive _target"]; _done = _done + [vehicle _x]; }; _x addEventHandler ["killed",{(vehicle (_this select 0)) addAction ["Salvage","addSalvage.sqf"];}]; }; sleep .01; } forEach allUnits; Share this post Link to post Share on other sites
ProfTournesol 956 Posted January 23, 2011 Yes, you're exiting the script too early because of this line : if(true)exitWith{}; Delete it or put it at the end of the script. Share this post Link to post Share on other sites
gstar 10 Posted January 23, 2011 Thanks guys! PT that did the trick. Now that I look at it it does seam pretty obvious. Thanks again Share this post Link to post Share on other sites