Jump to content

pierremgi

Member
  • Content Count

    7379
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by pierremgi

  1. These communications menus don't add anything on existing modules. It's customization of support menu. You have to add some code to be executed on activation. On the other hand, you can create your own module. Then, it's an addon. Or the simplest way: addAction to player(s).
  2. What scores? simple hit or something with points to 10?
  3. That's the problem each time you have to refer to the full path of something (sound, picture..) In MP, there is no easy method to satisfy clients path ans server one. Even with the methods explained in the link above. The alternate method is possibly to create your own class of icon, with inheritance of an existing one in configFile cfgMarkers ? I didn't test that.
  4. Don't forget to "rearm" the trigger or add a loop for killing thisList. And let them a chance to grab a mask (or helmet).... Gas mask needs addon like CUP I wrote a little script more spicy: place a trigger (none none) just for area . That works also with a marker, with little modification. condition: true on activation: { [_x,thisTrigger] spawn { _unit =_this select 0; _trg = _this select 1; private "_timer"; while {alive _unit && local _unit} do { waitUntil {sleep 0.5; _unit inArea _trg && {vest _unit != "V_RebreatherB" or headgear _unit != "H_PilotHelmetFighter_B"}}; if (isPlayer _unit) then { hint parseText format["<t size='1.10' font='PuristaMedium' color='#F0133C'>Radiation hazard! Check your equipment</t>"]; _unit setVariable ["radiat", ppEffectCreate ["DynamicBlur",450]]; (_unit getVariable "radiat") ppEffectEnable true; (_unit getVariable "radiat") ppEffectAdjust [4]; (_unit getVariable "radiat") ppEffectCommit 10; }; _timer = diag_tickTime; waitUntil {sleep 0.5; !(_unit inArea _trg) or diag_tickTime > _timer + 30 or {vest _unit == "V_RebreatherB" && headgear _unit == "H_PilotHelmetFighter_B"}}; if ( diag_tickTime > _timer + 30) exitWith {_unit setDamage 1}; if (isPlayer _unit) then { hint parseText format["<t size='1.10' font='PuristaMedium' color='#13F03C'>You are out of contamination</t>"]; _unit setVariable ["noradiat", ppEffectCreate ["DynamicBlur",450]]; (_unit getVariable "noradiat") ppEffectEnable true; (_unit getVariable "noradiat") ppEffectAdjust [0]; (_unit getVariable "noradiat") ppEffectCommit 10; }; } } } forEach allunits; Now, your units have 30 seconds to leave the area or grab a rebreather (nato) and a pilot helmet (nato). But your vision is altered! NB: You need to open inventory if gears are on ground. Have fun!
  5. pierremgi

    Show BIS_fnc_typeText2 to all Players

    The reason why you can find a MPEH MPKIlled.
  6. You need to declare the full path of your paa. read here. Consider a light description.ext for returning a missionConfigFile
  7. You probably missed something with your addAction. That works also.
  8. Nothing. You launch a file , you read a title. The title needs the mission.sqm (or description.ext) to be run.
  9. That works in MP. You don't need to remoteExec these functions. I knew that and tested it on hosted + JIP: I placed my code into a blufor presence, server only, trigger. Then, fired it on each PC when the JIP client entered the area. I can't guess what you're doing with yours!
  10. At least, create the unit, then the task about this unit. You should consider to pass some parameters (task position...) to a function... but it's not the topic here. _TaskPosition = [17040.947,22001.61,1]; _TaskDescription = "Describe the task!"; _TaskTitle = "My name is task"; _grp = createGroup Civilian; _civil = _grp createUnit ["C_Man_casual_3_F", _TaskPosition, [], 0, ""]; _civil setbehaviour "CARELESS"; [_civil, true] call ACE_captives_fnc_setHandcuffed; _taskId = str (_civil); [west,[_taskID],[_TaskDescription, _TaskTitle, "marker"], _TaskPosition,1,2,true] call BIS_fnc_taskCreate; [_taskId,_civil] spawn { params ["_taskId","_civil"]; waitUntil {sleep 2; !alive _civil}; [_TaskID, "Succeeded"] call BIS_fnc_taskSetState; sleep 10; [_TaskID] call BIS_fnc_deleteTask; };
  11. I'm afraid not. There is a isturnedOut command, just for info, but you can't override the arma's engine along with behavior. You have also this action. Good luck!
  12. BIS_fnc_setUnitInsignia uses setObjectTextureGlobal command which was broken. I don't know if it's still the case. I'm quite sure it was fixed. On the other hand, I agree this function should be global without remoteExec it. One more thing, for thus reading here and who would like to display their own insignia in MP server: you must create your CfgUnitInsignia class in a config.cpp, i.e. an addon. That can't work in description.ext of a MP mission. In this case, that works only in SP.
  13. _TaskID = TaskAlpha1; means "make a local variable (_TaskID) equal to the global one (TaskAlpha1)". It's useless but I guess TaskAlpha1 doesn't exist somewhere, so _taskId is undefined. You probably wanted to define: _TaskID = "TaskAlpha1"; so _taskID is this string. Then use _taskID instead of "_taskID" for the rest of the script. Disregard this comment if taskAlpha1 is a number or something defined somewhere before this script. It seems to be a unit! I don't understand the //create hostage chapter and after. Why using _taskID for a task ID, then a unit ?
  14. I can confirm, there are plenty of objects on terrains, and I've got some crashes in 3D eden editor. To damper that, I'm working as far as possible in 2D map, then 3D for some positioning, crossing fingers. Don't stay in 3D editor. The preview or the mission seem less sensible.
  15. {_x do something with this variable} foreach units <a group here> like _helicrew (units somegroup is an array of objects as far as units are created, an array is mandatory to make a forEach loop working); {_x do something with this variable} foreach units (_heli select 2) // read what is returned by BIS_fnc_spawnVehicle {_x do something with this variable} foreach (_heli select 1) // same as above as crew is already an array
  16. if you stop the code after hint "hello 2", that works. At least on my host PC. So, there is a possible problem/behavior after that which leads to skip the hint... players? uiNameSpace getVariable "myUI_DollarTitle" ctrlSetText format["$ %1", Cash] ?
  17. I did some tests and changed my code above to make it work what the distance of the unit could be. In fact, it's so strange, the delay to addBag / dropbag depends on distance of the unit to the crates! The command effect doesn't travel at the speed of the light! Waouh, some BI works invalid the Einstein's theory! More seriously, totally agree with you. Some nice command/function could help.
  18. why 'mpKilled' (single quote) instead of "mpKilled" (double quote) ?
  19. I'm afraid there is no simple mean for that. Not found any command or function. For backpacks, i think you must add a civilian unit (I failed to do the same with logic), hidden, damaged false, anywhere in the map. Say MGIciv1. Then, run this code for the transfer between from crate1 to crate2: fn_CrateTransfer = { params [["_crate1",objNull,[objNull]],["_crate2",objNull,[objNull]]]; if (isNull _crate1 or isNull _crate2) exitWith {}; if (isNil "MGIciv1" or {!(MGIciv1 iskindOf "CAManBase")}) exitWith {hint "You must add a unit called MGIciv1"}; _bpks = everyBackpack _crate1; _bpkClasses = _bpks apply {typeOf _x}; _cnt = (count _bpks) - 1; for "_i" from 0 to _cnt do { _bpk = _bpks select _i; MGIciv1 action ["AddBag", _crate1, _bpkClasses select _i]; waitUntil {!(_bpk in ((everyContainer _crate1) apply {_x deleteAt 1}))}; MGIciv1 action ["DropBag", _crate2, backpack MGIciv1]; waitUntil {(_bpk in ((everyContainer _crate2) apply {_x deleteAt 1}))}; } }; [crate1,crate2] spawn fn_crateTransfer;
  20. player addEventHandler ["inventoryOpened", { MGI_EHopen = true; (_this select 1) spawn { while {MGI_EHopen} do { MGI_crateLoadout = magazineCargo _this}; }; if (isNil "MGI_EHTake") then { MGI_EHTake = player addEventHandler ["Take", { params ["_unit", "_container", "_item"]; private _wpnType = getNumber (configFile >> "cfgWeapons" >> _item >> "type"); if (_container isKindOf "ReammoBox_F") then { if (_wpnType in [1,2,4]) then { _new = magazineCargo _container; _loaded = +MGI_crateLoadout; {_loaded deleteAt (_loaded find _x)} forEach _new; {player removeMagazines _x} forEach _loaded; clearMagazineCargoGlobal _container; call { if (_wpnType == 1) exitWith {{_unit removePrimaryWeaponItem _x} forEach (primaryWeaponMagazine _unit)}; if (_wpnType == 2) exitWith {{_unit removeHandgunItem _x} forEach (handgunMagazine _unit)}; if (_wpnType == 4) exitWith {{_unit removeSecondaryWeaponItem _x} forEach (secondaryWeaponMagazine _unit)}; }; {_container addMagazineCargoGlobal [_x,1]} forEach MGI_crateLoadout; }}; }]; }; }]; player addEventHandler ["InventoryClosed", { player removeEventHandler ["Take",MGI_EHTake]; MGI_EHTake = nil; MGI_EHopen = false }];
  21. are your _laptop and so on, attached to something? or have some specific textures? Did you test it with an other object, named in editor, without any other consideration than hide it via this script.? I'm still trying to help and wondering what could be wrong here. I hope you will have better help.
  22. You can test (_heli select 2) instead of _helicrew... but I guess you just need to wait a little delay for the return value for your _helicrew. just place a sleep 0.5; (approx.) after spawning your group. It takes time to spawn it and return the result, despite the call of Bi function. _helicrew = creategroup east; _heli = [getMarkerPos "FriendlyAirspawn", 61, "CUP_I_Mi24_Mk4_AT_AAF", _helicrew] call BIS_fnc_spawnVehicle; sleep 0.3; {_x addMPEventHandler['mpkilled',{Points = 100;_this call fnc_AIKilled}];}foreach units _helicrew;
×