Results 1 to 5 of 5

Thread: how to make a script

  1. #1

    how to make a script

    how do i make a script?

  2. #2
    Hey Wero,
    Lets start with a tool you will need first:
    Armaedit:
    http://www.armaholic.com/page.php?id...light=ARMAEDIT
    Install it, and then when you run it, there are various types of scripts depending on what you want to do in the game.

    you have
    -SQF and SQL scripts that have various functions, those I really can go into, theres members that would know more then I.
    -Briefing scripts for briefings
    -Descriptio.ext scripts for mp
    -Init scripts and I could go on.

    References:
    Mission Editing and Scripting Information
    http://forums.bistudio.com/showthrea...-NO-Discussion

    Scripting Commands by Functionality
    http://community.bistudio.com/wiki/S..._Functionality

    This may help you:
    Basic Scripting Tutorial
    http://www.armaholic.com/page.php?id...ING%2BTUTORIAL

    Scripting
    http://community.bistudio.com/wiki/Scripting

    Examples of scripts you can try out, and make yourself:
    Script Examples
    http://www.kylania.com/ex/?page_id=72

    I would have to say in my opinion that understanding the editor and knowing how to create a basic mission properly,
    and implement codes, and then be able to apply scripts, is to learn how to use the editor, this would help you get a clearer picture of how the scripts work ingame.
    Mission Editor
    http://community.bistudio.com/wiki/Mission_Editor

    Mission editing Newbie FAQ
    http://www.armaholic.com/forums.php?m=posts&q=6751

    Armed Assault Editing Guide - Deluxe Edition - English version
    http://www.armaholic.com/page.php?id...ight=MR-MURRAY

    Theres alot of members here that can really help you in various directions that know how to create scripts and such,
    but as i said really all depends on what you are looking to do.
    hope that helps.
    IFWarMod for Iron Front Conversion | COSLX for Arma2CO | COWarMod for Arma2CO
    COWarModACE for Ace2 Mod | COWarModI44 for I44 Mod | A2WarMod for Arma2 | A2WarModACE for Arma2 Ace mod | WarMod for Arma1
    Mission Repository Hosting Missions & Files for Iron Front: Liberation 1944 | WarMod Series Website

  3. #3
    ok thank u

    ---------- Post added at 23:23 ---------- Previous post was at 23:21 ----------

    would it let me make rpg type scripts?

  4. #4
    You can make any type of script you want, provided you have an idea, or know how.
    I would hope that some of the scripting masters around here would see the thread here and
    further help you as my knowledge is limited in script building especially from scratch.

    A good way to learn as been said by numerous scripters, and reg people alike on the forums here, is to find a script, or something that does what
    you want and then open it up and see how its done, learn by example.

  5. #5
    OK, let's say you have an enemy vehicle placed on the editor. That vehicle is a Shilka. Let's say you also want it to respawn at the same place it was before, and you only want it to respawn 5 times and 5 minutes after it has been destroyed.

    So place your shilka in the editor and in the init line write the following:

    Code:
    nul = [this, 5, 300] execVM "spawnshilka.sqf";
    You'll understand what is written inside the brackets (array) later so i recommend you to download Notepad ++ from the web first.

    As soon as you've installed notepad ++ create a new file. Now next you need to pass the arguments of what you written inside the brackets of the init line of the shilka to the script. So you need to use the select command. It allows you to select arguments from the array that is calling the script:

    Code:
    _veh = _this select 0;
    _lives = _this select 1;
    _delay = _this select 2;
    _type = (typeOf _veh);
    _dir = (getdir _veh);
    _position = (getpos _veh);
    So now you've selected arguments from the calling array and got extra assigned variables to be able to use BIS_fnc_SpawnVehicle. It will spawn a crewed vehicle. See here:

    http://community.bistudio.com/wiki/BIS_fnc_spawnVehicle

    Let's keep going with our script:

    Code:
    private ["_veh","_lives","_delay","_type","_dir","_position"];
    
    _veh = _this select 0;
    _lives = _this select 1;
    _delay = _this select 2;
    _type = (typeOf _veh);
    _dir = (getdir _veh);
    _position = (getpos _veh);
    
    
    _loop = true;
    while {_loop} do {
      if (!alive _veh) then {
        if (_lives == 0) then {
          _loop = false;
        } else {
          _lives = _lives - 1;
          sleep _delay;
          deletevehicle _veh;
          _veh = [_position, _dir, _type, EAST] call BIS_fnc_spawnVehicle; 
        };
      };
      sleep 1;
    };
    Ok if you want to learn, take a look at the script, and take a look here :

    http://community.bistudio.com/wiki/C...pting_Commands

    Browse through the commands i'm using in the script i wrote, and try to understand what is going on. Feel free to post your doubts and questions.
    Arma 3 and xAItment.

    1 Sentence. 1 Erection. 1 Jizz.

    Please vote for this:

    http://dev-heaven.net/issues/13606

Similar Threads

  1. How to make Explosives script?
    By ssm4862 in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 3
    Last Post: Jan 29 2011, 23:15
  2. Help to make a script
    By PicVert in forum OFP : CONFIGS & SCRIPTING
    Replies: 2
    Last Post: Nov 26 2003, 02:28
  3. Help needed to make a script
    By PicVert in forum OFP : CONFIGS & SCRIPTING
    Replies: 6
    Last Post: Nov 24 2003, 11:15
  4. How do i make a script?
    By kimble275 in forum ADDONS & MODS: COMPLETE
    Replies: 1
    Last Post: Apr 14 2002, 12:54
  5. How do i make a script?
    By kimble275 in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 1
    Last Post: Apr 14 2002, 12:54

Posting Permissions

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