Jump to content

alleycat

Member
  • Content Count

    1003
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by alleycat

  1. I would like to know if the ingame HUD display on other units is accessible for modding or wether it is hardcoded. If it is moddable (by cloning bis functions?) can someone point me to where I can find it? By HUD I mean the data that is displayed in 3d over friendly units showing distance and type of unit.
  2. class Rifle; class Mode_SemiAuto; class Mode_Burst; class Mode_FullAuto; //class AK_BASE; //class LeeEnfield; class LeeEnfield : Rifle { htMin=1; htMax=420; afMax=0; mfMax=0; mFact=1; tBody=100; scope=2; displayName="Lee EnfieldC"; 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[]={"\cobra_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"; recoil="recoil_single_primary_6outof10"; recoilProne="recoil_single_primary_prone_5outof10"; value=1000; }; class AK_BASE : Rifle { scope=0; value=0; model=""; displayName=""; optics=1; drySound[]={"ca\sounds\weapons\rifles\dry",0.000316228,1,10}; reloadMagazineSound[]={"ca\sounds\weapons\rifles\reload-ak-2ivan",0.0707946,1,20}; modes[]={"FullAuto","Single","Burst"}; magazines[]={"30Rnd_545x39_AK","30Rnd_545x39_AKSD"}; bullet1[]={"ca\sounds\weapons\shells\small_shell_metal_04",0.177828,1,15}; bullet2[]={"ca\sounds\weapons\shells\small_shell_metal_03",0.177828,1,15}; bullet3[]={"ca\sounds\weapons\shells\small_shell_metal_02",0.177828,1,15}; bullet4[]={"ca\sounds\weapons\shells\small_shell_metal_01",0.177828,1,15}; bullet5[]={"ca\sounds\weapons\shells\small_shell_dirt_07",0.316228,1,15}; bullet6[]={"ca\sounds\weapons\shells\small_shell_dirt_09",0.316228,1,15}; bullet7[]={"ca\sounds\weapons\shells\small_shell_dirt_10",0.316228,1,15}; bullet8[]={"ca\sounds\weapons\shells\small_shell_dirt_12",0.316228,1,15}; bullet9[]={"ca\sounds\weapons\shells\small_shell_soft_05",0.177828,1,15}; bullet10[]={"ca\sounds\weapons\shells\small_shell_soft_09",0.177828,1,15}; bullet11[]={"ca\sounds\weapons\shells\small_shell_soft_10",0.177828,1,15}; bullet12[]={"ca\sounds\weapons\shells\small_shell_soft_13",0.177828,1,15}; soundBullet[]={"bullet1",0.083,"bullet2",0.083,"bullet3",0.083,"bullet4",0.083,"bullet5",0.083,"bullet6",0.083,"bullet7",0.083,"bullet8",0.083,"bullet9",0.083,"bullet10",0.083,"bullet11",0.083,"bullet12",0.083}; class Single : Mode_SemiAuto { begin1[]={"ca\sounds\weapons\rifles\AK74_single2",1.77828,1,1000}; soundBegin[]={"begin1",1}; reloadTime=0.1; recoil="recoil_single_primary_4outof10"; recoilProne="recoil_single_primary_prone_4outof10"; dispersion=0.00125; minRange=2; minRangeProbab=0.3; midRange=250; midRangeProbab=0.7; maxRange=400; maxRangeProbab=0.04; }; class Burst : Mode_Burst { begin1[]={"ca\sounds\weapons\rifles\AK74_single2",1.77828,1,1000}; soundBegin[]={"begin1",1}; soundBurst=0; reloadTime=0.1; ffCount=3; recoil="recoil_auto_primary_3outof10"; recoilProne="recoil_auto_primary_prone_3outof10"; dispersion=0.00125; minRange=1; minRangeProbab=0.3; midRange=80; midRangeProbab=0.7; maxRange=120; maxRangeProbab=0.05; showToPlayer=0; }; class FullAuto : Mode_FullAuto { begin1[]={"ca\sounds\weapons\rifles\AK74_single2",1.77828,1,1000}; soundBegin[]={"begin1",1}; reloadTime=0.1; ffCount=30; recoil="recoil_auto_primary_4outof10"; recoilProne="recoil_auto_primary_prone_4outof10"; dispersion=0.00125; minRange=0; minRangeProbab=0.1; midRange=25; midRangeProbab=0.7; maxRange=70; maxRangeProbab=0.05; }; }; class AK_47_M : AK_BASE { class Single : Mode_SemiAuto { begin1[]={"\cobra_items\sounds\ak47_fire",1.77828,1,1000}; soundBegin[]={"begin1",1}; }; class Burst : Mode_Burst { begin1[]={"\cobra_items\sounds\ak47_fire",1.77828,1,1000}; soundBegin[]={"begin1",1}; soundBurst=0; }; class FullAuto : Mode_FullAuto { begin1[]={"\cobra_items\sounds\ak47_fire",1.77828,1,1000}; soundBegin[]={"begin1",1}; reloadTime=0.1; }; }; Compiles but it is raining errors ingame. Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.displayName'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.multiplier'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.burst'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.autoFire'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.aiRateOfFire'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.aiRateOfFireDistance'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.soundContinuous'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.soundBurst'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.useAction'. Warning Message: '/' is not a value Warning Message: No entry 'bin\config.bin/CfgWeapons/AK_74/FullAuto.useActionTitle'. HOW THE FUCK DO I CLEANLY CLONE A FUCKING AK WITH MINIMAL FUCKING INHERITANCE SHIT. WITHOUT IT REPORTING 500 MILLION ERRORS ALTHOUTH IT SHOULD BE FUCKING STRAIGHTFORWARD LIKE THIS. WHY DOES THIS SHIT NEVER WORK ON THE FIRST ATTEMPT .. if anyone could point out what is methodically messed up every time I try to clone a gun it would be nice wasnt it supposed to be like this: class baseweapon_it_fucking_inherits_from; class AK47
  3. if ( cursorTarget isKindOf "Man") then { _ctrl ctrlSetText format["%1", _ent getvariable "kills"]; This actually worked. I have some questions 1. If I wanted to make a variable publically accessible like this (one player's local HUD script reporting a variable from another player), how would I do that? Would this work (init.sqf) player setvariable ["kills", "some value", TRUE]; Would this work on MP? I cant verify this locally on AI players. 2. Is it possible to detect wether a player is scoped/using binocs? Or at least hack it by detecting the FOV?
  4. Still thanks for helping out. In any case I think cutRSC might be useful for slapping stuff on the screen. Investigating that. Anyone else HATE coding gui stuff?
  5. It's me probably not getting what to do with the config viewer. I used it ingame and I had no clue what to do with it.
  6. Not the squares, the unit name and distance. Shows without selecting units in command menu when aiming at someone.
  7. Thanks, but how is that relating to the ingame HUD on other people? (am I using it wrong?)
  8. Some questions about server/client locality: 1. http://community.bistudio.com/wiki/isPlayer Can this command be used like this, without an object? for example in the init.sqf calling: if (isPlayer) then.... 2. If I wanted to delay the game start until the server is done with some scripts called in init.sqf, how to do that? init.sqf if (isPlayer) then { call { [lol] execVM "player_hud.sqf"; }; }; if (isServer) then { _handle1 = execVM "script1.sqf" ; _handle2 = execVM "script2.sqf" ; }; 3. How to make sure the isPlayer command only targets the local player of this machine? I dont want JIP players to restart these scripts for other players
  9. alleycat

    isPlayer question

    Why isDedicated? ---------- Post added at 07:01 PM ---------- Previous post was at 06:56 PM ---------- Why isDedicated? Also, I got all the jip stuff working by using while {isNull player} do { diag_log text "(PLAYER ISNULL) waiting.."; sleep 1; }; However on the very first start it still fails to run scripts properly (clients that join the server when it starts, the opposite of JIP basically)
  10. alleycat

    isPlayer question

    That would explain why re-joining makes it work. Is there a way to get it to work on first load with a delay so the script starts a few seconds after the game is running?
  11. alleycat

    isPlayer question

    Why do all scripts in the init fail on JIP when they look like this: //Anything inside this is skipped on JIP if (local player) then {}; //This fails too in init.sqf, without being inside any player/server condition player addAction
  12. alleycat

    SQF Encryptor

    null = execVM "\@AddonName\addons\test.sqf"; Only appears to work if the file is in that directory. How to target a script that is inside a pbo? I want to pack all client scripts into a pbo too so I can move the stuff to different missions. About cheat protection: If Client scripts are unpacked in the addon folder, does BE detect wether they match the one on the server? (Which the server does not even use so I am confused) Would it be safer to simply leave them in the mission pbo so at least that is cheat protected because the server sends the file?
  13. I solved the issue by using CBA eventhandlers inside in the init. The original problem was likely that the variables are sent long before the init started so they got lost. Basically like this: Init--->Call CBA eventhandler--->Makes server send the variable--->Wait on client in a while loop until the variable arrives (Most of this is shown in the example mission of the SQL Plugin made by fire)
  14. Was trying to send data from server to a client and got stuck On server(happens in OnPlayerConnected): _owner = owner _x; diag_log format ["owner: %1", _owner]; Data1 = "lol"; //Send string to client _owner publicVariableClient "Data1"; Client init.sqf if (local player) then { diag_log text "1"; Data1 = nil; diag_log text "2"; while {isNil("Data1")} do { diag_log text "3"; //wait for the server to send }; diag_log text "4"; _datatest = Data1; diag_log text format["_datatest %1", _datatest]; It never gets out of the while loop. Is there something I need to to do for a client to "catch" that the server actually sent the variable over? I assume the client is notified of this with: _owner publicVariableClient "Data1";
  15. bumping this because it is a really grave problem. Is there any way to clean out the memory? While the game is running?
  16. Flushing file MPMissions\missionname.Takistan.pbo not possible - still open Whenever trying to save a mission to multiplayer Very annoying bug. How to get rid of it without having to reboot arma2?
  17. How to start a script inside OnPlayerConnected that runs its contents after some delay (game is running)? I want to add a pistol to the player from a script that is called by OnPlayerConnected but the default gear always steps over it. I assume that is because the default gear is loaded some time after OnPlayerConnected. So I was thinking to delay my script into the game. I dont know which delay techniques work for that.
  18. Is addweapon even possible to call on the server and affect a client? I am thinking now that it only works locally
  19. The problem is that I need it to be server-side for anti cheat and stuff. Init.sqf runs locally for each client. That is why I am looking for a way to add gear server side
  20. Do you mean in the script call (see below), or inside the script (a new execVM inside pistol.sqf)? Init.sqf onPlayerConnected "[_name, _id] execVM ""pistol.sqf"""; If I do anything with gear it gets stepped over by the default gear in there.
  21. How to endlessly loop? while (true) would work in theory, however the comref says: http://www.arma2.com/comref/full.html#While%20TypedoCode Even with using "sleep" my script might easily go above 10000. Is there an efficient way to loop forever?
  22. http://community.bistudio.com/wiki/onPlayerConnected Not sure how to use this. Do I have to place a statement declaring what scripts to run in the init.sqf? Like this: onPlayerConnected "[_id, _name] execVM ""PlayerConnected.sqf"""; Or does it mean the above stuff is already running and the game is hardcoded to look for PlayerConnected.sqf? And if that is the case, where does the script have to be? mission root folder?
  23. I am having issues getting the player object inside a script on the server that is called by onPlayerConnected. _id and _name do not work as they do not represent the object. Any pointers?
  24. _list_playable = AllUnits; { if (isPlayer _x) then { diag_log format ["Unit ID %1", _x];//This one returns the player name _puid = getPlayerUID _x;//Nothing diag_log format ["PUID: %1", _puid]; }; } foreach _list_playable; This always returns nothing (pure blank nothingness). How to get the player unique ID in this method? It appears to get the session ID/name/something correctly for each player, but the UID fails. ---------- Post added at 02:05 PM ---------- Previous post was at 02:03 PM ---------- Actually ignore this, I am a dummy, forgot reading the fineprint. http://community.bistudio.com/wiki/getPlayerUID
  25. alleycat

    Get UID

    I am using AllUnits because it still works in editor, while PlayableUnits only works in MP.
×