splatsh
Member-
Content Count
123 -
Joined
-
Last visited
-
Medals
Everything posted by splatsh
-
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I think that is not the problem, the problem is that I don't know to write this down with right parameters and so on, need someone to guide me to write it right... My script is working fine... And I need to add some addActions that can change my gear while I am playing the game. And that addAction is going to point at my fnc_gear.sqf file. Can it not be done with my code (fnc_gear.sqf) now, so please show me how to do it right. Thanks. -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
So how can I do to use my fnc_gear.sqf file to my purpose? I need this so my starting loadout work B]fnc_gear.sqf[/b] _unit = _this select 0; _strLoadout = _this select 1; And I need this to get addAction to work? B]fnc_gear.sqf[/b] _target = _this select 0; // the object the action is assigned to; here: player _caller = _this select 1; // the object using the action; here: usually the player _id = _this select 2; // the action id, also the return value of addaction _parameters = _this select 3; // the parameters; here: [player,"JAVELIN"] I want to use the same file twice, can it be done? (I don't want to have more then one fnc_gear.sqf file) -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What? I am using that you can see above. In SP and MP and this code is working fine now: in player initfield I have this: hNil = [this, "JAVELIN"] call compile preprocessFile "scripts\fnc_gear.sqf"; fnc_gear.sqf if (!isServer) exitWith {}; _unit = _this select 0; _strLoadout = _this select 1; removeAllWeapons _unit; removeBackpack _unit; switch (_strLoadout) do { case "MG": { if (local _unit) then { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; }; case "START": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "STINGER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; _unit addWeapon "Stinger"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["Stinger",1]; }; case "JAVELIN": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Javelin_Direct";} forEach [1]; _unit addWeapon "ACE_Javelin_Direct"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["ACE_Javelin_Direct",1]; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; }; case "SNIPER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "ACE_5Rnd_127x99_B_TAC50";} forEach [1,2,3,4,5,6,7,8,9,10,11]; _unit addWeapon "ACE_AS50"; (unitBackpack _unit) addMagazineCargo ["ACE_5Rnd_127x99_B_TAC50",10]; }; case "SMAW": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "SMAW_HEAA";} forEach [1,2]; _unit addWeapon "SMAW"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["SMAW_HEAA",1]; }; }; if (!(_unit hasWeapon "itemGPS")) then { _unit addWeapon "itemGPS"; }; _unit addWeapon "Binocular_Vector"; _unit addWeapon "NVGoggles"; _unit addMagazine "ACE_Battery_Rangefinder"; _primaryWeapon = primaryWeapon _unit; _unit selectweapon _primaryWeapon; // Fix for weapons with grenade launcher _muzzles = getArray(configFile>>"cfgWeapons" >> _primaryWeapon >> "muzzles"); _unit selectWeapon (_muzzles select 0); Now I want to have something that give my player (me) some actions (addAction) so I can change gear while I am playing. But all my addActions try are fail and I don't know how to set up some addActions that can use my fnc_gear.sqf file. addAction http://community.bistudio.com/wiki/addAction unitName addAction [title, filename, (arguments, priority, showWindow, hideOnUse, shortcut, condition)] I have try this and I can't get it to work right. I can't get right arguments for the code, all that happen is that my weapon and ammor are lost when I try this: player addAction ["GEAR: JAVELIN", "scripts\fnc_gear.sqf", [player, "JAVELIN"]]; player addAction ["GEAR: JAVELIN","scripts\fnc_gear.sqf",([player, "JAVELIN"])]; player addAction ["GEAR: JAVELIN","scripts\fnc_gear.sqf",(player, "JAVELIN")]; But I need help with getting the right arguments for it (player) and (TYPE OF GEAR) Thanks -
Custom loadout, help with my code
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I am trying to do a nice custom loadout script. But I can't get it to work right. This is what I have right now: fnc_gear.sqf private ["_unit","_strLoadout"]; _unit = _this select 0; _strLoadout = _this select 1; removeAllWeapons _unit; removeBackpack _unit; clearMagazineCargo unitBackpack _unit; _unit addWeapon "Binocular_Vector"; _unit addWeapon "NVGoggles"; switch (_strLoadout) do { case "START" : { _unit addBackpack "US_Backpack_AmmoMG_EP1"; clearMagazineCargo unitBackpack _unit; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "ACE_Battery_Rangefinder"; _unit addweapon "M249_m145_EP1"; _unit selectWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "MG" : { _unit addBackpack "US_Backpack_AmmoMG_EP1"; clearMagazineCargo unitBackpack _unit; addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "100Rnd_556x45_BetaCMag"; _unit addMagazine "ACE_Battery_Rangefinder"; _unit addweapon "M249_m145_EP1"; _unit selectWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "STINGER" : { _unit addweapon "ACE_BackPack_ACR_TT"; clearMagazineCargo unitBackpack _unit; _unit addweapon "Stinger"; _unit addMagazine "Stinger"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "ACE_Battery_Rangefinder"; _unit addweapon "ACE_SCAR_H_STD_Spect"; _unit selectWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["Stinger",1]; }; case "JAVELIN" : { _unit addBackpack "US_Backpack_AT_EP1"; clearMagazineCargo unitBackpack _unit; _unit addweapon "ACE_Javelin_Direct"; _unit addMagazine "ACE_Javelin_Direct"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "20Rnd_762x51_B_SCAR"; _unit addMagazine "ACE_Battery_Rangefinder"; _unit addweapon "ACE_SCAR_H_STD_Spect"; _unit selectWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["ACE_Javelin_Direct",1]; }; case "SNIPER" : { _unit addBackpack "US_Backpack_EP1"; clearMagazineCargo unitBackpack _unit; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_B_TAC50"; _unit addMagazine "ACE_Battery_Rangefinder"; _unit addweapon "ACE_AS50"; _unit selectWeapon "ACE_AS50"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; }; }; Now, how do I call it from the players initfield? I have try this, but I can't get it to work _strLoadout = [this, "START"] execVM "scripts\fnc_gear.sqf"; Thanks ---------- Post added at 03:11 PM ---------- Previous post was at 01:22 PM ---------- Found this and it works Player initfield: hNil = [this, "START"] call compile preprocessFile "scripts\fnc_gear.sqf"; fnc_gear.sqf: if (!isServer) exitWith {}; _unit = _this select 0; _strLoadout = _this select 1; removeAllWeapons _unit; removeBackpack _unit; switch (_strLoadout) do { case "MG": { if (local _unit) then { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; }; case "START": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "STINGER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; _unit addWeapon "Stinger"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["Stinger",1]; }; case "JAVELIN": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Javelin_Direct";} forEach [1]; _unit addWeapon "ACE_Javelin_Direct"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["ACE_Javelin_Direct",1]; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; }; case "SNIPER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "ACE_5Rnd_127x99_B_TAC50";} forEach [1,2,3,4,5,6,7,8,9,10,11]; _unit addWeapon "ACE_AS50"; (unitBackpack _unit) addMagazineCargo ["ACE_5Rnd_127x99_B_TAC50",10]; }; case "SMAW": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "SMAW_HEAA";} forEach [1,2]; _unit addWeapon "SMAW"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["SMAW_HEAA",1]; }; }; if (!(_unit hasWeapon "itemGPS")) then { _unit addWeapon "itemGPS"; }; _unit addWeapon "Binocular_Vector"; _unit addWeapon "NVGoggles"; _unit addMagazine "ACE_Battery_Rangefinder"; _primaryWeapon = primaryWeapon _unit; _unit selectweapon _primaryWeapon; // Fix for weapons with grenade launcher _muzzles = getArray(configFile>>"cfgWeapons" >> _primaryWeapon >> "muzzles"); _unit selectWeapon (_muzzles select 0); -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
No, sorry, don't work -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
unitName addAction [title, filename, (arguments, priority, showWindow, hideOnUse, shortcut, condition)] But this player addAction ["GEAR: JAVELIN","scripts\fnc_gear.sqf",(player, "JAVELIN")]; or this player addAction ["GEAR: JAVELIN","scripts\fnc_gear.sqf",([player, "JAVELIN"])]; does not work...... help please -
Custom loadout, help with my code
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry, I don't know -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
OK Player initfield: (Working when I play) hNil = [this, "START"] call compile preprocessFile "scripts\fnc_gear.sqf"; fnc_gear.sqf (Working when I play) if (!isServer) exitWith {}; _unit = _this select 0; _strLoadout = _this select 1; removeAllWeapons _unit; removeBackpack _unit; switch (_strLoadout) do { case "MG": { if (local _unit) then { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; }; case "START": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "100Rnd_556x45_BetaCMag";} forEach [1,2,3,4]; _unit addWeapon "M249_m145_EP1"; (unitBackpack _unit) addMagazineCargo ["100Rnd_556x45_BetaCMag",5]; }; case "STINGER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; _unit addWeapon "Stinger"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["Stinger",1]; }; case "JAVELIN": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "ACE_Javelin_Direct";} forEach [1]; _unit addWeapon "ACE_Javelin_Direct"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["ACE_Javelin_Direct",1]; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; }; case "SNIPER": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "ACE_5Rnd_127x99_B_TAC50";} forEach [1,2,3,4,5,6,7,8,9,10,11]; _unit addWeapon "ACE_AS50"; (unitBackpack _unit) addMagazineCargo ["ACE_5Rnd_127x99_B_TAC50",10]; }; case "SMAW": { {_unit addBackpack "US_Backpack_AmmoMG_EP1";} forEach [1]; clearMagazineCargo unitBackpack _unit; {_unit addMagazine "20Rnd_762x51_B_SCAR";} forEach [1,2,3,4,5]; {_unit addMagazine "SMAW_HEAA";} forEach [1,2]; _unit addWeapon "SMAW"; _unit addWeapon "ACE_SCAR_H_STD_Spect"; (unitBackpack _unit) addMagazineCargo ["20Rnd_762x51_B_SCAR",5]; (unitBackpack _unit) addMagazineCargo ["SMAW_HEAA",1]; }; }; if (!(_unit hasWeapon "itemGPS")) then { _unit addWeapon "itemGPS"; }; _unit addWeapon "Binocular_Vector"; _unit addWeapon "NVGoggles"; _unit addMagazine "ACE_Battery_Rangefinder"; _primaryWeapon = primaryWeapon _unit; _unit selectweapon _primaryWeapon; // Fix for weapons with grenade launcher _muzzles = getArray(configFile>>"cfgWeapons" >> _primaryWeapon >> "muzzles"); _unit selectWeapon (_muzzles select 0); Now I want to addaction in my init.sqf file This one down here is not working, but you can see how I want to have it =) init.sqf player addAction ["GEAR: SMAW","scripts\fnc_gear.sqf",([player, "SMAW"])]; player addAction ["GEAR: SNIPER","scripts\fnc_gear.sqf",([player, "SNIPER"])]; player addAction ["GEAR: JAVELIN","scripts\fnc_gear.sqf",([player, "JAVELIN"])]; player addAction ["GEAR: STINGER","scripts\fnc_gear.sqf",([player, "STINGER"])]; player addAction ["GEAR: MG","scripts\fnc_gear.sqf",([player, "MG"])]; -
addaction problem
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks I did try this code player addAction ["GEAR: SMAW","scripts\fnc_gear.sqf",([player, "SMAW"])]; It did not work, it deleted all my gear. So the first part in my fnc_gear.sqf file worked, but it did not give me any new gear =/ -
Help with support stuff (A-10, Apache)
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks, but I cant do anything like that in mapeditor with support module or something else? I need code to get that kind of support? ---------- Post added at 01:25 PM ---------- Previous post was at 12:54 PM ---------- One more thing... I can't use SOM module and Simple support module at the same time? When I try this in editor and have them sync with my player, then I could not answer and accept SOM missions. All I could see in my options was my support stuff. Bug or what? -
Help with support stuff (A-10, Apache)
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi all! It was some time now since I play Arma2, some new things are in the game now, and I dont know how to use them or what they do. 1) Simple Support module. Put it on map and sync it with player, right? Then I can use some support stuff? 2) Can I use support in other stuff, can I put one A-10 Thunderbolt II on map and let it support me when I need to? How to do it? - Give it one support waypoint? - Sync that with something? - Need to script it my self? I am planing on making one map for my self with SOM and ACM modules, and that works nice, now I am looking for some support stuff, with some heli's and plane. But do I need to write code for it, or can I use map editor to get some support from them, how to do it? Anyone got a demo stuff on support with A-10 done with mapeditor? Thanks. -
Weapon on back, and stamina (ACE)
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I am using ACE and ACEX And I have this now: ; Get the unit parameter given _unit = _this select 0 ; Strip the units current gear removeAllWeapons _unit ; Add the new gear to the unit _unit addweapon "ACE_VTAC_RUSH72"; _unit addWeapon "NVGoggles"; _unit addWeapon "Laserdesignator"; _unit addweapon "ACE_HuntIR_monitor"; ; Add weapon to the unit _unit addweapon "ACE_M4A1_ACOG"; ; Add ammo to the unit _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "30Rnd_556x45_Stanag"; _unit addMagazine "ACE_5Rnd_127x99_T_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_T_TAC50"; _unit addMagazine "ACE_5Rnd_127x99_T_TAC50"; ; Add select weapon _unit selectWeapon "ACE_M4A1_ACOG" ; Put stuff in the backpack/Rucksack [_unit, "ACE_Battery_Rangefinder", 1] call ACE_Sys_Ruck_fnc_AddMagToRuck; [_unit, "30Rnd_556x45_Stanag", 10] call ACE_Sys_Ruck_fnc_AddMagToRuck; [_unit, "ACE_HuntIR_M203", 8] call ACE_Sys_Ruck_fnc_AddMagToRuck; [_unit, "pipebomb", 3] call ACE_Sys_Ruck_fnc_AddMagToRuck; [_unit, "SmokeShell", 5] call ACE_Sys_Ruck_fnc_AddMagToRuck; [_unit, "ACE_5Rnd_127x99_T_TAC50", 10] call ACE_Sys_Ruck_fnc_AddMagToRuck; [_unit, "Laserbatteries", 2] call ACE_Sys_Ruck_fnc_AddMagToRuck; Exit My first question is: How do I get a weapon on back? (NOT Rucksack) If u start game, u can have one weapon selected, and one weapon on back, then u can swap weapons. But how do I put a weapon on back from code and from my .sqs file? My second question is: How do I config so my units dont use the new stamina system? -
graphics bugs with ATI 4800 series (4850/4870/4890)
splatsh replied to fjaekel's topic in ARMA 2 & OA - TROUBLESHOOTING
Is CrossfireX working with OA now? And how to get it to work? -
Got this in my "description.ext" Its from revive script, then I want to add a random option. But I dont know how it works. This is what I have now. description.ext class Params { class DayTime { //paramsArray[0] title = "Time Of Day"; values[] = {-6, 0, 8, 13, 00}; texts[] = {"Morning", "Clear day", "Sundown", "Night", "Random"}; default = 0; }; }; init.sqf If (paramsArray select 0 == "00") then { skiptime(random 24); }; else { skiptime (paramsArray select 0); }; But that is not working when I pick random. Please help me, how to set this up.
-
Editor wizard, use other that original soldiers, how to?
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This file is made by arma 2 editor (new wizard) template="ca\missions\MPTemplates\MPT03_SectorControl"; noCopy=1; owner="ca_missions"; island="Japahto"; year=1995; month=5; day=10; hour=7; minute=30; class Params { }; class Units { class WestUnits { group=0; name="West0"; file="West0.unit"; }; class EastUnits { group=1; name="East1"; file="East1.unit"; }; }; class Positions { WIZVAR_west_start[]={2823.5149,8.1392336,2515.8352}; WIZVAR_east_start[]={2774.0286,14.667825,1898.8632}; Sector_1W[]={12404.115,1.089859,394.91956}; Sector_2W[]={12451.573,1.089859,395.60736}; Sector_3W[]={12498.344,1.089859,394.91956}; Sector_4W[]={12543.051,1.089859,394.23212}; Sector_5W[]={12602.201,2.289372,397.67108}; Sector_1E[]={12404.114,1.387868,345.95547}; Sector_2E[]={12454.827,1.387868,345.95547}; Sector_3E[]={12508.163,1.387868,347.70419}; Sector_4E[]={12551.881,1.387868,347.70419}; Sector_5E[]={12600.714,2.289372,344.95303}; WIZVAR_S1[]={2816.4717,12.984427,2397.166}; WIZVAR_S2[]={2796.6411,15.508967,2055.1958}; WIZVAR_S3[]={2568.0935,13.571338,2244.5269}; WIZVAR_S4[]={2965.6201,12.765657,2188.0767}; WIZVAR_S5[]={2801.7026,6.2594151,2255.4785}; WIZVAR_north[]={2644.4946,15.825096,2774.0171}; WIZVAR_south[]={2853.741,12.800016,1569.2983}; WIZVAR_east[]={3403.5459,17.360065,2148.1992}; WIZVAR_west[]={2177.9771,6.9692149,2192.9822}; WIZVAR_Entrechment_1[]={2817.333,13.014225,2396.0891}; WIZVAR_Entrechment_2[]={2795.0149,15.180608,2056.1594}; WIZVAR_Entrechment_3[]={2566.4651,13.379548,2243.3745}; WIZVAR_Entrechment_4[]={2964.4131,12.906227,2187.8857}; }; addons[]={}; weather=0.5; weatherForecast=0.5; fog=0; fogForecast=0; viewDistance=4.3708595e-038; class Added { }; Now, I have odens swedish addon and I have the classname for some soldiers that I want to use instead of the orginal one, how to put in them in code?? Class name: Fire team 1 oden_sweWTL oden_sweWLAW oden_sweWAR oden_sweWB Fire team 2 oden_sweWTL oden_sweWLAW oden_sweWAR oden_sweWB Fire team 3 oden_sweWTL oden_sweWLAW oden_sweWAR oden_sweWB ------------------------------------ Now, I want to put in the 3 fireteams instead of orginal soldiers, then I want to put in 12 soldiers for east to, so we are 12 vs 12. how to? Thanks -
Put in Earplugs and Glasses on.
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
How to write in my init or other file to put in ace earplug? I got one option to put them in when I play the game and if I have one pair with me, and so for glasses. Now, how to write a bit of code to plug them in, anybody know howto? player code "ACE_Earplugs"; player code "ACE_GlassesLHD_glasses"; -
Problem, they dont stand in formation
splatsh posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
What is wrong here, I cant get them to be private with my code, and I cant get them to stand in formation. Look here, here I did gave them one order "Formation Line". And here is my code that I am running with this: ["mas_usa_spec_at_w_hvy",1.0,"PRIVATE"] execVM "script\fncReinforce.sqf"; fncReinforce.sqf // ["mas_usa_spec_at_w_hvy",1.0] execVM "script\fncReinforce.sqf"; private ["_unitType", "_unitSkill", "_unitRank", "_pos", "_dir", "_trg", "_airtype", "_pType", "_mygroup", "_Message", "_vehicle", "_unit", "_unit2"]; // Configuration _unitType = _this select 0; _unitSkill = _this select 1; _unitRank = _this select 2; _pos = getPos ASpad; _dir = getPos ASpad; _trg = position player; _airtype = "C130J"; _pType = "USMC_Soldier_Pilot"; _mygroup = creategroup side player; _Message = "This is eagle two, we are inbound with your reinforce drop, please stand by..."; // Create plane _vehicle = createVehicle [_airtype, _pos, [], 0, "FLY"]; //_vehicle setVehicleVarName "plane"; //plane = _vehicle; // Create pilot _unit = _mygroup createUnit [_pType, _pos, [], 0, "FLY"]; //_unit setVehicleVarName "pilot"; //pilot = _unit; _unit moveinDriver _vehicle; _unit flyinHeight 200; _vehicle flyinHeight 200; // Create soldier _unit2 = _mygroup createUnit [_unitType, _pos, [], 0, "FORM"]; _unit2 setSkill _unitSkill; _unit2 setRank _unitRank; _unit2 moveInCargo [_vehicle, 0]; // make trigger to check plane _trig = createTrigger["EmptyDetector",getPos player]; _trig setTriggerArea[0,0,0,false]; _trig setTriggerActivation["NONE","PRESENT",true]; _trig setTriggerStatements["(!alive plane)", "deletevehicle _trig;eject = false;deletevehicle _vehicle;deletevehicle _unit;", ""]; // fly to player _wp10 = _mygroup addwaypoint[_trg,0]; _wp10 setWaypointSpeed "FULL"; _wp10 setwaypointtype "MOVE"; _wp10 setWaypointStatements ["true", "eject=true;"]; sleep 2; // fly home _target22 = getPos ASpad; _wp11 = _mygroup addwaypoint[_target22,0]; _wp11 setWaypointSpeed "NORMAL"; _wp11 setwaypointtype "MOVE"; _wp11 setWaypointStatements ["true", "deletevehicle _trig;eject = false;deletevehicle _vehicle;deletevehicle _unit;"]; // Eject soldier at player position waitUntil{ eject }; (driver _vehicle) sideChat _Message; unassignVehicle _unit2; _unit2 action ["EJECT", _vehicle]; eject = false; [_unit2] join player; group player setGroupId["Alpha"]; group player selectLeader player; leader group player == leader player; deletevehicle _trig;deletevehicle _vehicle;deletevehicle _unit; // For testing So what is wrong? -
AI reacting on flare
splatsh replied to Nephris1's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Nice it works in ACM =) -
Ammo crate filler including all new Ace stuff
splatsh replied to Solarghost's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Fully updated with ace stuff. Inkl new weapons from yesterday. -
Hi there again. Now I wonder how to check if I have succeded one SecOps mission. If I have, then I get something from the game itself, like UAV, supply, and so on. Now I like to give my squad my own present if I have manage to succed one SecOps mission. But I dont know how I can check that. So how to check it? Thanks
-
Put in Earplugs and Glasses on.
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Cool I think I am after that code: "[player] execFSM "x\ace\addons\sys_goggles\use_earplug.fsm";" Going to test it tomorrow. =) Thanks. Do you have one code for use of the glasses to? "ACE_GlassesLHD_glasses" something like this? "[player] execFSM "x\ace\addons\sys_goggles\use_GlassesLHD_glasses.fsm";" Once more, thanks =) -
Put in Earplugs and Glasses on.
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Oh, thanks, I have just done that with the name, and therefore I could see this action menu ingame =) Then I wonder if I could put the earplug in my ears, and glasses on me befor start the game, but maybe its not possible =) Thanks anyway for the info about the name stuff =)) Nice to know, thanks. -
Put in Earplugs and Glasses on.
splatsh replied to splatsh's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Sorry, not equip stuff, but how to use them... That code I am looking for. I have this in my init allready: { _x addWeapon "ACE_Earplugs" } foreach units group player; { _x addWeapon "ACE_GlassesLHD_glasses" } foreach units group player; Now, I am looking for the code in how to use them. How to put in Earplugs into my ears, and howto put on glasses on my face. Maybe someone knows that, or can ask ACE team =)) -
So this is what you mean: (Need to confirm that it is correct, I am not so good at this codes.) title = "Time Of Day"; values[] = {1337,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23}; texts[] = {"Random","00.00","01.00","02.00","03.00","04.00","05.00","06.00","07.00","08.00","09.00","10.00","11.00","12.00","13.00","14.00","15.00","16.00","17.00","1800","19.00","20.00","21.00","22.00","23.00"}; default = 12; if (isServer) then { if (paramsArray select 0 == 1337) then { skiptime(random 24); } else { skiptime (((paramsArray select 0) - daytime + 24) % 24); }; };
-
Thanks for all answers. I use this atm and it look like it work good. in my description.ext values[] = {-6, 0, 8, 13, 1337}; init.sqf If ((paramsArray select 0 == 1337) and (isServer)) then { skiptime(random 24); }; else { skiptime (paramsArray select 0); }; Thanks for help :) ---------- Post added at 03:15 PM ---------- Previous post was at 02:30 PM ---------- Update: Sorry, but it does not work ok. If I select random it will work, but when select something else it does not work... Then I will start at 12.00 all the time. (That time I have set in editor.) How come?