Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: "Scripts" folder??

  1. #1

    "Scripts" folder??

    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

  2. #2
    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:
    Code:
    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:
    Code:
    execVM "scripts\test.sqf";


  3. #3
    Quote Originally Posted by Fuzzy Bandit View Post
    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

  4. #4
    Oh. Cool.

  5. #5
    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.

    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?

  6. #6
    Quote Originally Posted by Cyborg112 View Post
    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
    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

  7. #7
    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.

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

  9. #9
    Corporal
    Join Date
    May 26 2009
    Location
    Near Zurich, Switzerland
    Posts
    66
    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 :-).
    My PC
    Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz
    4.00 GB DDR2-800, CL5
    Sapphire HD 5770 1GB GDDR5, PCI-E x16 2.0
    Windows Vista Home Premium SP2

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

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •