Jump to content

FenixDK

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About FenixDK

  • Rank
    Private First Class
  1. Solved by adding params ["_unit"]; if (!local _unit) exitWith {}; to the opfor_cloth_rifleman.sqf
  2. Hi guys, Does anyone else experience an issue after the last update where addItem, addItemToUniform, and addItemToVest stopped working? I have a fairly simle script to replace the standard gear of AI units that are spawned prior and during the mission, and it suddenly stopped adding items to uniform and vests. The uniform, vests, and helmets items are being replaced, but no items are added in the vests and uniform themselves. So the description.ext is: class Extended_InitPost_EventHandlers { class rhs_msv_emr_aa { class Gear_init_eh { init = "_this call (compile preprocessFileLineNumbers 'scripts\opfor_cloth_rifleman.sqf')"; }; }; }; and the opfor_cloth_rifleman.sqf is: params ["_unit"]; _unit addVest selectrandom ["rhs_6b5","rhs_6b23_digi_6sh92","rhs_6b23_6sh116","rhs_6b3"]; _unit forceAddUniform selectrandom ["rhs_uniform_gorka_1_a","rhs_uniform_vkpo","rhs_uniform_vkpo_alt","rhs_uniform_vkpo_gloves","rhs_uniform_vkpo_gloves_alt","rhs_uniform_gorka_r_y","rhs_uniform_gorka_r_y_gloves", "rhs_uniform_gorka_r_g","rhs_uniform_gorka_r_g_gloves","rhs_uniform_emr_patchless","rhs_uniform_vdv_emr"]; _unit addHeadgear selectrandom ["rhs_beanie_green","rhs_ssh68_2","rhs_ssh60","rhs_stsh81","rhs_fieldcap_digi","rhs_6b7_1m_ess_bala","rhs_6b7_1m_ess","rhs_6b7_1m_emr_ess_bala","rhs_6b7_1m_emr_ess", "rhs_6b7_1m_bala1_olive","rhs_6b7_1m_bala2_olive","rhs_6b7_1m_olive","rhs_6b7_1m_bala2","rhs_6b7_1m_bala1","rhs_6b7_1m_bala2_emr","rhs_6b7_1m_bala1_emr","rhs_6b7_1m_emr","rhs_6b7_1m", "rhs_6b47_ess_bala","rhs_6b47_ess","rhs_6b47_6B50","rhs_6b47_emr_1","rhs_6b47_emr","rhs_6b47_emr_2","rhs_6b47_bala","rhs_6b47_6m2","rhs_6b47_6m2_1","rhs_6b47","rhs_6b47_bare","rhs_6b28_ess_bala", "rhs_6b28_ess","rhs_6b28_bala","rhs_6b28","rhs_6b28_green_ess_bala","rhs_6b28_green_ess","rhs_6b28_green_bala","rhs_6b28_green","rhs_6b27m_digi_ess_bala","rhs_6b27m_digi_ess","rhs_6b27m_digi_bala", "rhs_6b27m_digi","rhs_6b27m_green_ess_bala","rhs_6b27m_green_ess","rhs_6b27m_green_bala","rhs_6b27m_green","rhs_6b26_digi_ess_bala","rhs_6b26_digi_ess","rhs_6b26_digi_bala","rhs_6b26_digi", "rhs_6b26_ess_bala_green","rhs_6b26_ess_green","rhs_6b26_bala_green","rhs_6b26_green"]; for "_i" from 1 to 2 do {_unit addItemToUniform "rhs_mag_rdg2_white";}; for "_i" from 1 to 1 do {_unit addItemToUniform "rhs_30Rnd_545x39_7N10_AK";}; for "_i" from 1 to selectrandom [1,2] do {_unit addItemToVest "greenmag_ammo_545x39_basic_30Rnd";}; for "_i" from 1 to 6 do {_unit addItemToVest "rhs_30Rnd_545x39_7N10_AK";}; for "_i" from 1 to selectrandom [1,2] do {_unit addItemToVest "rhs_mag_rgd5";}; for "_i" from 1 to selectrandom [0,0,0,1] do {_unit addItemToUniform "MCC_firstAidKit";}; removeAllAssignedItems _unit; for "_i" from 1 to 1 do {_unit removeItem "rhs_1PN138";}; for "_i" from 1 to 1 do {_unit removeItem "ACRE_PRC343";}; Everything was working fine before the last update, nothing was changed in the mission itself. Anyone else has the same issue, or maybe have ideas what is wrong?
  3. FenixDK

    Detonating cord

    Lovely script for APOBS. Any idea why the cord legth does not go beyond about 50 meters no matter what parameters are set?
  4. You can use one of the following: MCC: https://steamcommunity.com/sharedfiles/filedetails/?id=338988835 Alive: https://steamcommunity.com/sharedfiles/filedetails/?id=620260972&searchtext=alive Grad Persistence: https://github.com/gruppe-adler/grad-persistence I am running MCC+Grad Persistence. There are a few bugs here and there, but overall it is fine given that I am using over 30 mods.
  5. FenixDK

    Help with sleep command

    Thanks a lot for the contribution. I also hope it will help someone else.
  6. FenixDK

    Help with sleep command

    Thanks, I will try with the spawn option and waituntil. I was thinking about the multiplying factor because of allUnits and earlier tried foreach unit group _this instead, but then it excluded all "server side spawned" AI and included only what was spawned by the Zeus.
  7. FenixDK

    Help with sleep command

    Sorry for that. The purpose is to add an init to all newly spawned (certain types of) AI. The init will add some money to the AI using Grad's money framework, hence calling grad_moneymenu_fnc_setFunds. description.ext part: class Extended_Init_EventHandlers { class Man { init = "_this call (compile preprocessFileLineNumbers 'money.sqf')"; }; }; money.sqf part: private "_this"; _this = _this select 0; { if (typeof _this == "LOP_ISTS_Infantry_SL") then { [_this, 100] call grad_moneymenu_fnc_setFunds;}; } forEach allUnits; { if (typeof _this == "LOP_ISTS_Infantry_GL") then { [_this, 25] call grad_moneymenu_fnc_setFunds;}; } forEach allUnits; //and so on... The issue: money.sqf runs quite a few times (over a 100) before it stops, which results in too much money added to the AI and presumably not the best performance. I have tried to play around with sleep command, but can't get it to work, surely doing something wrong. I didn't want to spam and create another topic about "help with sleep command", thus, the indirect relation to the initial post in this thread.
  8. FenixDK

    Help with sleep command

    Since I have issues with sleep as well... here is my piece of code 🙂 private "_this"; _this = _this select 0; { if (typeof _this == "LOP_ISTS_Infantry_SL") then { [_this, 1] call grad_moneymenu_fnc_addFunds;}; } forEach allUnits; { if (typeof _this == "LOP_ISTS_Infantry_GL") then { [_this, 1] call grad_moneymenu_fnc_addFunds;}; } forEach allUnits; and so on... This one is running non stop, how can I make it run only once or after certain amount of time? Both option would be great to know.
  9. I am using the same setup, so let me know if what @baton1990 wrote didn't help, but I am sure it will help.
  10. So I have played around with the option number 1 and managed to make it work. Please see here:
  11. If for some reason, someone will need to disable (by default) abort button while the player is ace unconscious, you need to replace the last line: if (!alive player) then {((findDisplay 49) displayctrl 104) ctrlShow false;}; with this: if (player getVariable "ACE_isUnconscious" isEqualTo true) then {((findDisplay 49) displayctrl 104) ctrlShow false;}; I needed to do it for punishing players who are abusing the lack of saving ace unconscious players by GRAD Persistence
  12. HI everyone, I wanted to start this thread, because I am sure I am not the only one who faces this problem and I think it will be beneficial for many out there, as not everyone is using a proper database to save the mission progress, so I think it would be great if someone who knows how to do it will contribute. It has to be noted that even though I have close to 0 experience in programming, I am fully aware of how much effort this request may require, but I believe in altruism 😊. Setup: GRAD Persistence and advanced ace medical system. Problem: GRAD does not save ace medical state of the player upon disconnect/return to lobby, which means if the player is injured or unconscious, he can return to lobby and then get back in the mission fully recovered. Possible solutions (from easiest to hardest): 1. A script that will disable “abort” button if the player is unconscious. Something like this (I didn’t test it yet, but I will do so today). This is a workaround which does not really solve the problem as alt+F4 is still available, but it will reduce the number of returns to lobby. I guess that I can play around on my own with the script referred above and adjust it to recognise ace unconscious, but if there is a more elegant solution, it would be great. 2. A script/addition to GRAD that will save ace unconscious parameter before player leaves to lobby/quits and upon player’s return will either set the player unconscious or kill (I think the kill is better and more fair as it will exclude healing the wounds upon return). 3. An addition to GRAD that will save ace medical wounds and unconscious state before player leaves to lobby/quits and upon return will load the saved state. I know that this is will require a lot of time to implement, as GRAD developer has it in his backlog since 2018. 4. Feel free to add your option in this thread. Result: Whichever solution we will figure out here, it will be for everyone to use. If it will be possible to implement it in GRAD Persistence, I will reach out to the developer with this solution, so others can enjoy it in the GRAD package as well.
×