Jump to content

Grumpy Old Man

  • Content count

  • Joined

  • Last visited

  • Medals

Community Reputation

2653 Excellent

About Grumpy Old Man

  • Rank
    Chief Warrant Officer


  • Occupation
    Audio Engineer

Profile Information

  1. [Release] GOM - Aircraft Loadout V1.35

    Couldn't really look into this yet, might find some time this weekend. There's no playMusic command in any of the files related to the loadout scripts. The only sounds being played are interaction sounds when using the menu buttons and installing stuff on pylons. You might have copied the objects from the demo mission in your own mission, one of those uses ambient music, take a look at the object init fields. Cheers
  2. Tigger give Group member init

    Replace this line: _toHandle = units player select {!(_x getVariable ["TAG_fnc_isAutoMedic",false])}; with this: _toHandle = units player select {!(_x getVariable ["TAG_fnc_isAutoMedic",false]) AND !isPlayer _x}; Cheers
  3. Tigger give Group member init

    You can run a small loop to check for new members and run the automedic script on them once, like this: //initPlayerLocal.sqf _automedic = [] spawn { TAG_fnc_addAutoMedic = true; while {TAG_fnc_addAutoMedic} do { _toHandle = units player select {!(_x getVariable ["TAG_fnc_isAutoMedic",false])};//will select units that are not already automedics { [_x, units player] execVM "automedic.sqf";//turn unit into autoMedic _x setVariable ["TAG_fnc_isAutoMedic",true];//set a flag to mark the unit as autoMedic so it will only be added once } forEach _toHandle; sleep 5; }; }; This will add the automedic to all units that aren't already designated automedics, every 5 seconds. If you want to stop the loop from adding automedic functionality simply set TAG_fnc_addAutoMedic to false. Cheers
  4. As @beno_83au stated, the exclamation mark is in the wrong spot. To check if a group is inside/outside a vehicle: crew _chopper arrayIntersect units _infGroup isEqualTo [];//returns true if all units of the group are outside the chopper count (units _infGroup select {_x in crew _chopper}) isEqualTo count units _infGroup;//returns true if all units of the group are inside Cheers
  5. As far as I recall this behavior broke some time ago, this snippet usually worked fine, this is now no longer the case: _test = [] spawn { _chopper = chopper; _infGroup = group player; doStop _chopper; _chopper land "Get In"; waitUntil {crew _chopper arrayIntersect units _infGroup isEqualTo []};//players group left the chopper driver _chopper sideChat "Group left, ready to board"; waitUntil {count (units _infGroup select {_x in crew _chopper}) isEqualTo count units _infGroup};//players group boarded the chopper driver _chopper sideChat "Group boarded, RTB"; _chopper land "NONE"; _chopper move [0,0,0]; }; Choppers usually take off after some units leave/board at random, never figured out what's needed to override this behavior, life's too short for trying to fix AI, heh. Cheers
  6. Sure is, just change the isKindOf check to the classname you want. Other than that you can use setVariable to set a flag on an object, and use getVariable inside the EntityKilled EH to check if a killed unit was flagged and act accordingly: //object init field this setVariable ["TAG_fnc_HVT",true]; //initServer.sqf addMissionEventHandler ["EntityKilled",{ params ["_killed", "_killer", "_instigator"]; if (_killed getVariable ["TAG_fnc_HVT",false]) exitWith {"EveryoneLost" call BIS_fnc_endMissionServer}; }]; Depending on how you plan to implement it it's probably better to add individual EHs for checking certain objects only: //HVT object init field this addEventhandler ["Killed",{"EveryoneLost" call BIS_fnc_endMissionServer}]; Cheers
  7. Something like this: //initServer.sqf in mission root addMissionEventHandler ["EntityKilled",{ params ["_killed", "_killer", "_instigator"]; if (typeOf _killed isKindOf "CAManBase" AND side group _killed isequalTo civilian) exitWith {"EveryoneLost" call BIS_fnc_endMissionServer}; }]; BIS_fnc_endMissionServer addMissionEventHandler#EntityKilled You need to check for side group, since killed units are automatically side civilian, yet still remain in their group for a short time. Cheers
  8. AI driving wrong with Jet

    All AI can do when inside a plane on the ground is follow the taxi waypoints as defined in the map config (and even that's at least a 50% chance for disaster). Cheers
  9. @Spatsiba forgot the quotation marks. This should do the trick: //only show if current weapon is the handgun //downside: will also show if no weapon equipped and no weapon in handgun slot and also if player is inside a vehicle player addAction ["<t color='#FF0000'>Shoot as Rich Texan</t>", "AirShoot.sqf", nil, 1.5, true, true, "", "currentWeapon _target isEqualTo handgunWeapon _target"]; //only show if on foot and the current weapon is handgun and the player isn't unarmed player addAction ["<t color='#FF0000'>Shoot as Rich Texan</t>", "AirShoot.sqf", nil, 1.5, true, true, "", "objectParent _target isEqualTo objNull AND currentWeapon _target isEqualTo handgunWeapon _target AND handgunWeapon _target !=''"]; Might want to use the second example if you want to play an animation (just guessing), so players won't be able to play animations inside vehicles (FFV slots). Cheers
  10. Detect any task complete by side

    The function runs where you call it. Since the init.sqf runs at mission start in SP and on every connecting player in MP you might want to run the check in the last line some place else. Cheers
  11. You can add knowsAbout to the _nearby selection, as posted earlier in this thread. Cheers
  12. Ah, I remember that one: Cheers
  13. Unless you're running into performance issues and removing your scripts solves those issues, I wouldn't worry about it. Usually having one check for the player unit is preferable vs. adding actions to all units. alive _target && _target distance _this < 5 && getDammage _target > 0;//0.0022ms when returning false _target = test; _return = false; _units = allUnits select {alive _x && _x distance _target < 5 && ([visiblePosition _target, getDir _target, 60, visiblePosition _x] call BIS_fnc_inAngleSector) && (getDammage _x > 0)}; if (count _units > 0) then {_unit = _units select 0; _target setVariable ['target', _unit]; _return = true } else { _return =false }; _return //0.002ms when returning false Cheers
  14. Could be related to distance, if within audible range you'd hear the unit itself speaking, if further away he's using the squelching radio. There was also a bug (maybe still is) that you'll hear direct audio and radio at the same time... Cheers
  15. Kill Diferent Side

    Do you know what publicVariable does? Doesn't seem like it, or rather you seem confused about its usage (in this case). Does every client need to have access to all those variables? The more you cut down on network traffic, the better. If you simply want to handle civilian/friendly kills for every side you can do it exclusively on the server, no need to broadcast any variable at all. Cheers