Unchained 12 Posted October 14, 2010 Hello everyone, I just wanted to ask how I can make the Mapfact's Rucksack script be called without needing to put the script file in the mission folder... for example, create a common mission, dont save, and have the script working when you call it from an initiation line, I saw in ArmA in your user folder you create a folder called Scripts and when you save a script in there you dont need to put the script in the mission folder anymore. But for some reason in OFP it dosnt works... Maybe the resource.cpp file might help? Thanks for reading. Share this post Link to post Share on other sites
zulu1 145 Posted October 15, 2010 (edited) From the readme file: IMPLEMENTING the RUCKSACK into MISSIONSThis pretty easy. You just have to add three lines in the "init.sqs" script of your mission: ;-------------------------------------------------------------------------------------------------------------------------------------- ~1 [] exec "\MAP_Rucksack\Scripts\MAP_RuckInit.sqs" {_x addEventHandler ["fired",{if (_this select 1 in MAP_RuckSackTypes) then {_this exec "\MAP_Rucksack\Scripts\MAP_DropMag.sqs"};}]} foreach [ap,b2,b3,b4,b5,b6] EXIT You need to name your units ap(player), b2,b3,b4 etc. or replace these after the foreach [... with your own names. To add the radio do this: IMPLEMENTING the RADIO into MISSIONSThis isn't too hard neither. For the radio you have to add just a little to your init.sqs: ;-------------------------------------------------------------------------------------------------------------------------------------- ;init.sqs ~1 [] exec "\MAP_Rucksack\Scripts\MAP_RuckInit.sqs" {_x addEventHandler ["fired",{_this exec "EH_Fired.sqs";if (_this select 1 in MAP_RuckSackTypes) then {_this exec "\MAP_Rucksack\Scripts\MAP_DropMag.sqs"};}]} foreach [ap,b2,b3,b4,b5,b6] EXIT ;-------------------------------------------------------------------------------------------------------------------------------------- Then you'll need a description.ext file. Into that you write or copy the following line: ;-------------------------------------------------------------------------------------------------------------------------------------- ;description.ext #include <MAP_Rucksack\Radio.h> Same thing with unit names apply. Edited October 15, 2010 by Zulu1 Share this post Link to post Share on other sites
SilverRanger 11 Posted October 15, 2010 the script doesn't need to be in your mission folder but it does have to be in a pbo somewhere. create a folder, put the rucksack or any other script you need in it, use a converter to create a pbo and put that pbo inside the addons folder. it will be processed when you start the game so all you need to do is call it using the correct path this exec "myNewPBO\myScript.sqs" Share this post Link to post Share on other sites
Unchained 12 Posted October 17, 2010 Yes, will try that and lets hope it works, Zulu1 and SilverRanger, thanks for the help given :) Share this post Link to post Share on other sites