Jump to content

sarogahtyp

Member
  • Content Count

    2074
  • Joined

  • Last visited

  • Medals

Community Reputation

789 Excellent

About sarogahtyp

Profile Information

  • Gender
    Male
  • Location
    Berlin, Germany
  • Interests
    arma :-)

Contact Methods

  • Steam url id
    https://steamcommunity.com/id/638477454847844352

Recent Profile Visitors

3394 profile views
  1. I did this on Altis builings: getText (configFile >> "Vehicles" >> (typeOf cursorObject) >> "DestructionEffects" >> "Ruin1" >> "type") giving me back empty strings: "" I tried that code I posted in biki on those buidlings and it is working. Maybe the behaviour you describe is not a problem anymore? Also the wreck models are deleted automatically after setting damage to 0. Edit:I did a mistake with crawling the config. I will try it again later.
  2. As this is the first post coming up with google on "arma 3 repair houses" and I had to fiddle out how it works, I now digging this up and referring to the solution which is now added as comment in biki: https://community.bistudio.com/wiki/setDamage
  3. private _classnames = ["your_object_type_1_classname", "your_object_type_2_classname", "your_object_type_3_classname", "your_object_type_4_classname" ]; creates a local array named _classnames which contents have to be strings which should be the classnames of your specific object types. You can get those classnames if you start your mission, go to such object, point on it and open debug console and execute this: copyToClipboard ( typeOf cursorObject ); now you have the classname of the object in your clipboard and you can just paste it in the array. For some random houses on Altis it would look like this: private _classnames = ["Land_u_House_Big_02_V1_F", "Land_Metal_Shed_F", "Land_i_Stone_HouseBig_V2_F", "Land_u_Addon_02_V1_F" ]; private _position_trigger = position your_trigger_name; here you just have to substitute your_trigger_name with the variable name of your trigger. It defines just the center position for the circle within nearestObjects looks for the given object types. private _radius = your_search_radius; same but with search radius. Read the link bout nearestObjects I posted. Its all explained there. If you have questions after that then just ask.
  4. https://community.bistudio.com/wiki/nearestObjects private _classnames = ["your_object_type_1_classname", "your_object_type_2_classname", "your_object_type_3_classname", "your_object_type_4_classname" ]; private _position_trigger = position your_trigger_name; private _radius = your_search_radius; if ( nearestObjects [_position_trigger, _classnames, _radius, true] isEqualTo [] ) then { hint "Everything is clean now."; };
  5. sarogahtyp

    About distances

    I tried to measure the difference between distance, distanceSqr and distance2D in the debug console but without success. I could not see any difference in performance between these 3 commands.
  6. the file is damaged, I cant open it ...
  7. sarogahtyp

    About distances

    mostly I use distanceSqr. I thought bout if distance2D is faster but never tested it. With nearestObjects I use 2d mode as well.
  8. do you have any remote execution restrictions in your description.ext as described here? https://community.bistudio.com/wiki/Arma_3:_CfgRemoteExec
  9. I found this: https://steamcommunity.com/sharedfiles/filedetails/?id=2484775180 did you try it already? Edit: For me it seems to be a good port but its vanilla only.
  10. I did not fully understand what you want to do exactly but I guess you need to enable/disable the EH behaviour related on actions taken by clients. The important thing is to execute the event handler where the popups are local. This should be on server. If you need other behaviour then the event handler provides then you have to remove the EH from those targets. Therefore you should apply the EH everytime you need the behaviour and remove it after that. If a client decides on which popups the EH should get applied then you have to remoteExec the EH on the server. This can be done by first creating a sqf file with the EH. You could name it apply_EH.sqf apply_EH.sqf params ["_popup"]; //apply EH private _eh_index = _popup addEventHandler ["Hit", { private _hit_num = 10; private _down_time = 5; params ["_unit"]; private _phase = _unit animationPhase "Terc"; if ( _phase isNotEqualTo 0 ) exitWith { }; private ["_dummy"]; private _hit_already = _unit getVariable ["saro_hit_num", 0]; if ( _hit_already < _hit_num - 1) exitWith { _unit setVariable ["saro_hit_num", (_hit_already + 1) ]; _dummy = _unit spawn { sleep diag_deltaTime; _this animateSource ["Terc", 0]; }; }; _dummy = [_unit, _down_time] spawn { params [ "_unit", "_down_time" ]; private ["_phase"]; private _down_start = 0; sleep diag_deltaTime; waitUntil { _phase = _unit animationPhase "Terc"; if ( _phase isEqualTo 1 && _down_start isEqualTo 0 ) then { _down_start = diag_tickTime }; _unit animateSource ["Terc", 1]; _down_start > 0 and (diag_tickTime - _down_start) > _down_time }; _unit animateSource ["Terc", 0]; _unit setVariable ["saro_hit_num", 0]; }; }]; //store the EH index on popup to be able to remove the EH later _popup setVariable ["saro_eh_index", _eh_index]; for one specific popup (I call it _one_popup here) chosen by a client to get the EH behaviour on it you can do now: [_one_popup, "apply_EH.sqf"] remoteExec ["execVM", 2]; next thing you need a sqf file to remove that behaviour. remove_EH.sqf params [_popup]; //get the prior stored Index of the EH private _eh_index = _popup getVariable "saro_eh_index"; // no index found, just leave if (isNil "_eh_index") exitWith {}; //remove the EH _popup removeEventHandler ["Hit", _eh_index]; //destroy the index variable on popup _popup setVariable ["saro_eh_index", nil]; After that on the time a client decides to not need the EH behaviour anymore you can just do [_one_popup, "remove_EH.sqf"] remoteExec ["execVM", 2]; not tested but should work...
  11. sarogahtyp

    Deleting simple objects

    Try https://community.bistudio.com/wiki/nearObjects
  12. This is tested in init field of popup in SP only and working. Its a long thing and maybe there is a shorter solution. Should work in MP as well but not testet it there: if !(local this) exitWith {}; this addEventHandler ["Hit", { private _hit_num = 10; private _down_time = 5; params ["_unit"]; private _phase = _unit animationPhase "Terc"; if ( _phase isNotEqualTo 0 ) exitWith { }; private ["_dummy"]; private _hit_already = _unit getVariable ["saro_hit_num", 0]; if ( _hit_already < _hit_num - 1) exitWith { _unit setVariable ["saro_hit_num", (_hit_already + 1) ]; _dummy = _unit spawn { sleep diag_deltaTime; _this animateSource ["Terc", 0]; }; }; _dummy = [_unit, _down_time] spawn { params [ "_unit", "_down_time" ]; private ["_phase"]; private _down_start = 0; sleep diag_deltaTime; waitUntil { _phase = _unit animationPhase "Terc"; if ( _phase isEqualTo 1 && _down_start isEqualTo 0 ) then { _down_start = diag_tickTime }; _unit animateSource ["Terc", 1]; _down_start > 0 and (diag_tickTime - _down_start) > _down_time }; _unit animateSource ["Terc", 0]; _unit setVariable ["saro_hit_num", 0]; }; }]; you are able to adjust needed number of hits with variable _hit_num and the time the target is down with _down_time
  13. No need to use MP event handler. The Hit event handler executed where popups are local (most likely on server) should be enough. The problem is to suppress the engine animation for popping up again, but I m on it...
  14. Reading the faster topics first post helps...
×