Jump to content
Sign in to follow this  
Unchained

Mapfact rucksack script without putting the file in mission folder

Recommended Posts

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

From the readme file:

IMPLEMENTING the RUCKSACK into MISSIONS

This 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 MISSIONS

This 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 by Zulu1

Share this post


Link to post
Share on other sites

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×