Poll: Was this thread helpful?

Be advised that this is a public poll: other users can see the choice(s) you selected.

Results 1 to 8 of 8
  1. #1
    Lystic's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    'Murica
    Posts
    498
    Reputation
    31
    Thanks
    4,717
    My Mood
    Bashful

    Exclamation Learning To Script? Look No Further! BI Wiki Can Help You!

    Note: Definitions are Italicized
     

    This section covers what a script is and different ways to execute it with and without cheats.
     
    Script -- Covered on quiz
    Syntax -- Covered on quiz
    SQF
    Script Execution -- Covered on quiz



    What is a Script? When programmers refer to a script in the ArmA realm they are referring to a .sqf file. A Script is a plain text file that can be edited using a program like notepad. SQF is another, more definite, term for a Script. Every script follows the same Syntax. A Syntax is the grammar for a programming language. If a script is not following the correct Syntax then the code will create an error in game (Note: Errors can be viewed with the -ShowScriptErrors parameter in game).

     
    Code:
    /* Hello World Script
       Created By Lystic
       On September 17th 
       2014
    */
    hint 'Hello World';

     
    Code:
    /* Kill player script
       Created By Lystic
       On September 17th 
       2014
    */
    player setDamage 1;

    How are Scripts Executed? Scripts can be executed through: Mission files, Script Executers, PBOs, In Game Debug Monitors, and Other Scripts. A Script Executer is an external program that executes a selected script in game. Script Executers are generally perceived as Hacks or Cheats, but in some cases these can be used to improve security and/or test new features in game.


     

    This section covers the basics to programming in the scripting language
     
    Block -- Covered on quiz
    Statement -- Covered on Quiz
    Variable -- Covered on quiz
    Command -- Covered on Quiz
    Control Structure -- Covered on Quiz
    Value Assignment -- Covered on Quiz
    Data Type -- Covered on Quiz



    This section covers the basics to programming including how to make your own hello world script, different data types, functions, parameters, and operators.

    What is a datatype? DataTypes are different kinds of values such as: NUMBER, STRING, BOOLEAN(true/false).

    What are Variables? Variables are Name placeholders for DataTypes.
    What is a LOCAL Variable? These variables are LOCAL to the block. Check the example to learn more!
    What is a GLOBAL Variable (use these if you are new to scripting)? These variables are GLOBAL to every block. Check example to learn more!
    What is a Block? A block is a chunk of scripting code grouped together. (Starts and Ends with {}).

     
    Code:
    _variable = 2;

     
    Code:
    //Local Variable (this code gives an error)
    _function = {
       _localVariable = 2; //creates a local variable within the function block
    };
    call _function; //executes the function block
    hint str _localVariable; //error _localVariable is not defined in this block!

     
    Code:
    //Global Variable Example
    _function = {
        globalVariable = 2;
    };
    call _function;
    hint str globalVariable; //no error. Outputs '2'


    Scripts are executed one Statement at a time. A Statement is either a Value Assignment, Control Structure or Command. What is a value assignment? a Value Assignment is when a Variable is given a value. A Control Structure is either an If-Statement, While-Loop, Switch-Statement, ForEach-Loop, or For-Loop. Loops are Control Structures that repeat the code within their block until their conditional statement is false. A Command is a word that represents some kind of functionality in game.

     
    Code:
    //Loop Example
    while{true} do {
        hint 'Infinite Loop';
    };

     
    Code:
    //If Example
    _value = 2;
    if(_value == 2) then {
        hint '_value is 2';
    };

     
    Code:
    //Switch Statement
    _value = 4;
    switch(_value) do {
        case 1: {hint 'Value is 1';};
        case 4: {hint 'Value is 4';};
    };

     
    Code:
    //For Loop
    for "_i" from 1 to 4 do {
        hint 'I am repeating 4 times!';
    };

     
    Code:
    //ForEach Loop
    _array = [1,2,3];
    {
        hint str(_x);
    } forEach _array;


    Coding on your own: Now I want to see you create a script on your own. This script is supposed to output the words 'Hello World' onto screen (in any fashion).
     
    Code:
    //these are only a few of the ways
    hint 'hello world';
    cutText 'hello world';
    titleText 'hello world';
    systemChat 'hello world';


    Coding on your own: Expand this script to heal the player and tell the user that they have been healed.
    Code:
    //Check https://community.bistudio.com/wiki/setDamage for setDamage info
    player setDamage 1;
    
     
    Code:
    //this is only one example (there are more ways to do this!)
    player setDamage 0;
    hint 'you have been healed!';


    Coding on your own: Make the player fly into the sky and notify the users that they are now a rocket ship.
     
    1) use setVelocity (look at BIWiki)

     
    Code:
    //makes player launch into sky
    player setVelocity [0,0,100];



    After these two sections, if you can create those basic scripts on your own (section 2) then you are on your path to becoming a scripter!

    (if im not allowed to use this quiz link could a mod remove it and not the post plz?)
    https://www.onlineexambuilder.com/bas...quiz/exam-8503 (click play without account plz)

    I Recommend Looking At The Following Links for More Information

    The Information was derived from these links:
    https://community.bistudio.com/wiki/...n_to_Scripting
    https://community.bistudio.com/wiki/Script_(File)
    https://community.bistudio.com/wiki/SQF_syntax
    https://community.bistudio.com/wiki/Data_Types
    https://community.bistudio.com/wiki/Block
    https://community.bistudio.com/wiki/Control_Structures
    https://community.bistudio.com/wiki/Variables
    https://community.bistudio.com/wiki/Magic_Variables
    https://community.bistudio.com/wiki/Operators
    https://community.bistudio.com/wiki/Exception_handling
    https://community.bistudio.com/wiki/Function
    https://community.bistudio.com/wiki/Statement
    https://community.bistudio.com/wiki/Parameter
    https://community.bistudio.com/wiki/Argument
    https://community.bistudio.com/wiki/...ommands_Arma_3
    Last edited by Lystic; 09-17-2014 at 08:50 PM.

  2. The Following 3 Users Say Thank You to Lystic For This Useful Post:

    Gabroskii (12-05-2016),MrMadNoobbie (10-11-2014),wirychair32 (09-18-2014)

  3. #2
    extasy hosting's Avatar
    Join Date
    Jan 2014
    Gender
    male
    Location
    IN_MY.SQF
    Posts
    82
    Reputation
    10
    Thanks
    1,007
    My Mood
    Aggressive
    Good stuff for beginners to learn !
    Last edited by extasy hosting; 09-17-2014 at 09:29 PM.
    ƁӀасќ Ḷеԍіѳи

  4. #3
    EazzyKilla's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    Canada
    Posts
    45
    Reputation
    10
    Thanks
    1
    Hey can you add me on skype? I need some help :c

  5. #4
    Jim Morrison's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Canterlot, Equestria
    Posts
    12,444
    Reputation
    1090
    Thanks
    3,336
    Maybe you should make a full fledged tutorial.
    /Stickied


    MPGH Staff History:
    Minion: 02-12-2013 - 6-28-2013
    Former Staff: 6-28-2013 - 7-14-2014
    Minion: 7-14-2014 - 1-3-2015
    Minion+: 1-3-2015 - 6-1-2015
    Moderator: 6-1-2015 - 10-2-2016
    Global Moderator: 10-2-2016 - Current

    Current Sections:
    DayZ Mod & Standalone Hacks & Cheats
    BattleOn Games Hacks, Cheats & Trainers
    Minecraft Hacks
    Other Semi-Popular First Person Shooter Hacks
    Blackshot Hacks & Cheats
    Need For Speed World Hacks
    Other First Person Shooter Hacks
    CounterStrike: Global Offensive Hacks
    Garry's Mod Hacks & Cheats


    Donating:
    If you want to donate money to me I take Bitcoin & Paypal, PM me for either of these if you're interested and thanks.
    Top Donators: (Awesome People)
    FanticSteal $75.00
    smurf_master $58.00 <- Best DayZ Gear Seller
    Fujiyama $25.00
    [MPGH]Black $10.00
    [MPGH]Hova $10.00
    xJudgez $4.54
    [MPGH]Normen's Sheep $3.50
    eminemlover $1.50


    Brony?
    https://www.mpgh.net/forum/groups/1728-mpgh-bronies.html

  6. #5
    Lystic's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    'Murica
    Posts
    498
    Reputation
    31
    Thanks
    4,717
    My Mood
    Bashful
    Quote Originally Posted by NormenJaydenFBI View Post
    Maybe you should make a full fledged tutorial.
    /Stickied
    Thought of it, don't really have time, maybe ill expand this later, BI Wiki is a really good resource though

  7. #6
    EazzyKilla's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    Canada
    Posts
    45
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Lystic View Post
    Thought of it, don't really have time, maybe ill expand this later, BI Wiki is a really good resource though
    Do you think you can help me more?? can add me on skype pl0x i need chu ;-;

  8. #7
    LBP1906's Avatar
    Join Date
    Jul 2014
    Gender
    male
    Posts
    20
    Reputation
    10
    Thanks
    8
    Very good tutorial!

  9. #8
    135058israel's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    i need some help plz add me on skype so we can speak about it skype is jigglypanda13

Similar Threads

  1. Looking For A Clan? Look No Further! IUberkillerz Tryouts!
    By Trunky in forum Combat Arms Clan Recruitment & Advertising
    Replies: 3
    Last Post: 09-07-2009, 08:58 PM
  2. Op7 D3D Hack From ME! VISTA USERS LOOK NO FURTHER
    By cancerous1337 in forum Operation 7 Hacks
    Replies: 43
    Last Post: 06-01-2009, 08:34 PM
  3. [Release]IP/MAC Banned? Look No Further!
    By ShawnRocks in forum Combat Arms Hacks & Cheats
    Replies: 21
    Last Post: 09-04-2008, 08:58 PM
  4. want a 5 digit steam account? look no further
    By FlashMeNow in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 3
    Last Post: 07-04-2007, 03:37 PM
  5. want a 5 digit steam account? look no further
    By FlashMeNow in forum General
    Replies: 0
    Last Post: 06-09-2007, 03:05 AM