lago 0 Posted February 22, 2004 Hi, I'm new to making missions so please bare with me. I have two script files, One for a one click helo pickup the other is a one click artillery. Since both have a INIT.sqs only one can be in the mission file. Can you combine both into one INIT.sqs file and have them work? This may be basic stuff but I have no idea. Thanks in advance Share this post Link to post Share on other sites
j-man 0 Posted February 22, 2004 Just copy the stuff from one init file into the other. Share this post Link to post Share on other sites
lago 0 Posted February 23, 2004 Thanks J-Man already tried that. Seems that whatever script is at the top of INIT.sqs file is the only one that will work. I even used the mission that shows you how to use the one click helo pickup, cut and pasted the contents of the artillery INIT.sqs file into helos INIT file. Like I said the artillery script was first then the pickup. Any other ideas? Share this post Link to post Share on other sites
j-man 0 Posted February 23, 2004 Mabey you could post the contents of your init.sqs so people could have a look Also, you need to make sure that you only put variables, arrays, commands calling other scripts, etc... into your INIT.sqs file. If you put the entire arty. and pickup script into you init.sqs file, everything will just mess up. Share this post Link to post Share on other sites
lago 0 Posted February 23, 2004 This is what is in the INIT.sqs file ;Helicopter Transport (map click) v1.0 ;by Skumball (simongoddard4@yahoo.co.uk) titleText ["Select radio (0,0,1) and click the map to move the Blackhawk to the location\nSelect radio (0,0,2) to send the Blackhawk back to base","plain"] 2 setRadioMsg "null" heliPilot setBehaviour "careless" heliPilot setCombatMode "blue" heliPilot assignAsDriver heli heliPilot moveInDriver heli #loop ? !(alive heliPilot) : goto "dead" ~2 goto "loop" #dead onMapSingleClick {} 1 setRadioMsg "null" 2 setRadioMsg "null" "blackhawk" setMarkerType "empty" exitonMapSingleClick {[_shift,_alt,_pos] exec "Artillery.sqs"} ARTfire = false ARTammo = 100 ARTadjustment = [0,0] exit Share this post Link to post Share on other sites
Spinor 0 Posted February 23, 2004 Hi, you have to remove the final 'exit' command from the first inserted script, thats probably why the execution stops on the first one: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">... 2 setRadioMsg "null" "blackhawk" setMarkerType "empty" onMapSingleClick {[_shift,_alt,_pos] exec "Artillery.sqs"} ARTfire = false ARTammo = 100 ARTadjustment = [0,0] exit Alternatively, instead of pasting the script contents, I would rename the existing init scripts, like "initHeliTransport.sqs" and "initArtillery.sqs" and write a new init.sqs with: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "initHeliTransport.sqs" [] exec "initArtillery.sqs" This will avoid any conflict. BTW, you may still encounter problems with the two scripts because they obviously rely on a map click. One may shadow the other. Share this post Link to post Share on other sites
Wadmann 0 Posted February 23, 2004 Hey lago! Â Â If all that you are after is the ability to single map click artillery and heli transport without possible conflicts, I would recommend that you use snYper's SP/MP Support pack available from this page. Not only does it have artillery and heli transport, it also allows air strikes and reinforcements in a variety of flavors! And it is only a 348kb d/l! It may be a bit more complicated than the scripts that you are using but once you get the hang of it, you will then see just how versatile it is! As a big fan of snYper's work, I take any opportunity to promote his creations. Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Wadmann Share this post Link to post Share on other sites
m21man 0 Posted February 23, 2004 If you want to use 2 init scripts, just rename these two scripts init1.sqs and init2.sqs. Now in your init.sqs put: <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">[] exec "init1.sqs" [] exec "init2.sqs" Share this post Link to post Share on other sites