Jump to content

iV - Ghost

Member
  • Content Count

    261
  • Joined

  • Last visited

  • Medals

Everything posted by iV - Ghost

  1. Hey Wang, I know this but I have a lot of chairs over the whole maps and I think it could be a nice feature for people who can't code.
  2. Dragging/Carrying Framework: Disable drag and/or carry for an object in 3den editor would be a nice feature. Would use it for chairs so nobody could rearrange them. We playing with ACEX sitting.
  3. You can activate this (hunger & thirst) in the ACEX options (CBA Settings).
  4. iV - Ghost

    Heros Survive

    The missionNamespace is global. If you wanna use it you have to create a own variable for every player. You can add the UID or something else. But it looks like you can do this with the profileNamespace. onPlayerKilled.sqf // SAVE MONEY profileNamespace setVariable ["TAG_yourVariable", Her_L_Money]; onPlayerRespawn.sqf // LOAD MONEY Her_L_Money = profileNamespace getVariable "TAG_yourVariable"; Thanks for helping.
  5. iV - Ghost

    Heros Survive

    @GEORGE FLOROS GR I will test it. But the missionNamespace should be global. Maybe we have to create a own variable for every player? But feedback will come...
  6. iV - Ghost

    Heros Survive

    OK thanks so far. But will this variable not be overwritten if another player gets killed?
  7. iV - Ghost

    Heros Survive

    I have tried with a respawn EventHandler in the initPlayerLocal.sqf but doesn't work. Maybe I have to save the money in the onPlayerKilled.sqf and give the player back in the eventHandler or onPlayerRespawn.sqf? That was the not working eventHandler: player addEventHandler ["Respawn", { // VARIABLES params ["_newBody", "_oldBody"]; // SAVE HEROS MONEY private _money = _oldBody getVariable "Heros_L_Money"; _newBody setVariable ["Heros_L_Money", "_money"]; // DELETE PLAYER CORPSE deleteVehicle _oldBody; }];
  8. iV - Ghost

    Heros Survive

    Save the money How can I save the money if the player gets killed and add it after respawn?
  9. But why my handgranades working? And why "...In case of explosives that were planted by someone (e.g. satchel charges)... ."?
  10. I have added a "HitPart" eventHandler on my building (selection: doors) for breaching with a claymore. But the eventHandler don't detected my explosives. If I shoot on the door it detects the hitValue and the ammoClass (No indirectValue, indirectValueRange or explosiveDamage) but not with explosives. I'm playing with ACE3 but I don't know if it is important for that. I'm trying with ied, charge, claymore but no detection. The granades (40mm and M67) works too. This is the function who is called by the eventHandler: // VARIABLES (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; private _selectedPart =_selection select 0; private _debug = true; private _substr = toArray (_selectedPart); _substr resize 5; _substr = toLower (toString _substr); // CHECK IF IS DOOR if (_substr == "door_") then { private _hitValue = _ammo select 0; // Hit value private _indirectHitValue = _ammo select 1; // Indirect hit value private _hitRange = _ammo select 2; // Indirect hit range private _explosiveDamage = _ammo select 3; // Explosive damage private _ammoClass = _ammo select 4; // Ammo class name // SHOW HIT VALUE if (_debug) then { hint format [ "_hitValue = %1 \n _indirectHitValue = %2 \n _hitRange = %3 \n _explosiveDamage = %4 \n _ammoClass = %5", _hitValue, _indirectHitValue, _hitRange, _explosiveDamage, _ammoClass ]; }; // IF DOOR HITS DIRECTLY if (_isDirect) then { private _animate = format ["%1_rot", _selectedPart]; private _var = format ["bis_disabled_%1", _selectedPart]; private _phase = _target animationPhase _animate; // OPEN DOOR COMPLETE if (_hitValue > 30) exitWith { _target animate [_animate, 1]; _target setVariable [_var, 1, true]; }; // OPEN DOOR ONLY A BIT if (_hitValue > 21 && {_hitValue <= 30}) exitWith { _target animate [_animate, _phase + 0.2]; _target setVariable [_var, 0, true]; }; }; };
  11. But HitPart should work if I reading the description. Can't understand why not.
  12. No I haven't because he has no selection for my doors.
  13. I wanna clear the area of operations after the tasks are done. But the script should waitUntil no players in the area. This is my code: /* * * Filename: fn_clearAO.sqf * Author: [iV] Ghost * Description: Delete units and mines in the ao plus all empty groups. Then delete taskmarker and pushBack file into array. * * Example: ["M_TaskHR", 500, "scripts\taskmanager\tasks\TaskHR.sqf", iV_Tasks] call iV_fnc_clearAO; * */ // RUN ON DEDICATED SERVER OR PLAYER HOST if (!isServer) exitWith {}; // VARIABLES params ["_markerName", "_radius", "_file", "_array"]; private _pos = getMarkerPos _markerName; private _players = allPlayers - entities "HeadlessClient_F"; private _allObjects = _pos nearEntities ["Man", _radius + 50]; private _allMines = _pos nearEntities ["MineMine", _radius + 50]; // WAIT UNTIL waitUntil { sleep 10; (_players distance _pos) > _radius + 100; // Doesn't work (Only wait 10 seconds) }; // CLEAR AREA, DELETE TASKMARKER & PUSHBACK FILE if ((_players distance _pos) > _radius + 100) exitWith { {deleteVehicle _x} forEach _allObjects; // Works {deleteVehicle _x} forEach _allMines; // Not tested // REMOVE EMPTY GROUPS { if ((count (units _x)) == 0) then { deleteGroup _x; _x = grpNull; _x = nil; }; } foreach allGroups; // TIMEOUT sleep 5; // DELETE TASKMARKER deleteMarker _markerName; // Works // PUSHBACK INTO ARRAY _array pushBack _file; // Doesn't work publicVariable str _array; }; But now I have 2 problems: 1. The script don't waitUntil no players in the area. 2. My _file doesn't pushBack into my _array.
  14. iV - Ghost

    clear area after task done

    @stanhope: _file is a string with my taskpath (E.G. "scripts\taskmanager\tasks\TaskHR.sqf"). After a task is selected, the path is deleted so that it is not used twice. And when a task is completed (canceled, succeeded, failed) the _file should be pushed back in the array. @Schatten: Works now. Thanks for help. Sometimes I can't see the problem. Always use google and the BIKI first. And if I can't find the problem (oftenly a few weeks later) I'm asking for help in the forum. ... private _area = _radius + 100; private _players = allPlayers - entities "HeadlessClient_F"; ... // WAIT UNTIL waitUntil { sleep 10; {_x distance _pos < _area} count _players == 0; }; // CLEAR AREA, DELETE TASKMARKER & PUSHBACK FILE if ({_x distance _pos < _area} count _players == 0) exitWith { ... // PUSHBACK INTO ARRAY _array pushBack _file; publicVariable str _array; };
  15. Thx. Probably too long in this square box looked.^^ if ({alive _x} count (nearestObjects [getMarkerPos _taskMarker, iV_radioObjects, _radius, true]) == 0) exitWith {};
  16. I wanna check if a listed object is inArea of a marker. But I'm not sure how to do this. Maybe something like this? private _radioObjects = [ "blabla1", "blabla2", "blabla3" ]; if ({alive _x && _x inArea "myMarker" && _x in _radioObjects} count _x > 0) then { execVM "task/task1.sqf"; };
  17. The finding works fine but if I destroy all of the radiotowers the task didn't end. Seems that the dead radiotowers are still there. I have tried to work with nearEntities but then he can't find the radiotowers. Any other ideas? That's my Task_G1_CS.sqf which get loaded in my area: // RUN ON DEDICATED SERVER OR PLAYER HOST if (!isServer) exitWith {}; // VARIABLES params ["_taskMarker", "_parentTask", "_radius"]; private _taskID = "Task_G1_CS"; private _taskTitle = localize "STR_iV_TaskTitle_ComSystems"; private _taskDescription = localize "STR_iV_TaskDesc_ComSystems"; private _taskMarkerType = "destroy"; // CHECK FOR TASK if ((count (getMarkerPos _taskMarker nearEntities [iV_radioObjects, _radius])) == 0) exitWith {}; // CREATE PARENT AND CHILD TASK ["Task"] call iV_fnc_taskCreate; // TIMEOUT & TRIGGER END sleep 30; waitUntil { sleep 5; (count (getMarkerPos _taskMarker nearEntities [iV_radioObjects, _radius])) == 0; //count nearestObjects [getMarkerPos _taskMarker, iV_radioObjects, _radius, true] == 0; }; // TASK SUCCEEDED if ((count (getMarkerPos _taskMarker nearEntities [iV_radioObjects, _radius])) == 0) then { ["Succeeded"] call iV_fnc_taskState; iV_Tasks pushBack "scripts\taskmanager\tasks\Task_G1_CS.sqf"; publicVariable "iV_Tasks"; };
  18. Problem: I have massive fps drops (10-20) after joining a running mission on our server. But using the virtual arsenal fix our problems and the fps are back at 50-80 FPS. Idea: Now my idea is to use this function who kill the fps killer in the InitPlayerLocal.sqf. Question: But what happend excactly when I open the arsenal?
  19. OK thx. But my areas has a 300-800m radius. Is using nearestObjects not bad for permorfance?
  20. This is my list with the classnames I am looking for: iV_radioObjects = [ "Land_Communication_F", "Land_TTowerSmall_2_F", "Land_TTowerSmall_1_F", "Land_TTowerBig_2_F", "Land_TTowerBig_1_F" ]; I think I have to use typeOf but I don't get it working.
  21. If I have a bit more time I will take a look into your script profiler. Looks great. I hope it's not to great for me and my skill. My problem is that the fps getting down after playing some hours and when I open the virtual inventory the fps getting up to the start value (50-80 fps). I don't know why but I had hoped that someone can telling me what happend in the open inventory function. Feels like something stopped this fps killer. And my idea was to simulate the open inventory in the initPlayerLocal.sqf at JIP to solve the problem for everyone. But finding out why and what it is seems the better way.
  22. I'm trying to use a headless client for a better performance in my missions. But the hc getting kicked by my missionserver. Client: headlessclient - Kicked off because of invalid ticket: Invalid ticket - Ticket invalid My hoster said there is no active steam account on his servers. Can I use a hc without a active steam account? I'm trying with battleyeLicense = 1; in the config files of my hc server (server.cfg and the headlessclient.Arma3Profile) but the problem is still there.
  23. I'm using a file in every of my missions for checking and setting the players rank. Is it possible to use only 1 file in my route directory for all my missions? initPlayerLocel.sqf execVM "scripts\misc\RankSystem.sqf"; RankSystem.sqf /* * * Filename: RankSystem.sqf * Author: [iV] Ghost * Description: Manage ranks by steam ID * */ RankCORPORAL = [ ... ]; RankSERGEANT = [ ... ]; RankLIEUTENANT = [ ... ]; RankCAPTAIN = [ ... ]; RankMAJOR = [ ... ]; RankCOLONEL = [ ... ]; // GET PLAYER UID private _playerUID = getPlayerUID player; // CHECK ARRAY AND SET RANK switch (true) do { case (_playerUID in RankCORPORAL) : { player setRank "CORPORAL"; }; case (_playerUID in RankSERGEANT) : { player setRank "SERGEANT"; }; case (_playerUID in RankLIEUTENANT) : { player setRank "LIEUTENANT"; }; case (_playerUID in RankCAPTAIN) : { player setRank "CAPTAIN"; }; case (_playerUID in RankMAJOR) : { player setRank "MAJOR"; }; case (_playerUID in RankCOLONEL) : { player setRank "COLONEL"; }; default { player setRank "PRIVATE"; }; };
  24. OK. This looks interesting. Could be a way. But is it possible for the player to manipulate the file?
  25. Thx at all for trying to help me. I wanna use only 1 file for all my missions (5 for now. But become more). So if I have to change the ranks from our community I have to work only at this one file and not more. This saves a lot of time.
×