Results 1 to 7 of 7

Thread: Help w/ Weapons and Scripting

Hybrid View

  1. #1

    Question Help w/ Weapons and Scripting

    I am new to the whole ArmA: Cold War Assault/OFP game. I understand how scripting works but I am guessing without the Int. line and name line I can not fill ammo crates. I need to fill the crates because for some strange reason the crates have absolutely no weapons (ex M21 is not in the Ammo Weapon West). Just wondering how can I script weapons in.

    Another help if making ammo crates is impossible I need help finding a script that will let me and my friends re-spawn with the gear they started with. Again if this is not possible I guess I am SOL

    Thanks for any advice or just telling me if its not possible.

  2. #2
    Yes, both of your ideas are possible. They're very basic things in mission editing and have also been answered a numerous times before. If you would use the forum search function, I'm sure you'll find the answers in other threads.

  3. #3
    Rookie
    Join Date
    Jun 26 2010
    Location
    Maryland, USA
    Posts
    6
    Author of the Thread
    I have found great scripts to use. I downloaded your rearm test mission, problem is I have one question. How do you type in the Initialization line? On ArmA: Cold War Assault there is no Initialization line, but your downloaded missions hint for the unit is there, so there must be a way.

  4. #4
    There is an initialization line. You need to make sure your mission editor is on Advanced setting. Click on the text in the top right corner of the mission editor to change it. Whenever you're placing an unit or an object on the map, the initialization line should be in the center of the settings window.

  5. #5
    A -very- good reading when you're starting in the mission editor is this PDF :
    http://www.ofpec.com/ed_depot/index....id=61&game=OFP

    It covers nearly each aspect of mission editing and come with very beginner-friendly illustrations. Very well done, and recommended.

  6. #6
    Rookie
    Join Date
    Jun 26 2010
    Location
    Maryland, USA
    Posts
    6
    Author of the Thread
    Thank you guys, did not know that the mission editor needs to be in advanced settings

  7. #7
    hi,

    Quote Originally Posted by FighterD1 View Post
    Another help if making ammo crates is impossible I need help finding a script that will let me and my friends re-spawn with the gear they started with. Again if this is not possible I guess I am SOL

    Thanks for any advice or just telling me if its not possible.
    It is possible to make both crates and players respawn witht he gear they started with.

    For the ammo crate here's a list for reference about possible values. http://community.bistudio.com/wiki/OFP:_Weapons

    init.sqs
    Code:
    ;-----------------------------------------------------------------------------------------
    ; Ammo box
    ;-----------------------------------------------------------------------------------------
    [] exec "box_load.sqs"
    
    ;-----------------------------------------------------------------------------------------
    ; Alive check
    ;-----------------------------------------------------------------------------------------
    [] exec "alive_check.sqs"
    
    exit
    box_load.sqs
    Code:
    ;*****************************************
    ;Box Load Script By Nikiller v0.9b
    ;Load ammo box with custom weapon load out
    ;Contact: nikillerofp@hotmail.fr
    ;[crateName] exec "box_load.sqs"
    ;*****************************************
    
    _u = _this select 0
    
    _u addmagazineCargo ["RPGLauncher",9]
    _u addmagazineCargo ["AT4Launcher",9]
    _u addmagazineCargo ["Skorpionmag",48]
    _u addMagazineCargo ["9K32Launcher",2]
    
    _u addWeaponCargo ["RPGLauncher",3]
    _u addWeaponCargo ["9K32Launcher",1]
    _u addWeaponCargo ["AT4Launcher",3]
    _u addWeaponCargo ["Skorpion",6]
    
    exit
    alive_check.sqs
    Code:
    ;************************************************************
    ;Alive Check Script By Nikiller v0.9b
    ;Check if the player is alive in rewpawn missions
    ;NOTE: Only executed for the player to save performance in MP
    ;Contact: nikillerofp@hotmail.fr
    ;[] exec "alive_check.sqs"
    ;************************************************************
    
    if (local player) then {} else {goto "ende"}
    
    #b
    @ alive player
    titleCut ["","BLACK IN", 5]
    [] exec "init_respawn.sqs"
    @ not alive player
    ~4
    titleCut ["","BLACK OUT", 5]
    goto "b"
    
    #ende
    
    exit
    init_respawn.sqs
    Code:
    ;****************************************************
    ;Respawn Init Script By Nikiller v0.9b
    ;Initialize player after respawn
    ;NOTE: Only local to player to save performance in MP
    ;Contact: nikillerofp@hotmail.fr
    ;[] exec "init_respawn.sqs"
    ;****************************************************
    
    if (local player) then {} else {goto "ende"}
    
    ;give custom weapon loadout to player after respawn
    
    _m=magazines player
    _w=weapons player
    
    {player removeMagazine _x} forEach _m
    {player removeWeapon _x} forEach _w
    
    ;mags
    _hg="HandGrenade"
    _rv="IngramMag"
    
    ;weapons
    _in="Ingram"
    
    ;equipment
    _bino="Binocular"
    _nvg="NVGoggles"
    
    _m=[]
    _w=[]
    
    _m=[_hg,_hg,_rv,_rv]
    _w=[_in,_bino,_nvg]
    
    {player addMagazine _x} forEach _m
    {player addWeapon _x} forEach _w
    
    ;execute whatever script you want after rewpawn
    
    [player] exec "whatever_script.sqs"
    
    #ende
    
    exit
    cya.

    Nikiller.
    Last edited by Nikiller; Aug 13 2011 at 07:07.
    [LOL] ofp/ArmA clan since 2004.
    No Respawns, No Crosshairs, No Muppets.
    Want a good ofp/ArmA2 coop? Visit the [LOL] clan homepage | ofp [LOL] addons pack | ArmA2 [LOL] addons pack

    WW4mod25 sound replacement mod v1.1 | Nikiller's scripts pack

Posting Permissions

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