Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About MrSydney

  • Rank
    Private First Class

Recent Profile Visitors

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

  1. Ok I understand. I thought they fired at two different times for some reason. Thank you very much for the help.
  2. Thank you, The first one did the same. Does "_oldPlyr" refer to the unit while it was still alive or while it was incapacitated and waiting to be revived? Second one with event handlers solved the issue. But now I am confused when the eventHandler is triggered. "Killed" in this context looks like it applies to when the player/unit has been put into the incapacitated state. The wiki just "when the unit is killed". But "onPlayerKilled" says the same, but seems to happen after the incapacitated state, when the unit becomes an object/corpse (bleeds out/dies/respawns). Can you help me understand maybe?
  3. Good day, I am having trouble with getUnitLoadout and setUnitLoadout functions. I want to make it so that when players respawn, they have the same loadout like they did before they died/respawned. But in some cases it removes the primary and secondary weapons. I am using the code below: //In onPlayerKilled.sqf I have: player setVariable ["Saved_Loadout",getUnitLoadout player]; //In onPlayerRespawn.sqf I have: player setUnitLoadout (player getVariable ["Saved_Loadout",[]]); It works when players respawn through the menu. But the problem is when they are shot and go into the incapacitated animation (I have revive enabled). I assume that when you go into the incapacitated state you lose your weapons, and then it saves your loadout when you "Hold space" to respawn. So technically you did not have a weapon when the script saved your loadout. I was thinking that the "getUnitLoadout" function should be triggered just before you go into the incapacitated state, but I am not sure how to do that. Maybe check if the player's health is below 10%? Any help would be appreciated. -MrSydney
  4. MrSydney

    First aid kits use

    Just tested it and everything is working great. Thank you for the help.
  5. MrSydney

    First aid kits use

    Ok, thanks so much. I will try it out in the morning.
  6. MrSydney

    First aid kits use

    Thank you very much for this. That works almost perfectly. I noticed that if you are a normal player (not a combat life saver with a medikit), and you try to heal someone else with the last FAK in your inventory, they don't regain any health and the healing does not work. Any ideas what might be causing this to happen? Sorry, I am still a noob at scripting.
  7. Hello. I am not sure if this has been asked before so apologies if it has. I am trying to make it so that combat life savers always use up a single first aid kit when healing themselves or other players. When they have none, then a hint should show up saying that "You do not have a first aid kit" or something. Medics will then have to carry both medikits to revive incapacitated players, but also first aid kits to heal injured players that are not incapacitated. In the base game, medics that have the big medikits can heal players without their First aid kits ever depleting. Any ideas on how I could do this with a script? I was thinking that I have to first do a check if the player is a medic, then if the medic has first aid kits, and if he does it should remove a single first aid kit from his inventory whenever he heals someone. But I am not sure how to stop the medic from using the medikit. I wrote a little script, but it does not seem to do anything. Any help would be appreciated, thanks. _playerType = typeOf player; if ((_playerType == "B_medic_F") or (_playerType == "B_recon_medic_F") or (_playerType == "B_G_medic_F") or (_playerType == "B_T_Medic_F")) then { player addEventHandler ["HandleHeal", { _this spawn { params ["_injured", "_healer"]; _items = items _healer; if ("Item_FirstAidKit" in _items) then { _healer removeItem Item_FirstAidKit; } else { private _damage = damage _injured; if (_injured == _healer) then { waitUntil {damage _injured != _damage}; if (damage _injured < _damage) then { uiSleep 0.3; _injured setDamage _damage; hint "You do not have a first aid kit."; }; }; }; }; }]; } else {};
  8. Yes it is my server. Thank you I will have a look.
  9. Hello, I am trying to host from a dedicated server, and everything works up until the point where I try to respawn. I get the error "publicvariable restricted #0" and then get kicked from the server. I read somewhere that I should maybe remove publicvariable.txt. what effect would that have on the server? Thank you
  10. Thank you, that seems to have worked. Hostages now move to their first waypoint after they are freed.
  11. Thank you, I changed the "hostageAction.sqf" to: [hostage, clientOwner] remoteExec ["setOwner", 2]; sleep 2; hostage setcaptive false; hostage setunitpos "auto"; hostage enableAI "Move"; but in the editor I got an error message saying "Script command setOwner cannot be used for object 'C_man_polo_1_F'. Use setGroupOwner instead. And when tested on the dedicated server, I have the same result as before, where the AI does not move. However, I do not get the error message on the server. So I also tried to change it to "setGroupOwner" instead of "setOwner", which gave me the error in the editor: " '(_this select 0) |#|setGroupOnwer (_this select 1)' Error setGroupOwner: Type Object, expected Group". And on the dedicated server I had the same result as before. Is there a different way that this can be done maybe?
  12. Hello, I am trying to get a simple hostage script to work on a dedicated multiplayer server, but it does not seem to work properly. I can see the "Free Hostage" option on the "hostage" AI, but the AI does not do anything after I select the option. While testing in the editor, the hostage is able to go to his next waypoint, but on the dedicated server, he is still stuck in place as if the script did not execute. The code I have to setup the hostage in "hostageSetup.sqf": hostage disableAI "move"; hostage setcaptive true; removeallweapons hostage; removebackpack hostage; removeGoggles hostage; removeHeadgear hostage; hostage unassignitem "nvgoggles"; hostage removeitem "nvgoggles"; removeVest hostage; hostage setunitpos "middle"; The code in "hostageAction.sqf": hostage setcaptive false; hostage setunitpos "auto"; hostage enableAI "Move"; And then finally the code in "init.sqf": execVM "hostageSetup.sqf"; hostage addaction ["Free Hostage",{ execVM "hostageAction.sqf" },nil,6,true,true,"","true",2,false,"",""]; Is there something I should add?
  13. Yes. I am renting a server that had this already set up, so I apologize if I sound a little confused. It is probably just overwritten to rather use the default.cfg since I am able to play the mission and change the server details too and see the effects. But getting back to my question about the AI skill level, is this an effective way of changing the skill variables of the AI or is it better to use a script with the "setSkill" command? It does look like the enemy AI are influenced like they should be with those commands that I described, but it is just the fact that it is not showing in the zeus view that has me doubting the whole thing.
  14. Yes I think I did. See the following lines below which is in "default.cfg". Should this be in "server.cfg"? // MISSION MNAGAEMENT // missionWhitelist[] = {}; // MISSIONS CYCLE // class Missions { class Mission1 { template = "Mission.Tanoa"; difficulty="Custom"; }; };
  15. Hello, I noticed something strange when I load up my mission on a multiplayer server. I have changed the "skillAI" and "precisionAI" values in the .Arma3Profile file on the server that I am using, but when I double click on a soldier in the Zeus view, I still see that the soldier's skill level is at the default 50%. Are the custom values being applied and just not showing or is there an error somewhere? See the full .Arma3Profile script for my server below. version=1; blood=1; singleVoice=0; gamma=1; brightness=1; maxSamplesPlayed=128; difficulty="Custom"; class DifficultyPresets { class CustomDifficulty { class Options { groupIndicators=2; friendlyTags=2; enemyTags=0; detectedMines=2; commands=2; waypoints=2; weaponInfo=2; stanceIndicator=2; reducedDamage=0; staminaBar=2; weaponCrosshair=1; visionAid=0; thirdPersonView=1; cameraShake=1; scoreTable=0; deathMessages=1; vonID=1; mapContent=0; mapContentFriendly=0; mapContentEnemy=0; mapContentMines=0; autoReport=0; multipleSaves=0; }; aiLevelPreset=3; }; class CustomAILevel { skillAI=0.80000001; precisionAI=0.40000001; }; }; sceneComplexity=1000000; shadowZDistance=100; viewDistance=3000; preferredObjectViewDistance=3000; terrainGrid=3.125; volumeCD=10; volumeFX=10; volumeSpeech=10; volumeVoN=10; vonRecThreshold=0.029999999;