Jump to content
Sign in to follow this  
meade95

"Scripts" folder??

Recommended Posts

Does it work if you create a folder called 'scripts' in both your My Documents/ARMA2 folder (as well as in your Main/ARMA 2 folder)....Will these scripts then be avaliable / used in any and all maps/missions you create in the editor? Or do you need to create a scripts folder for each map/mission created?

Thanks

Share this post


Link to post
Share on other sites

You'll need to create a scripts folder for each map/mission created.

Or just put them straight in your mission's folder.

For example, if I placed an sqf file called test.sqf in with a mission's mission.sqm, I could call it by using:

execVM "test.sqf";

If, however, I placed that same sqf file in a folder called 'scripts' inside my mission's folder, I would then have to call it using:

execVM "scripts\test.sqf";

Share this post


Link to post
Share on other sites
You'll need to create a scripts folder for each map/mission created.

Or just put them straight in your mission's folder.

False.

You can create a script folder in your Profiles folder (..\ArmA 2 Other Profiles\YourName\Scripts). Then all missions can use the scripts which are in that folder.

I have ~20 scripts in it :D

Share this post


Link to post
Share on other sites

Well, on my side, I cant never run one of those script no matter what. I actually want to add a action to a player so it places an IED, the thing is that I call the .sqf and guess what? it makes nothing. is there some special way of writing down the code inside the .sqf file? here is my code.


///SET IED

markerstr = createMarker["markername",player]; markerstr setMarkerShape "ICON";  "markername" setMarkerType "Destroy"; "markername" setMarkerSize [1,1];  iedTexture = "Grave" createVehicleLocal (getMarkerPos "markername"); iedTexture setPos(getMarkerPos "markername"); iedTexture setPos (getMarkerPos "markername");

///EXPLODE IED

_ied = "BO_GBU12_LGB" createVehicle (getMarkerPos "markername");deleteVehicle iedTexture; deleteMarker "markername"

I have to add a code to that activates the Explode IED menu an removes the SET IED menu, but I think is quite simple. Any help?

Share this post


Link to post
Share on other sites
False.

You can create a script folder in your Profiles folder (..\ArmA 2 Other Profiles\YourName\Scripts). Then all missions can use the scripts which are in that folder.

I have ~20 scripts in it :D

Where exactly do you put this folder?

Within your MY Documents ARMA folder? ...Or within the MAIN C:/ ARMA Folder??

In either case, I currently do not see a folder labled "Other Profiles"??

Thanks for the help

Share this post


Link to post
Share on other sites

Keep in mind that this will not work in multiplayer unless all other players have the same script folder or the scripts are only serverside.

Sidenote: The same thing works with addons. To save me from having to compile the PBO over and over again while testing, I put some scripts directly in the ArmA2 folder and execute them there. This also allows to make changes on the fly. Alt+tab to desktop or use windowed mode, change the script and have some sort of trigger in your mission to reload it.

Very very very useful. :)

advanced sidenote: On a dedicated server this could also be used for making dynamic mission content. (i.e. settings controlled by a serverside script and web-interface). For example one could make some sort of coop/multiplayer mission that allows registered players of an event to choose/buy the equipment/reinforcements for that mission in advance with a small webpage.

Share this post


Link to post
Share on other sites

So does the Script folder you make....Go in the main ARMA folder (C:drive) or the ARMA folder within the "My Documents"...

Share this post


Link to post
Share on other sites

I have the scripts folder in the user\documents\arma 2 folder, on the same level like the missions folder. That works for most scripts. There are a few scripts which need to be in the mission directory themselves.

If I want to give away a mission, I put the scripts directly in the mission folder too, otherwise they wouldn't get packed in :-).

Share this post


Link to post
Share on other sites

I can only get mine to work within the mission folder, anything else and it can't find them.

Share this post


Link to post
Share on other sites

" Extract the folder to your ArmA2\other Profiles\Yournick\Missions and load it in the editor"

I keep seeing the above directions on where to put certain "Templates / and or/ Scripts"...(For example, a template of a "Compact USMC FOB setPos")...

But where exactly is this? I do not have a folder called "other profiles". Should I create one??

Edited by meade95

Share this post


Link to post
Share on other sites
" Extract the folder to your ArmA2\other Profiles\Yournick\Missions and load it in the editor"

I keep seeing the above directions on where to put certain "Templates / and or/ Scripts"...(For example, a template of a "Compact USMC FOB setPos")...

But where exactly is this? I do not have a folder called "other profiles". Should I create one??

same here.

Share this post


Link to post
Share on other sites

No. You don't need to create one. Just that if you use a custom profile to play, rather than the default one, you'll have a My Documents\ArmA 2 other profiles\ directory. Otherwise you can shorten the path to My Documents\ArmA 2\missions (if the folder should be in the missions folder, rather than just in the profile folder at the same level as the missions and mpmissions folders. Haven't tried, and the posts in this thread aren't really conclusive on the matter)

Share this post


Link to post
Share on other sites

I've just tried again and if I do put my scripts folder in any other place than the mission and as long as I give it the correct route it sees the file.

However it fails to run the script but gives no in game error there is an error in the RPT file

Invalid path (only relative paths supported): 'D:\Documents and Settings\joe\My Documents\ArmA 2\missions\scripts\setpos.sqf'

Of course I do have the file in that location.

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  

×