Jump to content

M1ke_SK

Member
  • Content Count

    455
  • Joined

  • Last visited

  • Medals

Everything posted by M1ke_SK

  1. Hi, I am searching for way to check if script exist in mission, and if does, execute it. Example: params ["_faction", "_mission"]; _path = format ["scripts\missions\%1\%2.sqf", _faction, _mission]; _condition = ""; //here put condition to check if file exist if(_condition) then { //script exist [] call compile preProcessFileLineNumbers _path; } else { //script does not exist };
  2. not sure if this project dead, or any plans to continue ? if not maybe an alternative to use with more updated version ?
  3. M1ke_SK

    Landing a Heli Help.

    // something to land the chopper // create helipad for landing private _heliport = createVehicle ["Land_HelipadEmpty_F", getMarkerPos "LZmarker", [], 0, "NONE"]; while { ( (alive helo1) && !(unitReady helo1) ) } do { sleep 1; }; helo1 land "LAND"; waitUntil { sleep 1; isTouchingGround helo1 }; // do stuff deleteVehicle _helipad;
  4. remove / re-add with updated text
  5. format ["Request <t color='%1'>%2</t>", OS_red, _text];
  6. I would appreciate better mod selection. Each time click to reopen some folder deep in tree is time consuming
  7. https://community.bistudio.com/wiki/BIS_fnc_randomPos Check the example for a whitelisted array with - [center, [a, b, angle, rect]] example: _rectangle = true; _radnomRectanglePos = [[[_position, [_xAxis, _yAxis, _rotation, _rectangle]]], _blacklist] call BIS_fnc_randomPos;
  8. In Old Man scenario, they are using script witch spawn locally this item VirtualReammoBox_F you can use these, they have almost unlimited cargo (they are available in editor) VirtualReammoBox_small_F VirtualReammoBox_F
  9. there is also limitation of Arma, where when you dismount from vehicle, it will automatically equip weapon, making you "armed" for enemy
  10. https://community.bistudio.com/wiki/BIS_fnc_stalk
  11. M1ke_SK

    Enemy AI Hunt Player

    use BIS_fnc_stalk
  12. try for individual unit _unit setVariable ["ace_map_hideBlueForceMarker", true, true]; for group { _x setVariable ["ace_map_hideBlueForceMarker", true, true]; } forEach (units _group);
  13. maybe play with aspect ratio Render To Texture #(argb,512,512,1)r2t(surface,aspect)
  14. you can probably achieve that with combination of doWatch and forceWeaponFire
  15. 1. name your container in editor "container1" (without quotes) 2. put this code to initServer.sqf in mission root directory (if it does not exist, create one) //initServer.sqf container1 addEventHandler ["ContainerOpened", { params ["_container", "_unit"]; _container setVariable ["opened", true, true]; }]; 3. put in condition of your trigger this code container1 getVariable ["opened", false] 4. profit
  16. Not very much information to go on how OP want to use it tho. This is general idea that works for every case. It depends on use. From what I see, he is using it for some counting ETA to some wave, so you probably want to have precise counter there.
  17. waitUntil { sleep 1; time > 7200 }; // your code
  18. M1ke_SK

    Looped Custom Sounds

    you will probably add heavier condition to loop with checking if any of player is near
  19. M1ke_SK

    Looped Custom Sounds

    yes, when you delete object, loop will end and sound will stop
  20. M1ke_SK

    Looped Custom Sounds

    object's init: this spawn { while { alive _this } do { _this say ["light", 10]; sleep 9; }; };
  21. Updated to version 1.2.2 Changelog: v1.2.2 - prevent attaching objects and sounds to object if class is not Land_MetalBarrel_F
  22. Simple Bomb Defuse [script] - v1.2.2 Description: Idea was to create simple "mini-game" / "chalenge" when defusing bombs in game, where unit have little time to think and create space for errors. With this script you can add possibility to "screw something" when deactivating mines. Script randomly generate string of 3 color matrix, where unit must identify which color have most appearances in matrix and cut that color wire accordingly. You can stress out unit with timer you set for deactivating the bomb. If unit cut wrong wire or timer runs out, then bomb will explode. Best object to make bomb is burning barrel, but you can use any object, just need to modify little attached objects. I added C4 and light and beeping sound to improve finding bomb in dark. Bomb can be defused with any unit, just need to have toolkit in inventory. In future, I can modify script for demotilion class only if needed. Should be working on multiplayer / dedicated server, need more testing. Instalation: - copy folder "bomb" into your mission folder - include line #include "bomb\cfgFunctions.hpp" into your CfgFunctions class in description.ext file Example: class CfgFunctions { #include "bomb\cfgFunctions.hpp" }; Usage: - place unit in editor - place object in editor (barrel) - In object init line put null = ["object", "time", "kit", "debug"] execVM "bomb\bomb.sqf"; Example: null = [this, 10, true, false] execVM "bomb\bomb.sqf"; Configuration: "object" - object to transform to bomb, default: this "time" - time in seconds for bomb defuse, default: 10 "kit" - boolean value if needed tools to defuse bomb, default: true "debug" - boolean value if need show right wire to cut, default: false Settings: open file ../bomb/settings.sqf in bomb folder where you can change internal settings of script. _choices - array of choices to cut wires, more choices will have more colors to cut, default: red, green, blue _explosion - change classname of explosion, possible values in comments _matrix - show size of maxtrix with colors, default: big _expertMultiplier - if expert is defusing bomb, unit will have more time to defuse bomb, default: 2 (time * 2x) _disableAce3 - disable/enable ACE3 interaction menu Features: - friendly hint with instructions - hint is showing only to defuser - ace3 support - JIP friendly - multiplayer / dedicated server friendly - easy installation - plug & play system - specialist have more time to defuse bomb - custom time for specialist - defusing bomb with ToolKit or DefusalKit - random generation of matrix - custom size of matrix - custom choices (number of wires) - beeping sound - blinking light Planned: - dialog for cutting wires - cutting wires in right order - when wrong cut, timer will accelerate - "slippery hands" ( this is where I move toolkit from unit inventory and spawn it next to him, as he can't cut wires when he dont have toolkit) - probability of second wiring ( first wiring is dummy ) Changelog: v1.2.2 - prevent attaching objects and sounds to object if class is not Land_MetalBarrel_F v1.2.1 - added new config parameter "_disableAce3" to disable ACE3 interaction menu v1.2 - reformat to functions - added multiplayer / dedicated server support (tested) - JIP friendly (tested) - hint showing to only defuser (tested) - battle-tested in real environment - changed to "plug & play" system - added settings.sqf file - added readme.txt file for instructions - cleaned code v1.1 - added ace3 support - added customizable explosion size - added customizable size of maxtrix - added more wires (custom) - specialist have more time to defuse bomb - custom time for specialist (default 2x time) - custom internal settings - added documentation - added simple mission for test v1.0 - public release License: Use it for public, non monetized purposes only. If you have modifications, use pull request in git repo. Will revise/include them in script. Disclaimer: Do not incorporate this script or portions of it in monetized products or servers without asking for permission and obtaining approval from me! Credits: Larrow - fix for c4 attachment MILHAUS_CZ - testing JIP and DEDI Issues: - please use issue tracker - hint showing to every player - not damaging player with ace3 Download: https://bitbucket.org/mikehudak/a3_bomb.vr http://www.armaholic.com/page.php?id=31817 Preview: Media:
  23. From what I understand you need to create random bombs with different object (classes) - place some markers on map where you want your bombs to spawn and name them "marker_0", "marker_1", ... - write names of markers into _markers array - define your class names of objects in _classes array - put this script into initServer.sqf file in root of your mission. if it does not exits, create it //initServer.sqf [] spawn { // your defined classes of object _classes = ["IEDLandSmall_F", "Land_MetalBarrel_F"]; // create markers on map where you want bomb to spawn _markers = ["marker_0", "marker_1", "marker_2"]; // create bomb object _bomb = createVehicle [selectRandom _classes, getMarkerPos (selectRandom _markers), [], 0, "NONE"]; // assign bomb functionality to object _b = [_bomb, 10, true, false] execVM "bomb\bomb.sqf"; }; - don't forget to comment line #9 in file bomb.sqf //null = [_object] spawn bomb_fnc_attachObjects; otherwise script will attach C4 to object and you don't want to have them on your IEDs
  24. waitUntil { allPlayers findIf { typeOf _x in ["B_Helipilot_F"] } == -1 };
  25. M1ke_SK

    Uav script

    @Harzach found right command from wiki: This command has effect on a UAV terminal, not on whether a unit is able to connect to a UAV or not. When a unit gets a new UAV terminal, the unit will be able to connect to the UAV again, unless this command is executed again. disableUAVConnectability //initPlayerLocal.sqf //onPlayerRespawn.sqf player addEventHandler [ "Take", { params ["_unit", "_container", "_item"]; // add roles that can control UAVs _roles = ["I_soldier_UAV_F", "O_soldier_UAV_F", "B_soldier_UAV_F"]; if (typeOf _unit in _roles) then { // add terminals from mod if you need _terminals = ["I_UavTerminal", "C_UavTerminal", "O_UavTerminal", "I_E_UavTerminal", "B_UavTerminal"]; // add your whitelisted UAVs _uavs = [uav_1, uav_2, uav_3]; if (_item in _terminals) then { { _unit disableUAVConnectability [_x, true]; } forEach (allUnitsUAV - _uavs); }; } } ];
×