• Announcements

    • Jervant

      Bohemia Store Steam Redeem   06/24/17

      We started experiencing problems with the Steam redeem from our Store on Friday June 23rd.   For anyone that got affected by this, please go to your store account, after you select the product you purchased, you should see your steam key with a link to a how to article to activate it manually through Steam.   We apologize for the inconvenience.
Sign in to follow this  
Followers 0
lt. drake jackson

Mapfact rucksack script without putting the file in mission folder

4 posts in this topic

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  
Followers 0