-
Content Count
1003 -
Joined
-
Last visited
-
Medals
-
Medals
Everything posted by alleycat
-
hardcoding viewdistance
alleycat replied to alleycat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I dont get what is the difference between the snippets. Both target the server? Why would the second allow clients to set the viewdistance and the first would not? -
If I wanted to hardcore the viewdistance server-side to a max value, where should I do that? Is putting setviewdistance in init.sqf safe?
-
Check specific objects inside a trigger
alleycat posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
_houses = nearestObjects [pole1, ["House1","House2","House3",],7000]; This I used to grab every house of a specific type on the map. It needs a areference object (pole1) and a radius. How to adapt this so it grabs every house listed within a trigger? So there is no pole and radius needed. -
Check specific objects inside a trigger
alleycat replied to alleycat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
wtf you can delete buildings from maps? -
Bitdefender AV + Battleye -Massive CPU lag
alleycat replied to alleycat's topic in ARMA 2 & OA - TROUBLESHOOTING
Ok I will try that. -
getmarkerpos fail
alleycat replied to alleycat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
-
definition.def #define SPAWN1 (getMarkerPos respawn_guerrila1) #define SPAWN2 (getMarkerPos respawn_guerrila1) #define SPAWN3 (getMarkerPos respawn_guerrila1) #define SPAWN4 (getMarkerPos respawn_guerrila1) ... Spawn _dice = random (floor 24); diag_log format ["newjoin _dice is: %1", _dice]; _spawns = [sPAWN1,SPAWN2,SPAWN3,SPAWN4,SPAWN5,SPAWN6,SPAWN7,SPAWN8,SPAWN9,SPAWN10,SPAWN11,SPAWN12,SPAWN13,SPAWN14,SPAWN15,SPAWN16,SPAWN17,SPAWN18,SPAWN19,SPAWN20,SPAWN21,SPAWN22,SPAWN23,SPAWN24]; _pos = (_spawns select _dice); _posx = _pos select 0; _posy = _pos select 1; _posz = _pos select 2; _unit setposASL [posx, posy, posz]; Error in expression < select 1; _posz = _pos select 2; _unit setposASL [posx, posy, posz]; _unit setD> Error position: <setposASL [_posx, _posy, _posz]; _unit setD> Error Type Any, expected Number Why wont this work?
-
Stolen map/mission
alleycat replied to DeltaFOX209's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
This means making it hard to read basically? I am looking for ways to copy protect my stuff. -
Stolen map/mission
alleycat replied to DeltaFOX209's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Well does it work if it is a very large script? a few 100 lines? Also the larger it is, the easier it is to prove they stole it because rewriting it to cover the theft would take a lot of effort. And the average asshole stealing the script would have to figure out how it works to rewrite it. -
Bitdefender AV + Battleye -Massive CPU lag
alleycat replied to alleycat's topic in ARMA 2 & OA - TROUBLESHOOTING
constant CPU load is at 80% on one core, the second I leave the server it disappears -
Stolen map/mission
alleycat replied to DeltaFOX209's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
One way to protect an MP mission is to move all server-side scripts into an addon that only exists on the server. if (isServer) then { execVM "\@Mod\addons\server\server_side_stuff.sqf"; }; The script will never run on the client and you can keep it in a folder that only exists on the server. -
Adding Hunger/Thirst
alleycat replied to Gareth_Sims's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hunger/Thirst is basically just a variable that is ticking in a loop player setVariable ["thirst", 0, false];//Initial setup of variable //while the player is alive while {alive player} do { //Get variable _thirstvar = player getVariable "thirst"; //+1 _thirstvar = _thirstvar + 1; //Apply to thirst player setVariable ["thirst", _thirstvar, false]; //wait one second sleep 1; }; -
What is the best way to divide a mod into a developer/enduser copy
alleycat replied to alleycat's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
I meant what is the best way to separate a development version from a end-user version -
Class USMC_Soldier_Base : SoldierWB { identityTypes[]={"USMC_Glasses","Head_USMC"}; faceType="Man"; genericNames="EnglishMen"; model="\ca\characters2\USMC\usmc_soldier"; portrait="\Ca\characters\data\portraits\comBarHead_usmc_soldier_ca"; picture="\Ca\characters\data\Ico\i_null_CA.paa"; icon="\Ca\characters2\data\icon\i_soldier_CA.paa"; scope=0; faction="USMC"; vehicleClass="Men"; cost=80000; camouflage=1.8; accuracy=2; Class HitPoints : HitPoints { Class HitHead : HitHead { armor=0.85; }; Class HitBody : HitBody { armor=1; passThrough=0.8; }; }; While looking for what controls bullet damage I found this. Can someone explain what the armor and passThroug variables do?
-
How to test if a variable is <null>? I want to display a variable that might not exist for certain units. It reports <null> when displaying.
-
if not (isNull _aff) then {hint format ["%1 is not null",_aff]}; if (isNull _aff) then {hint format ["%1 is null",_aff]}; Code before and after this does run. This never triggers. Perhaps I explained what I want to do wrong: I want to display a variable that might exist. If it does not exist (was not defined for the unit) then it returns literally <null>. I would like to test that.
-
Name of the addon that allows placing hidden buildings?
alleycat posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I vaguely remember some addon that allowed placing all buildings hidden in the editor for OFP.Does something like this exist for arma2 and would clients need that addon installed? -
Name of the addon that allows placing hidden buildings?
alleycat replied to alleycat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks! -
Respawning a helicopter in its initial state
alleycat posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I have a somewhat complicated amount of scripts and waypoints connected to a helicopter that spawns at mission start and patrols the area. If it gets shot down, I would like to respawn it in its initial setup so it can restart its complete setup like it was at mission start. Is that possible in a MP environment? Or is the only way to respawn units to use createUnit? -
Name of the addon that allows placing hidden buildings?
alleycat replied to alleycat's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
With createvehicle? if so, are there any performance concerns about mission spawned buildings? -
I got an array containing 5 different arrays, with 3 ASL coordinates for each one. How do I randomly pick from that array? #define SPAWN1 [7278.79,276.733,290.255] #define SPAWN2 [2023.23,76.0343,360.341] #define SPAWN3 [2113.41,95.0344,353.035] #define SPAWN4 [2836.51,553.222,367.111] #define SPAWN5 [3004.98,699.092,378.777] I would like to create a list from this and pick from it randomly but I am not sure how. Like this: _spawnlist = [1,2,3,4,5], then pick from it random
-
class CfgWeapons { class Rifle; class LeeEnfield : Rifle { htMin=1; htMax=420; afMax=0; mfMax=0; mFact=1; tBody=100; scope=2; displayName="Lee Enfield"; model="\CA\weapons_E\LeeEnfield\LeeEnfield_no4mk1"; picture="\ca\weapons_E\Data\icons\leeEnfield_CA.paa"; UiPicture="\CA\weapons\data\Ico\i_sniper_CA.paa"; handAnim[]={"OFP2_ManSkeleton","\Ca\weapons_E\Data\Anim\LeeEnfield.rtm"}; dexterity=1.61; magazines[]={"10x_303"}; opticsDisablePeripherialVision=0; opticsPPEffects[]={}; distanceZoomMin=300; distanceZoomMax=300; minRange=0; minRangeProbab=0.1; midRange=150; midRangeProbab=0.7; maxRange=300; maxRangeProbab=0.05; aiRateOfFire=8; aiRateOfFireDistance=600; dispersion=0.0005; class Library { libTextDesc="The iconic Lee-Enfield rifle, the Mk III, was introduced on 26 January 1907 and featured a simplified rear sight arrangement and a fixed, rather than a bolt-head-mounted sliding, charger guide.The Mk III saw extensive service throughout the World War and Second World War as well. <br/>The SMLE Mk III uses the ,303 caliber ammo."; }; descriptionShort="Army rifle<br/>Caliber: ,303"; //begin1[]={"Ca\Sounds_E\Weapons_E\Enfield\Enfield_4",1.77828,1,1500}; begin1[]={"items\sounds\enfield_fire",1.77828,1,1500}; soundBegin[]={"begin1",1}; reloadMagazineSound[]={"Ca\sounds\Weapons\rifles\M1014-reload",0.01,1,20}; drySound[]={"Ca\sounds\Weapons\rifles\dry",0.01,1,10}; reloadTime=2; backgroundReload=1; recoil="recoil_single_primary_6outof10"; recoilProne="recoil_single_primary_prone_5outof10"; value=1000; }; }; Overwritten enfield rifle to use my new sound file. There is no compiler error, but the old sound plays. The file is placed like this: @addonname\addOns\items\sounds\enfield_fire (addon name being items.pbo) 1. Is the path wrong? 2. Is it wrong that the file is a stereo wav with 48kh? The Wss guide says one can use wav. 3. Why is there no error pointing to a wrong path or unreadable file? ---------- Post added at 01:32 PM ---------- Previous post was at 12:38 PM ---------- I changed the displayed name and it had no effect ingame. Why is the engine ignoring this override? ---------- Post added at 01:38 PM ---------- Previous post was at 01:32 PM ---------- Derving a custom weapon off LeeEnfield works, but overriding it wont, is there some addon stepping over it? I only got basic OA stuff loaded and CBA
-
sound replacement failing
alleycat replied to alleycat's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
class CfgVehicles { class TK_GUE_Soldier_Base_EP1; class TK_GUE_Soldier_4_EP1;// latest definition of hitpoints in this class. class New_Soldier : TK_GUE_Soldier_4_EP1 { displayName = "New Soldier"; class HitPoints : HitPoints { class HitHead : HitHead { armor=0.85; }; class HitBody : HitBody { armor=1; passThrough=0.8; }; }; }; /CfgVehicles/New_Soldier.HitPoints: Undefined base class 'HitPoints' Earliest definition of Hitpoints is in AllVehicles, of which TK_GUE is a child class SO WHY THE FK WONT THIS WORK? ---------- Post added at 05:20 PM ---------- Previous post was at 04:56 PM ---------- class CfgVehicles { class All; class AllVehicles; class Land; class Man; class CAManBase; class SoldierGB; class TK_GUE_Soldier_Base_EP1; class TK_GUE_Soldier_4_EP1; class New_Soldier : TK_GUE_Soldier_4_EP1 Added everything in the complete inheritance, still wont work. -
sound replacement failing
alleycat replied to alleycat's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
class Mode_SemiAuto; class Mode_Burst; class Mode_FullAuto; class CfgWeapons { class Rifle; class M16A2; class FN_FAL : M16A2 { class Single : Single { begin1[]={"\cobra_items\sounds\enfield_fire",1.77828,1,1500}; begin2[]={"\cobra_items\sounds\enfield_fire",1.77828,1,1500}; soundBegin[]={"begin1",0.5,"begin2",0.5}; }; class Burst : Burst { dispersion=0.0005; begin1[]={"\cobra_items\sounds\enfield_fire",1.77828,1,1500}; begin2[]={"\cobra_items\sounds\enfield_fire",1.77828,1,1500}; soundBegin[]={"begin1",0.5,"begin2",0.5}; }; }; This is the code for the fn fal clone. the problem is the fire modes deriving seems to fail but the classes they depend on are included above ---------- Post added at 06:02 PM ---------- Previous post was at 05:46 PM ---------- Adding the classes above fixed it. -
sound replacement failing
alleycat replied to alleycat's topic in ARMA 2 & OA : ADDONS - Configs & Scripting
Where should I write the scope? Also can someone show how to correctly inherit a FN FAL without having to copy paste the entire rifle class because fn fal inherits M16 which needs M203 muzzle and I got lost tracking that down. Now I got ~6 pages worth of copypasted classes trying to find what is missing.