Jump to content

kaleb c0d3

  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

7 Neutral

About kaleb c0d3

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. kaleb c0d3

    Need fast reload advice

    Thank you very much, @alpha993 Will post updates as soon as I can type some code.
  2. kaleb c0d3

    Need fast reload advice

    Thanks @alpha993, will try that. In an early reply, you've mentioned something about other gestures, and/or modifying existing ones (via config, i suppouse). Do you have an example or link to something like that? Thanks!
  3. kaleb c0d3

    Need fast reload advice

    Yep, already went to that obscure corners... setSkill only affects AI, and setAnimSpeedCoef works for movement-like animations. Thanks anyway, @johnnyboy
  4. Sup everyone. I'm working with a code snippet for fast reload (an old idea that never finished). The concept is to reload the current weapon, dropping the magazine to the ground and cutting the required time to reload to half (I'm a IPSC shooter IRL, so grabbed the concept from there). So far, i've achieve this: 1. Get magazine type and ammo count for current weapon. 2. Remove the magazine from current weapon. 3. Create a magazine of the same type and ammo count on the floor. 4. Insert a magazine from inventory to current weapon. Extra: using ACE, binded the action to double R key tap. The thing is that I cannot control the animation speed. I mean, I want to start the reload animation but at a faster speed; in fact, i need any animation to replace the standar one. Any advice is welcome. Thanks in advance!
  5. kaleb c0d3

    Random ennemy placement

    I think he wants to move a group of them, not just one.
  6. kaleb c0d3

    Random ennemy placement

    Please, use and modify it as you see fit! I'm glad to help you 🙂 When you define parameters that way, you are declaring with a type and a default value, like this: params [ ["_p", "no value", ["", 0]] ]; // _p : parameter name // "no value" : default value for _p, if not specified at fuction call (an "optional" parameter) // ["", 0] : array of data types accepted for _p, in this case, a string ("") or an integer (0) For more info, take a look at this. And about your code, take a look at this piece (not tested tho...) private _possibleLocation = [trig01, trig02, trig03] private _hostagePos = selectRandom _possibleLocation; { private _unitsInArea = allUnits inArea _x; { deleteVehicle _x } forEach _unitsInArea; } forEach (_possibleLocation - [_hostagePos]); If you try my fn_randomPlacement function, let me know how it worked, just to have feedback 😄
  7. kaleb c0d3

    Random ennemy placement

    Sup @Marin Lorre. I've made a script that do the same, but with a different approach. Take this example: I've got a VIP, wich need random placement. I've got several possible spots for placement (different buildings inside a town). The VIP has bodyguards; these units are different, depending on the selected placement. The script does this: the VIP is synchronized against multiple empty logics. Each logic position is a possible location (latitude, longitude and height matters). Then, i've got several AIs synchronized to each logic (the bodyguards at each location). When mission starts, the init code from the VIP gets fired and selects a random location (a randon logic), then places the VIP into that position (with an optional random radius). After that, it takes all the non-selected logics and delete the "orphans" bodyguards. Take a look at this function (fn_randomPlacement.sqf): params [ ["_target", objNull, [objNull]], ["_randRadius", 0, [0]] ]; // Get only synchronized "Logics" private _syncLogics = (synchronizedObjects _target) select { typeOf _x == "Logic" }; private _selectedLogic = selectRandom _syncLogics; // Set target position _target setVehiclePosition [_selectedLogic, [], _randRadius, "CAN_COLLIDE"]; // Delete all objects associated with the non-selected Logic { // get attached objects (exclude the _target itself) private _attachedObjects = (synchronizedObjects _x) - [_target]; { deleteVehicle _x; } forEach _attachedObjects; } forEach (_syncLogics - [_selectedLogic]); Then, in the VIP init field (this code is fixed for MP missions): if (local this) then { [this, 3] call GLMFW_fnc_randomPlacement; }; In the editor, I've got this: /--BODYGUARD1 /-------------LOCIG1---BODYGUARD2 / \--BODYGUARD3 / / /--BODYGUARD4 VIP----------------LOGIC2 \ \--BODYGUARD5 \ \ \------------LOGIC3---BODYGUARD6 If LOGIC1 is selected at random, you keep BG 1, 2 and 3 (4, 5 and 6 are deleted). If LOGIC2 is selected at random, you keep BG 4 and 5 (1, 2, 3, 6 are deleted). If LOGIC3 is selected at random, you keep BG 6 (1, 2, 3, 4, 5 are deleted). In your example, you can place one "main" hostage as vip, place different logics as possible locations, and synch more hostages into each location. Good luck and happy coding! -EDIT- When using this script, I've synchronize other objects at each "LOGIC" position, such as cars, boxes, intel, etcétera, to make the selected spot more "immersive friendly" (i mean, you are not tied to AI units at each possible location).
  8. kaleb c0d3

    More players, More enemies

    @fin_soldier as promised: download this mod and give it a try (Systems -> GravisLudum Mission Framework -> Dynamic Balance). If you want to go deeper, decompile GL_DynamicBalance.pbo ; then take a look at fn_globalBalance.sqf and fn_adjustGroup.sqf I've made the english translation (Spanish & English atm). We don't have a public Git yet, but feel free to use, modify & adapt it as you see fit (we have a Creative Commons licence CC BY-NC-SA 4.0, https://creativecommons.org/licenses/by-nc-sa/4.0). Good luck and happy coding!
  9. kaleb c0d3

    More players, More enemies

    @fin_soldier , I've made a balancing mod (in beta ATM). Because I play with a closed small group (8 members max), I have the same issue. My approach was this (before converting the code into a module): Sync AI groups to be balanced to an empty logic object. Used a function that has these parameters: the logic, minimum players, maximum players, delta, timeout. the logic: as explained above minimum players: if player count goes below this value, remove "delta" units from synced groups. maximum players: if player count goes above this value, add "delta" units to synced groups. delta: the amount of units to be added or subtracted when balancing. timeout: number of seconds to wait until balancing. The function must run server side only. The logic init code is something like this: [this, 4, 6, 1, 300] call GLMFW_fnc_globalBalance; I'm sorry that i cannot share code right now (I don't have access to my terminal ATM). Basically, I've got this scenario: After some time, the script will kick in and balance AI's based on players connected at that moment. If we are between min and max threshold, nothing happens. If we are below min, each synced group gets "delta" units deleted at random (if delta is 1, one unit is deleted per missing player). If we are above max, each synced group gets "delta" added units (duplicating one random group member). I hope this gives you an approach to make your balancing script. As soon as I get home, I will share my code with you. Take care and good luck. (Please excuse my english)
  10. kaleb c0d3

    Help with Module attributes

    By reverse engineering other vanilla modules, I made it work now... but I'm not %100 sure how. I have my suspicions by reading the Bohemia wiki that modules has their own set of "common" attributes, and if you want something more fancy, you have to mess with Cfg3DEN. Long story short, this is the fixed thing. class CfgVehicles { class Logic; class Module_F: Logic { class AttributesBase { class Default; class Edit; // removed the EditCodeMulti5 class class Combo; class Checkbox; class CheckboxNumber; class ModuleDescription; class Units; }; class ModuleDescription { class Anything; }; }; class GLKP_ModuleKeyPad: Module_F { author = "Kaleb"; scope = 2; displayName = $STR_GL_KeyPadPanel; icon = "\GL_KeyPad\images\gl_keypad.paa"; category = "GL_Category"; function = "GLKP_fnc_initKeyPad"; functionPriority = 110; isGlobal = 1; isTriggerActivated = 0; //isDisposable = 1; is3DEN = 0; class Attributes: AttributesBase { class EnterCodeCallback // <--- fixed this entire block { control = "EditCodeMulti5"; property = "gl_enterCodeCallback"; displayName = $STR_GLKP_EnterCodeCallback; tooltip = $STR_GLKP_EnterCodeCallback_Tooltip; typeName = "STRING"; validate = "none"; defaultValue = """true"""; expression = "_this setVariable ['gl_enterCodeCallback', _value, true];"; }; }; }; }; I hope it helps.
  11. Sup again. I'm migrating a bunch of loose functions to mods, so my group can use them when editing missions (they know little to no scripting). So far, i was able to create modules and place them into the editor. But now i'm struggling with a module attribute. In this particular case, I need an "activation script" attribute, just like the triggers. I saw that theres a class named "EditCodeMulti5" that fits perfecly, but when tried to edit the placed module properties, i'v got an error: no entry 'bin\config.bin/Cfg3DEN/Attributes' My config is this: class CfgVehicles { class Logic; class Module_F: Logic { class AttributesBase { class Default; class Edit; class EditCodeMulti5; // <-- added this class Combo; class Checkbox; class CheckboxNumber; class ModuleDescription; class Units; }; class ModuleDescription { class Anything; }; }; class GLKP_ModuleKeyPad: Module_F { author = "Kaleb"; scope = 2; displayName = $STR_GL_KeyPadPanel; icon = "\GL_KeyPad\images\gl_keypad.paa"; category = "GL_Category"; function = "GLKP_fnc_initKeyPad"; functionPriority = 110; isGlobal = 1; isTriggerActivated = 0; //isDisposable = 1; is3DEN = 0; class Attributes: AttributesBase { class EnterCodeCallback: EditCodeMulti5 // <-- module attribute { property = "gl_enterCodeCallback"; displayName = $STR_GLKP_EnterCodeCallback; tooltip = $STR_GLKP_EnterCodeCallback_Tooltip; typeName = "STRING"; validate = "expression"; defaultValue = """true"""; }; }; }; }; The error produces after placing the module into the editor, when double clicking on it to edit it's attributes: no entry 'bin\config.bin/Cfg3DEN/Attributes' If I change the attribute EnterCodeCallback to inherit from a "base" control, let's say Edit , it doesn't show any errors and allows me to edit the attribute. Any help is appreciated. Thanks in advance.
  12. kaleb c0d3

    MOD development cycle

    I've thought that if you're programming a mod, the mod gets loaded at Arma start, and cannot be modified until the game is closed (the Arma process has a open file handler onto the mod files). I mean.. can you recompile a mod without closing Arma? If that's the case, it will be the solution (I have in mind that you cannot do that, but I may be wrong).
  13. Sup all. I've got a question that is floating around my head for so long... How do you develop a mod? I mean, what's your development cycle? In my case, I do this: A. Start with a empty mission (VR generally), and throw/test some scripts. B. Transform that scripts into compiled functions, with their corresponding Cfg class. C. Make them a module to use directly from the editor (EDEN). My problem is that at step C, I usually do this: 1. compile the code into a mod 2. open Arma 3 3. test 4. get the bugs 5. close Arma 3 6. patch code 7. repeat I'm sure that I am doing it wrong... it's very annoying to open/close Arma 3 in every code iteration, more if i'm trying & testing to figure out some nasty bug. Any advice about impoving that cycle? Thanks in advance.
  14. kaleb c0d3

    Eden Composition Spawning

    You're welcome. Ok... maybe they do not start because my way of implementing it. I've made a dynamic mission objective module, wich do it's thing inside a function declared with postInit = 1 (where after some config data fetching, it calls LARs_fnc_spawnComp). As far as I understand, it should work ok, but Arma engine has it's own witchcraft. I will implement the getCompObjects call to make it right, but I'm not having that problem because I clean the area prior the placement (I've extended the composition definition config to add some parameters, for example the center offset and "clearArea=true"). An example: class CfgCompositions { // ---- Base Compositions Classes [DO NOT EDIT THIS!] --------------------- class BaseComposition { enabled = true; // Can this be used by DynamicOps module? compType = "none"; // Can be one of: none, roadblock, fob, .... aiAreaRadius = 50; // Radius used to estimate the AI occupation zone. areaRadius = 20; // Radius of the composition area. centerOffset[] = {0, 0, 0}; // Center Offset for the composition hideExisting = false; // Hide existing world objects inside composition area? }; // ---- FOBs -------------------------------------------------------------- class FOB_01 : BaseComposition { compType = "fob"; areaRadius = 30; hideExisting = true; #include "fob_01.sqe" }; };
  15. kaleb c0d3

    Eden Composition Spawning

    Sup Larrow! In first place, must say that this works like a charm. I've noticed that if you have smoke or fire modules in the composition (from modules > effects on EDEN), they do not "start" upon composition placement. Found a workaround that want to share with you: _compReference = [ .... ] call LARs_fnc_spawnComp; { _x setvariable ["BIS_fnc_initModules_activate", true]; } forEach (nearestObjects [_compPosition, ["ModuleEffectsFire_F", "ModuleEffectsSmoke_F"], _compRadius, true]); I hope it helps. Thanks again for your work, man. - edit - Tested in SP and MP, and works.