Jump to content

SeelieKnight

Member
  • Content Count

    15
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About SeelieKnight

  • Rank
    Private First Class
  1. Thanks! I actually thought this wouldn't work because it didn't seem like the damage and hit part values matched up between HandleDamage and the ACE functions. But I just tried your suggestion of removing the existing Event Handler, then adding my own, and it actually seems to be working pretty great! For reference, here is the code I used to get the basic effect I wanted: _unit = _this select 0; sleep 1; _unit removeAllEventHandlers "HandleDamage"; _unit addEventHandler ["HandleDamage", { private _unit = _this select 0; private _hitselection = _this select 1; private _damage = _this select 2; _damage = _damage * 0.05; //Modify incoming damage to reduce severity of injuries [_unit, _damage, _hitselection, "punch"] call ace_medical_fnc_addDamageToUnit; //Use ACE's manual method of adding damage to units, use damage type "punch" to get less serious injuries hint format ["%1 \n%2", _unit getVariable "ace_medical_openwounds", _unit getVariable "ace_medical_woundbleeding"]; 0 }];
  2. I'm trying to come up with a way to change the wounds inflicted by bullets in the ACE medical system. For example, if shot with a bullet, change the possible wounds from 'avulsion'/'velocity wound'/etc. to 'bruise'/'crushed tissue'. Ideally I'd like to alter the values that are passed to ACE woundsHandler function, but I'm not sure how all that is implemented. Anyone got insight on this?
  3. SeelieKnight

    Multiplayer While Loop on Players

    That's how I had it set up at first. When I was using execVM, it seemed like the scripts weren't firing at all, but it's been a little while so I can't remember perfectly. I do think I figured it out though. Looks like the issue was something to do with respawn. I had respawn at start, and it seems like the script continues after that, but no longer points to the same entity. The fix was to make sure that the spawned loop terminates when the player is no longer alive, then copy the code from initPlayerLocal.sqf into onPlayerRespawn.sqf.
  4. I'm trying to spawn a while loop on each player in a multiplayer mission to monitor what equipment they have but can't figure out how this works. Right now I'm just trying to hint the name of units' helmets. In initPlayerLocal.sqf: [[player], "player_scripts\01_integrated_armor.sqf"] remoteExec ["BIS_fnc_execVM", 0, true]; The code in 01_integrated_armor.sqf: _rc = _this select 0; [_rc] spawn { _rc = _this select 0; while {true} do { //%1 = name of unit //%2 = helmet unit is wearing //%3 = check if helmet matches unit's helmet variable hint format ["%1,\n%2,\n%3", _rc, headgear _rc, (headgear _rc == _rc getVariable "rc_helmet")]; sleep 1; }; }; The hint is coming through, and seems like it should be working, but the part that shows which helmet the unit is wearing won't change when I swap helmets. I checked the helmet with the debug console (i.e. "headgear player") and that shows the currently worn helmet properly, and the variable name of the player is displaying correctly in the hint, so I'm not sure why this is not working. What am I missing?
  5. Well it started working. I don't know why. This is the code that ultimately worked, but I swear I did something just like this before and it didn't work. Ah whatever. Arma is arcane. class RscButton_1600: RscButton { idc = 1600; x = 0.205156 * safezoneW + safezoneX; y = 0.109 * safezoneH + safezoneY; w = 0.589687 * safezoneW; h = 0.782 * safezoneH; };
  6. At this point I don't think this is a config issue. I just ran createDialog "RscButtonMenuOK" to make a default OK button and got the same behavior. Same thing with following the exact instructions in BIS's GUI Tutorial. Do controls spawn invisible now or something?
  7. I've set up a basic dialog and am trying to spawn it. I use createDialog, and it returns true, character control stops, and my cursor appears. So it seems to be spawning the dialog, but it's not showing up on my screen. I've tried using safezone, absolute, and all the grid settings from the Arma 3: User Interface Editor wiki page. Nothing seems to work. I remember seeing somewhere that dual monitor might mess things up but I can't find that post again and can't remember what the solution was. Any help? EDIT: So I found the documentation and looked at safeZoneAbs. I used the configuration they say should cover the entire screen of a 3 monitor set up, but I'm still seeing nothing.
  8. Ehh. I'm not sure about just upgrading RAM. I mean, I know that will be an improvement as I currently only have 16GB. 32 would be great, but like, I can run Star Citizen right now without much issue and that's probably one of the most RAM intensive games I can think of. And these crashes were happening with essentially empty missions. Literally one player and one added object. Not ruling out that this could be an issue with my system though. RAM does seem to be running at higher capacity than it should be. It was hovering above 50% with just Steam and Discord open. Went through and killed some programs and restarted Steam and Discord seems to have helped a bit, but in the past I've found that this issue has a tendency to come back after a day or so. Irritating, but at least the memalloc fix lets me game.
  9. When I start up a map where and there is a boat floating in water, and I try to open the pause menu (escape button) the game crashes. Sometimes it just crashes the instant I enter a boat that is floating on water. Something about having a boat on the water just seems to crash the game. Exit code: 0XC0000005 - STATUS_ACCESS_VIOLATION I played around some more and realized that flying helicopters also seem to have this same issue. Tested on Altis, Stratis, Tanoa, and VR. No mods loaded. Very consistent. Happens every time both when playing mission from the Editor or in SP scenarios. EDIT: I got my game working properly again by adding -malloc=system to the command line parameters. So I'm guessing a memory allocator .dll got corrupted or something? I'm good for now, but would be interested if there is a way to solve that underlying issue.
  10. I am using the following script for an inventory interaction system that passes a classname to another script. Problem is, I'd like to include some ACE items in this interaction, but as far as I can tell, lbData does not work for anything in CfgWeaons (which includes all ACE items). Instead of returning the classname, it returns nothing. Can anyone explain what's going on with this and how I might get it to work? handle = [] spawn { fnc_test = { _idc = ctrlIDC (_this select 0); _selectedIndex = _this select 1; _data = format ["%1",lbData [_idc, _selectedIndex]]; hint format ["%1", _data]; [_data] execVM 'use_item.sqf'; false }; while {true} do { waituntil {!(isnull (finddisplay 602))}; ((findDisplay 602) displayCtrl 633) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"]; ((findDisplay 602) displayCtrl 638) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"]; ((findDisplay 602) displayCtrl 619) ctrlAddEventHandler ["LBDblClick", "_this call fnc_test"]; waituntil {isnull (finddisplay 602)}; }; };
  11. SeelieKnight

    If Then not working in MP

    I was kind of using it in place of remoteExec. It basically just sends the hint to all players. (I think)
  12. SeelieKnight

    If Then not working in MP

    It was a combination of my poor understanding of MP scripting and a holdover from previous script testing. Your code actually does precisely what I want, so thank you!
  13. SeelieKnight

    If Then not working in MP

    New twist. Got it to work in SP by wrapping it in a [] spawn {} and adding a sleep of 2 sec. Apparently you just need a sleep between checks. However, this is still not working in MP. Does some part of this have weird locality issues? [] spawn{ while {alive p1} do{ if (lifeState p1 == "INCAPACITATED") then { {hint "HE DEAD";} spawn Bis_fnc_spawn; }; sleep 2; } }
  14. SeelieKnight

    If Then not working in MP

    Nah, the code will ultimately use Incapacitated instead of dead. Got ACE settings so that players never actually die. To check my code I'm just knocking myself out with grenades and then checking my unit's lifeState. It is "INCAPACITATED" but the hint never fires.
  15. I'm having major issues getting a small script to work in MP and I've narrowed it down to the IF THEN statement I'm using. For reference, this works: while {alive p1} do{ {hint "HE ALIVE";} spawn Bis_fnc_spawn; } But this does not: while {alive p1} do{ if (lifeState p1 == "INCAPACITATED") then { {hint "HE DEAD";} spawn Bis_fnc_spawn; }; } Why? The code is placed in the Init field of unit named 'p1'.
×