Jump to content

Photo
- - - - -

Mapfact rucksack script without putting the file in mission folder


  • Please log in to reply
3 replies to this topic
Thread Starter
lt. drake jackson
lt. drake jackson

    Sergeant

  • Members
  • 123 posts

#1

Posted 14 October 2010 - 23:33

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.
"Once the first bullet goes past your head, politics... Go right out the window." - Black Hawk Down.
"I don't have time to bleed!" - Blaine, Predator.

Lazy mission designer, know a thing or two about scripting, add-ons config-messing-up guy.

MISSIONS MADE SO FAR:
[MP-COOP] [2-14 P] Recovery and revenge [OFP: Resistance]
As always, more to come soon!

ADDONS (ArmA 3):
MRA US Army and branches (Using G.E.A.R. and DLC support)

zulu1
zulu1

    Sergeant Major

  • Members
  • 1740 posts

#2

Posted 15 October 2010 - 00:22

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, 15 October 2010 - 00:26.

System Specs: [Intel i5 655k 3.2ghz unlocked]...[8gb ddr3 1344mhz ram]...[evga GTX660sc 2gb gddr5]...[Creative Sound Blaster X-Fi Xtreme]
Worlds largest collection of OFP files known to man.

SilverRanger
SilverRanger

    Sergeant

  • Members
  • 108 posts

#3

Posted 15 October 2010 - 14:09

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"


Thread Starter
lt. drake jackson
lt. drake jackson

    Sergeant

  • Members
  • 123 posts

#4

Posted 17 October 2010 - 00:27

Yes, will try that and lets hope it works, Zulu1 and SilverRanger, thanks for the help given :)
"Once the first bullet goes past your head, politics... Go right out the window." - Black Hawk Down.
"I don't have time to bleed!" - Blaine, Predator.

Lazy mission designer, know a thing or two about scripting, add-ons config-messing-up guy.

MISSIONS MADE SO FAR:
[MP-COOP] [2-14 P] Recovery and revenge [OFP: Resistance]
As always, more to come soon!

ADDONS (ArmA 3):
MRA US Army and branches (Using G.E.A.R. and DLC support)