Jump to content
Sign in to follow this  
FighterD1

Help w/ Weapons and Scripting

Recommended Posts

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 :p

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Thank you guys, did not know that the mission editor needs to be in advanced settings :D

Share this post


Link to post
Share on other sites

hi,

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 :p

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

;-----------------------------------------------------------------------------------------
; Ammo box
;-----------------------------------------------------------------------------------------
[] exec "box_load.sqs"

;-----------------------------------------------------------------------------------------
; Alive check
;-----------------------------------------------------------------------------------------
[] exec "alive_check.sqs"

exit

box_load.sqs

;*****************************************
;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

;************************************************************
;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

;****************************************************
;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.

Edited by Nikiller

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  

×