Jump to content

SideShowFreak

Member
  • Posts

    159
  • Joined

  • Last visited

  • Days Won

    1

Reputation Activity

  1. Like
    SideShowFreak reacted to Jyggs in [Solved] Adding Icons to Simple Earplugs script   
    Finally... after a while trying to figure it out I got it working. Going to make a step by step just in case anyone wants to do it.

    1) Add an entry on your ATD_hud.h file for your custom icon. Must be under RSCPicture.... (or the same class as the Hud icons on screen)  <-- I'm using Cen's Hud so yours may vary.
    //EARPLUGS ICON class RscPicture_1434: RscPictureGUI { idc = 1434; text = "mods\hud\gui\status\earplugs.paa"; //Change to your custom icon path and name x = 0.950 * safezoneW + safezoneX; //Change position on screen Left/Right y = 0.345 * safezoneH + safezoneY; //Change position on screen Up/Down w = 0.075; h = 0.10; colorText[] = {1,1,1,1.0}; //Change color - Current color WHITE };  
    2) Open up your dayz_spaceInterrupt.sqf file and add this code (or replace if you already have it) before the line commented as " // Disable ESC after death ". Note: All the credit for this code goes to JS2k6. I do NOT take any credit for it.... I just modified it to add a toggable icon instead of the hint text box.
    // JS2k6 Very Simple Earplugs Script (modified for toggable icon) if (_dikCode == 0x16) then //Press U key to trigger. Change dikCode 0x16 to edit which key to press. { if (soundVolume == 1) then { 1 fadeSound 0.25; player setVariable["plugstate",true]; //Sets Earplug state to True - Earplugs On } else { 1 fadeSound 1; player setVariable["plugstate",false]; //Sets Earplug state to False - Earplugs Off }; };  
    3) Open up player_updateGUI.sqf and add "_state" to the Private scope at the top. Then add this after the _display = uiNamespace getVariable 'DAYZ_GUI_display';  line.
    _state = player getVariable["plugstate",false]; // Sets Earplugs icon OFF by default when loading into the game. _ctrlEarPlugs = _display displayCtrl 1434; if(_state) then { _ctrlEarPlugs ctrlShow true; player setvariable["plugstate",true]; // If value = true, then show icon on screen. Earplugs On } else { _ctrlEarPlugs ctrlShow false; player setvariable["plugstate",false]; // If value = false, then show no icon. Earplugs Off };  
    4) Make your own custom icon and place it inside your Mission.PBO. Remember to add the correct directory path and name for the icon back in step 1. ( I labeled it with a comment)
     
    Results:
    http://i.imgur.com/RxnQUaO.jpg
     
  2. Like
    SideShowFreak reacted to lucho in [RELEASE] Bexs Bunker Trader   
    allready works fine
     
    PlayerHumanity = (player getVariable"humanity");
    building1 = ( cursorTarget isKindOf "Land_MBG_HeavyShelter" && (player distance cursorTarget) < 10 );
    if  ((PlayerHumanity > 7499) && building1)  then {
  3. Like
    SideShowFreak got a reaction from lucho in [RELEASE] Bexs Bunker Trader   
    peeked at the example in the bunker file for self actions
    This should do the trick for ya
     
    if ( cursorTarget isKindOf "Infostand_1_EP1" && (player distance cursorTarget) < 2 && (player getVariable"humanity") < 5000) then {
        if (s_player_bunker < 0) then {
            s_player_bunker = player addaction[("<t color=""#0000ff"">" + ("In den Bunker") +"</t>"),"fixes\actions\bunkerin.sqf","",5,false,true,"", ""];
        };
    } else {
        player removeAction s_player_bunker;
        s_player_bunker = -1;
    };
  4. Like
    SideShowFreak got a reaction from lucho in [RELEASE] Bexs Bunker Trader   
    should eb able to add something like
    if (player getVariable"humanity") < 5000) then  {
        blah blah  exectute script
    in your self actions where you would get the scroll option, so unless you have over 5k you wont get the option to scroll
  5. Like
    SideShowFreak reacted to Antichrist in [Outdated] [release] 1.0.6 - Deploy Anything 2.8.2 - Now with Epoch building! | Customizable: DB saving | Plot | Vehicles/Buildings | Packing   
    I was going at that same locking problem for ages and i believe it has something to do with me attaching deployables to P4L system but anyways, after few hours of heavy head scratching and script breaking i've found some sort of solution.
     
    Check out and you only need step 2 like this for every deployable static gun you might ever need
    if (_object isKindof "M2StaticMG") then { _ownerID = "0"; }; Edit: If anyone wants to get this working with P4L, snap and vectors here's my file for reference, it's a mess but works without any errors :D
    http://pastebin.com/SyZbD7mz
  6. Like
    SideShowFreak got a reaction from bFe in DZGM and Bike Deployment colliding. Right-click option gone.   
    not a problem glad you got it sorted.   Any other issues feel free to hit me up
  7. Like
    SideShowFreak got a reaction from bFe in DZGM and Bike Deployment colliding. Right-click option gone.   
    If no one helps by the time I get home from work I'll check my files as I use both as well. 
  8. Like
    SideShowFreak reacted to Gr8 in [RELEASE] Client Map Markers With Player Names   
    Map Marker With Player Names
     
    Anybody who puts a Map Marker on the map, it shows the name of the player. This Prevents abuse of spamming map with markers

     
    Create a file called GG_MapMarker.sqf in a folder called custom in your mission file.
     
    Paste this inside the GG_MapMarker.sqf
    // ============================================================================= // | GG_MapMarker.sqf [1.0] | // | Script adds player name to the created map marker | // | by Prodavec, thanks to Gunter Severloh, PvPscene, Maca | // ============================================================================= // ==================================== // | INCLUDES | // ==================================== // ==================================== // | DEFINITIONS | // ==================================== //#define MMT_DEBUG #define MMT_DIK_ESC 1 #define MMT_DIK_ENTER 28 #define MMT_DIK_KPENTER 156 #define MMT_SEARCHTIME 2 #define MMT_DISPLAY_MAP 12 #define MMT_DISPLAY_MARKER 54 #define MMT_CONTROL_MAP 51 #define MMT_CONTROL_MARKER 101 // ==================================== // | PRE-INIT | // ==================================== // ==================================== // | VARIABLES | // ==================================== // ==================================== // | FUNCTIONS | // ==================================== fnc_marker_keyUp_EH = { private ["_handled", "_display", "_dikCode", "_control", "_text"]; _display = _this select 0; _dikCode = _this select 1; _handled = false; if ((_dikCode == MMT_DIK_ENTER) || (_dikCode == MMT_DIK_KPENTER)) then { _control = _display displayCtrl MMT_CONTROL_MARKER; _text = ctrlText _control; if (_text == "") then { _text = format ["%1", name player]; } else { _text = format ["%1: %2", name player, _text]; }; _control ctrlSetText _text; _display displayRemoveAllEventHandlers "keyUp"; _display displayRemoveAllEventHandlers "keyDown"; }; _handled; }; fnc_marker_keyDown_EH = { private ["_handled", "_display", "_dikCode"]; _display = _this select 0; _dikCode = _this select 1; _handled = false; if (_dikCode == MMT_DIK_ESC) then { _display displayRemoveAllEventHandlers "keyUp"; _display displayRemoveAllEventHandlers "keyDown"; }; _handled; }; fnc_map_mouseButtonDblClick_EH = { private ["_display"]; disableUserInput true; // Scheduled environment (time + MMT_SEARCHTIME) spawn { disableSerialization; while {time < _this} do { _display = findDisplay MMT_DISPLAY_MARKER; if !(isNull _display) exitWith { _display displayAddEventHandler ["keyUp", "_this call fnc_marker_keyUp_EH"]; _display displayAddEventHandler ["keyDown", "_this call fnc_marker_keyDown_EH"]; }; }; disableUserInput false; }; true; }; // ==================================== // | MAIN | // ==================================== waitUntil {sleep 0.1; !isNull (findDisplay MMT_DISPLAY_MAP)}; ((findDisplay MMT_DISPLAY_MAP) displayCtrl MMT_CONTROL_MAP) ctrlAddEventHandler ["mouseButtonDblClick", "call fnc_map_mouseButtonDblClick_EH"]; In your Init.sqf
     
    Find this code:
    if (!isDedicated) then { }; add this before the };
    execVM "custom\GG_MapMarker.sqf"; Credits:
    Prodavec
    Maca
    Gunter Severloh
    PvPscene
  9. Like
    SideShowFreak reacted to Barra81 in [Release]CraftInShed   
    Do you ever want to use a greater inventory for example in a shed, safe or even a truck/car to craft your buildables ?
     
    Here is the solution CraftInShed.
     
    With this mod admins are able to allow/disallow items with inventoryspace for crafting, also admins are able to allow/disallow craftable objects for crafting in a shed (or similiar).
     
    How to use/what it does :
     
    When a player has the inventory/gear menu open in for example a shed and he want to craft plywood, he took one woodplank item in his inventory rightclick it and choose craft plywood,
    the menu will close and the crafting process will start and show you how many items are crafted till now, how many items are left and the approximated time (in mins/secs) left to finish the whole craft process (based on max possible amount and/or space in shed).
    It is interruptable at every time, the mats to craft and the crafted items are stored in the shed you use.
     
     
     
    The mod is tested over a longer period on our customserver and should work fine, but Im sure YOU will find the one or other minor bug ;)
     
     
     
    For admins pls look at line 55-66 for customization. ( The briefcases and weapons [sledgehammer] are disallowed cause of bugs, use at your own risk, backpacks are currently not supported for craftingIn)
    I will not have much time to support you, so maybe someone wants to hop in and took the supportersrole, Im thinking of Jossy, as he is doing just fine with cKc ;)
     
     
     
     
    Installation is really easy :
     
    CraftInShed
    copy the included player_craftItem.sqf to yourmission.pbo
    in yourmission.pbo
    open your compiles.sqf
    and find :
    player_craftItem = compile preprocessFileLineNumbers
    then :
    change the path of the player_craftItem.sqf to the location of the new one IN yourmission.pbo
    CraftInShed.zip
  10. Like
    SideShowFreak got a reaction from FredEvoX in Custom loot box trigger   
    Maybe add a trigger in your mission.sqf like a safe zone trigger to call your crate script?
  11. Like
    SideShowFreak reacted to carl101 in How about an official statement?   
    Dude just slap in a vehicle pack to finish her off.
    If one thing will bring life back into the mod, it's a vehicle pack.
  12. Like
    SideShowFreak got a reaction from WileECoyote in Bases were indestructible, now they aren't?   
    a post with some info.  see if there is anything you can use
  13. Like
    SideShowFreak got a reaction from WileECoyote in Bases were indestructible, now they aren't?   
    There is a true/false setting in the run file for indestructible items in infiSTAR. Not sure if it covers all items tho.
  14. Like
    SideShowFreak got a reaction from WileECoyote in Bases were indestructible, now they aren't?   
    If my memory serves me items take a restart to be indestructible. Not sure if this is related but just trying to help.
  15. Like
    SideShowFreak reacted to Richie in Looking forward to 0.4 Milestone and suggestions   
    BI have a solution :unsure:

    Image source Cad Comic
  16. Like
    SideShowFreak reacted to Halvhjearne in [Release] HS Blackmarket 1.6 | 'New' Trader System | Special Trader | Blackmarket   
    most likely his problem is this:
     
  17. Like
    SideShowFreak reacted to Halvhjearne in [Release] HS Blackmarket 1.6 | 'New' Trader System | Special Trader | Blackmarket   
    looking at his github it looks like he forgot to change it back to HSpricing in tradermenu.sqf ...
     
    line 29:
    _config = "CfgPricing" call EPOCH_returnConfig;
  18. Like
    SideShowFreak reacted to Donnovan in [Release] Casca Vehicles Convoy for any Map   
    To make the vehicles enterable, remove this code from the script:
    _motor addEventHandler ["GetIn",{ _motor = _this select 0; _player = _this select 2; if (_player in playableUnits) then { _player action ['getOut', _motor]; }; }];
  19. Like
    SideShowFreak reacted to machine6fd in Add a custom image to the spawn box   
    Add a custom image to the spawn box.. You can put what ever image you want in this and make it your own :)
     
    What mine looks like.



     
    Add this to your mission.sqm directly above "class Markers"
    class Vehicles { items=1; class Item0 { position[]={1024.3561,5.8548489,2013.7371}; // For Altis us {23600.611,2.8548489,17990.768} azimut=180.4026; offsetY=5; id=1; side="EMPTY"; vehicle="UserTexture10m_F"; skill=0.60000002; init="this setObjectTexture [0, ""image.jpg""]"; }; }; Save any image,jpg you want in your mission root folder. Make it square or it will stretch or warp. Mine is 800x800px but i'm sure more or less wont hurt, The user texture will not grow or shrink but the image will. 
     
    *EDIT* Removed set texture not needed per VEMP whom I trust knows what hes talking about :)
     
    *EDIT #2*
     
    Alternative method to adding the image to spawn box by: Halvhjearne
     
    1. Create a file called: Debugpic.sqf
    2. Paste this code inside.
       
    /* DebugPic script by Halv, idea from machine6fd's mission.sqm version */ //Change to your picture/path below _pic = "custom\problemsolving.jpg"; //======================== Do not touch anything below this point ========================\\ if(isServer)then{ diag_log "[DebugPic]: Waiting for 'Debug_static_F' to be build ..."; waitUntil{count(nearestObjects [getMarkerPos "respawn_west", ["Debug_static_F"], 30]) > 0}; _list = nearestObjects [getMarkerPos "respawn_west", ["Debug_static_F"], 30]; _box = _list select 0; _rPos = _box modelToWorld [-0.226563,-9.76563,-5.04319]; _rDir = (getDir _box)+180; _obj = createVehicle ["UserTexture10m_F", _rPos, [], 0, "CAN_COLLIDE"]; _obj setDir _rDir; _obj setPos _rPos; _obj enableSimulation false; _obj setObjectTextureGlobal [0,_pic]; diag_log format["[DebugPic]: build texture in %1 @ [%2,%3] with texture '%4'",worldName,_rPos,_rDir,_pic]; }; 3. save and upload to mission file.
    4. add image file "custom\problemsolving.jpg" or rename.
     
    Working on Altis, Chernarus, and Bornholm (confirmed)
    Original post can be found
  20. Like
    SideShowFreak reacted to tdavison in Helicopter Parachute Supply Drop   
    Parachute Supply Drop Crates addon for Arma3 Epoch (Now with paratrooper AI)
    Give your survivors a little love
     
    This is a lightweight mission for dedicated or layer-based game servers. A Mohawk helicopter will fly in from North, South, East or West oceanic spawn positions (chose randomly at mission start), and drop a supply crate (via parachute) to random locations on Altis. The crates are configurable, but 4 types are pre-defined in the code.
     
    Features:
    Random landing zones for supply crates delivered by AI pilots 4 supply crate types are pre-defined: Food & Clothing / Supplies / Weapons & Ammo / Random Loot Customizable crate loot (via editing init.sqf) also has random loot generator 500-meter radius marker for LZ lets players know where to look Auto repeating mission once crate has been found Virtually no BE filters - uses mostly vanilla loot (but you might need to add a few) Latest Release: v1.0c (releases can be downloaded here: https://github.com/tdavison70/Helicopter-Supply-Drop/releases   This release has the following updates:   Added AI units that parachute down with crate and guard it AI units each have a sub-set of skills - these guys are tough by default AI might drop krypto BIS_fnc_findSafePos now called from helicopter spawn position and uses world safe anchor for range Added JIP (Join In Progress) support to eliminate multiple copies running on server Replaced all WaitUntil loops with While (sleep) loops to fix major lag Loitering helicopters should now be fixed (they get deleted)   I tested this PBO on my game server (Vert Hosting), and had it running side-by-side with VEMF / BlckEagl / A3AEI and had no issues. All the AI seem to have a mutual respect for one another :P   A big shout out to all the modders who inspired me to make this. Sorry, in advance, if there are tons of supply drop missions out there. This one is pretty straight-forward, and can be easily edited to your liking. Hope you enjoy!   You can download it here: https://github.com/tdavison70/Helicopter-Supply-Drop
  21. Like
    SideShowFreak reacted to Narines in Add ATMs in traders (Altis)   
    Hi,
     
    This script is extremely simple.
     
    1 - In '@epochhive/addons' add the following pbo (traderATMs.pbo) :
     
    https://dl.dropboxusercontent.com/u/63143678/epoch_scripts/traderATMs.pbo
     
    2 - In your 'MPMissions' folder, unpack 'epoch.Altis.pbo'
     
    3 - In your unpacked 'epoch.Altis' folder, open init.sqf and add the following at the very top :
    if (isServer) then { execVM "\q\addons\traderATMs\init.sqf"; }; Note : if there is no init.sqf in the root of your unpacked 'epoch.Altis' folder, just create one.
     
    4 - Repack 'epoch.Altis' into 'epoch.Altis.pbo'
     
    That's it !
     
    **EDIT** Optimized following Kroenen's suggestions
  22. Like
    SideShowFreak reacted to computermancer in Earplugs Script   
    cmEARPLUGS SCRIPT ver 2.0
     
    B) WHAT IT DOES:
    Earplugs script for Arma 3 Epoch (EPAH safe)   - This script allows you to put in "earplugs". - Config.sqf will let you configure almost every possible aspect of the script. - You can now insert and remove the earplugs by pressing a key of your choice.  - Current available keys are : F4, F5, INSERT, NUMPADMULTIPLY, NUMPADDIVIDE - You can toggle the hotkey in case you use EPAH and wont be ablt to use hotkeys. - Auto-insert and remove earplugs when getting in and out of vehicles. - Inserting earplugs reduces volume down to about 25 percent. - Removing earplugs restores volume to 100 percent.   -Thanks to mgm on epochmod.com for helping with keypress config technique.  
    Here is a link to the github files.
    https://github.com/computermancer/cmEarplugs
     
    B) INSTRUCTIONS:
    1. Copy the cmEarplugs folder to your mission folder (altis.Epoch)
    2. If you have init.sqf, copy the code in this init.sqf to yours.
    2a. If you do not have an init.sqf, copy this one over to your mission folder.
    3. Copy onPlayerKilled.sqf and onPlayerRespawn.sqf to your mission folder.
    4. Config your personal settings in the config.sqf file in the cmEarplgus folder.
    5. Edit your battleye filters.

    Edit the following in your battleye filters.
     
      ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// scripts.txt (at the end of the line add the following) /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                         (BIS_fnc_)  First Line:  !"bis_fnc_initVehicle" !"BIS_fnc_setVehicleMass_fsm" !"BIS_fnc_arsenal_type"                         (displayAddEventHandler        )  Line 53 (54 on notepad++) :               !"EP_LOOP"  (displayAddEventHandler        )  Line 53 (54 on notepad++)                 !"cmKeyPress"  (              exec                             )  Line 22 (23 on notepad++) :               !"clock.sqf"  (    removeAllActions                 )   Line 31 (32 on notepad++) :              !"onplayerkilled.sqf"  (displayRemoveEventHandler)   Line 59 (60 on notepad++) :               !"cmKeyPress"  (removeAllEventHandlers)           Line 59 (60 on notepad++) :               !"cmKeyPress"   ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// PublicVariable.txt (at the end of the line add the following) ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// First Line:                                            !"cmEarplugs_hotkeyDIKCodeNumber" First Line:                                            !"PLAYER_REJECT_NotReady1" ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// B) WHAT TO KNOW:   If you use Epoch Anti Hack, the script will work except for the keypress option. EPAH seems to disable keydown eventhandlers. But auto insert and menu inside vehicle work fine. If you disable EPAH, you can use the keypress toggle as well.
  23. Like
    SideShowFreak reacted to Zupa in [Release] ZHB - Zupa's Hud & Builder. V1.2   
    ZHB - Zupa's Hud & Builder. V1.2 Hotfix
     

    This is a selfbooting addon inside your mission pbo with easy installation. 
    It will add a hud and hud builder on your server. Default pressing 8 for hud builder and 9 to toggle on and of.
     
     
    Future plans
    Opacity on images. More options. Saving to redis. Config to allow hud builder or to disable it Define your own keybinds.  
    Changelog
     
    V1.2
    Fixed a wrongly named variable Infistar should work now correctly.  
    Commits
    https://github.com/DevZupa/ZHB-A3/commit/070b15162a10c475d2872c564fb73a22a8e377d8
    https://github.com/DevZupa/ZHB-A3/commit/abb6e4da1d32d953528fd27f5302fa83388dae16
    https://github.com/DevZupa/ZHB-A3/commit/afc50e71910c4ab684b41aea444cff6c981055d6
     
    V1.1
    KeyUp Handlers.  
    Download

     
    https://github.com/DevZupa/ZHB-A3
     
    Feel free to push fixes/addition to the git.
     
    Installation
     
    Battleye Filters in Scripts.txt
     
    Edit the following exceptions to the 7 xxx , only copy the part that starts with !
    Search for the tag word and place the rest behind it.

    7 displayAddEventHandler !"ZupaKeyUpWorking = (findDisplay 46) displayAddEventHandler ['KeyUp', '_this call ZHB_fnc_handleKey'];" 7 displayRemoveEventHandler !"(findDisplay 46) displayRemoveEventHandler ['KeyUp',ZupaKeyUpWorking];" 7 createDialog !="createDialog \"Z_HUD_Builder\";" 7 playableUnits  !",count playableUnits ,_align,_valign" Edit your filters as stated above. Place the ZHB folder in your mission pbo. Place the folowing on the bottom of your description.ext If you already have a RscTiles or CfgFunctions, place the includes in there ofcourse.

    #include "ZHB\ZHudBuilder.hpp" class RscTitles { #include "ZHB\ZHud.hpp" }; class CfgFunctions { #include "ZHB\ZHB_Functions.hpp" }; 4. Add the following in your antihack as exception.
    Z_HUD_Builder 5001, -3 5. DONE - Change the fn_initVariables to your likings.
     
    You can edit the default hud in the initVariables.sqf
     
    // Starting positions Z_HUD_pos = [ 0,0,0,0,0,0,0,0, // Bottom SIde -> left to right 0,0,3,4,5,6,0,0, // Right Side -> bottom to top 0,0,0,0,0,0,0,0, // Top side -> right to left 0,0,0,0,0,0,0,0 // Left side -> top to bottom ];  
    Numbers are as following:
     
    // 0 = Nothing/ Blank // 1 fps // 2 players // 3 damage // 4 crypto // 5 hunger // 6 thirst // 7 grid // 8 fatique // 9 Restart // 10 Toxicity // 11 Stamina // 12 Energy Extra
    Restart timer is default disabled to be picked ( change in initVariables.sqf) icons are 6 kb paa's, CAN U BELIEVE IT? SO SMALL  
    Screenshot
     

     

  24. Like
    SideShowFreak reacted to BetterDeadThanZed in A couple of addons for Altis   
    Since I'm not running an Altis server anymore, I thought I'd share my addons for it. The code just gets inserted in your config.cpp file in the a3_epoch_server_settings.pbo file under "class Altis", under the last entry in that section. 
     
    Look for these lines in the config.cpp and make sure you add that last , at the end of the last line, then insert the below pastebin code underneath it.:
    { "Land_CncBarrierMedium4_F", { 18464.2, 14281.7, 0.00330925 }, 62.7671 }, { "Land_LampShabby_F", { 18451.7, 14285.3, 0 }, 221.564 }, { "Land_HBarrier_1_F", { 18458.1, 14290.3, 0.0128841 }, 317.438 }, Code: http://pastebin.com/nUrrh4ga
     
    The first one is a small triage area at the hospital on Altis. 
     
      The second one is a small military base at the AAC airfield.  
     
  25. Like
    SideShowFreak reacted to Donnovan in [Release] Conrads Refugee Camp   
    If you like my work, please consider a donation:

    $USD

    $EURO



     
    Peacefull Conrads Refugee Camp is a place where peacefull people is know to be set up after the overall contagion of the zombie virus.
     
    There is some time from the last contact with this camp, whi don't you go there and take a look?
     
    1 - The Script: Run this on the server or in a headless client.


    //===================================== // KONFIGURATION //===================================== //Number of buildings, tents, buildings, on the camp _camp_vehicles = [ ["Acamp", 40], ["Land_A_tent", 25], ["TentStorage", 15], ["Land_Fire_Barrel_Burning", 15], ["Misc_Cargo1B_military", 5] ]; //Zombie Spawn Array donn_terror_zomb = [ [ [[6624-3735,14212-5342,0],'cid_salv', 450, 3], //Special line, not realated to spawn //[ // [position], // Spawn Radius, // number os zeds, // zeds view distance, // dist from player to start to walk, // special zed? 0 or 1 or 2, // zed life multiplier 1 is normal life , // time to be on the ground after explosion //] [[6660-3735,14177-5342,0], 25, 15, 60, 15, 0, 1.1, 60], [[6786-3735,14320-5342,0], 25, 15, 60, 15, 0, 1.1, 60], [[6791-3735,14091-5342,0], 25, 15, 60, 15, 0, 1.1, 60], [[6668-3735,14121-5342,0], 25, 15, 60, 15, 0, 1.1, 60], [[6599-3735,14260-5342,0], 25, 15, 60, 15, 0, 1.1, 60], [[6624-3735,14212-5342,0],100, 40,100, 15, 0, 1.1, 60], [[6624-3735,14212-5342,0],120, 14, 60, 15, 1, 1.2, 60], [[6624-3735,14212-5342,0], 10, 1, 60, 15, 2, 3.5,120] ] ]; //===================================== // SPAWN BUILDINGS //===================================== diag_log "[TERROR-Z] Buildings INIT Initialized!"; //Camp Center _bomberman = [2889, 8870]; { for "_y" from 1 to (_x select 1) do { _vehicle = createVehicle [_x select 0, _bomberman, [], 90, "NONE"]; _vehicle setDir (random 360); sleep 0.001; }; } forEach _camp_vehicles; //Parked Buses _ikarus = [ [[2890,8988,0],25 + (random 16),"UNLOCKED"], [[2898,8983,0],25 + (random 16),"UNLOCKED"], [[2905,8975,0],25 + (random 16),"LOCKED"], [[2912,8971,0],25 + (random 16),"LOCKED"], [[2921,8967,0],25 + (random 16),"UNLOCKED"] ]; { _vehicle = createVehicle ["Ikarus_TK_CIV_EP1", _x select 0, [], 0, "NONE"]; _vehicle setPosATL (_x select 0); _vehicle setDir (_x select 1); _vehicle setVariable ["ObjectID", "1", true]; _vehicle setVariable ["ObjectUID", "1", true]; _vehicle setVehicleLock (_x select 2); PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor, _vehicle]; } forEach _ikarus; //Alone Building _vehicle = createVehicle ["mbg_apartments_big_01_EO", [2753,9007,0.22], [], 0, "CAN_COLLIDE"]; _vehicle setPosATL [2753,9007,0.22]; _vehicle setDir 130; //LOOT: _lootPos = [ [6660.3984-3735, 14177.261-5342], [6786.0361-3735, 14320.882-5342], [6791.7695-3735, 14091.711-5342], [6668.1357-3735, 14121.218-5342], [6599.8535-3735, 14260.836-5342] ]; _lootPosOrder = [ [0,1,2,3,4], [4,3,2,1,0], [3,4,0,1,2], [0,4,1,3,2], [2,1,0,4,3], [3,0,4,2,1], [1,4,0,2,3], [1,2,3,0,4], [4,3,2,0,1] ]; _order = _lootPosOrder call BIS_fnc_selectRandom; //===================================== // SPAWN LOOT //===================================== //WEAPONS MAIN: _this = createVehicle ["TKVehicleBox_EP1", (_lootPos select (_order select 0)), [], 0, "CAN_COLLIDE"]; _this setDir -182.5; //Clear Cargo clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; //Add Cargo _this addWeaponCargoGlobal ["DMR_DZ",3]; _this addWeaponCargoGlobal ["M249_DZ",2]; _this addWeaponCargoGlobal ["Mk_48_DZ",2]; _this addWeaponCargoGlobal ["NVGoggles",2]; _this addWeaponCargoGlobal ["Binocular_Vector",1]; //_this addWeaponCargoGlobal ["BAF_L85A2_RIS_SUSAT",1]; //_this addWeaponCargoGlobal ["BAF_L85A2_RIS_Holo",1]; //_this addWeaponCargoGlobal ["G36K_camo",1]; //_this addWeaponCargoGlobal ["M4A1_AIM_SD_camo",1]; //_this addWeaponCargoGlobal ["FN_FAL",1]; //_this addWeaponCargoGlobal ["M14_EP1",1]; //_this addWeaponCargoGlobal ["M9SD",1]; _this addmagazineCargoGlobal ["20Rnd_762x51_DMR",5]; _this addmagazineCargoGlobal ["200Rnd_556x45_M249",3]; _this addmagazineCargoGlobal ["ItemHeatPack",5]; _this addmagazineCargoGlobal ["ItemPainkiller",5]; _this addmagazineCargoGlobal ["ItemMorphine",5]; _this addmagazineCargoGlobal ["ItemBloodBag",5]; _this addmagazineCargoGlobal ["ItemAntibiotic",5]; //_this addmagazineCargoGlobal ["30Rnd_556x45_StanagSD",5]; //_this addmagazineCargoGlobal ["20Rnd_762x51_FNFAL",5]; //_this addmagazineCargoGlobal ["100Rnd_762x51_M240",5]; //_this addmagazineCargoGlobal ["30Rnd_556x45_G36",5]; //_this addmagazineCargoGlobal ["30Rnd_556x45_Stanag",5]; //_this addmagazineCargoGlobal ["15Rnd_9x19_M9SD",5]; _this addbackpackCargoGlobal ["DZ_Backpack_EP1",2]; _this setPos (_lootPos select (_order select 0)); _this setVariable ["permaLoot",true,true]; //*DONN* //VEHICLE PARTS: _this = createVehicle ["TKVehicleBox_EP1", (_lootPos select (_order select 1)), [], 0, "CAN_COLLIDE"]; //Clear Cargo clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; //Add Cargo _this addWeaponCargoGlobal ["NVGoggles",3]; _this addWeaponCargoGlobal ["ItemToolbox",5]; _this addmagazineCargoGlobal ["PartEngine",5]; _this addmagazineCargoGlobal ["PartGeneric",5]; _this addmagazineCargoGlobal ["PartVRotor",5]; _this addmagazineCargoGlobal ["PartWheel",6]; _this addmagazineCargoGlobal ["PartFueltank",7]; _this addmagazineCargoGlobal ["PartGlass",10]; _this addmagazineCargoGlobal ["ItemJerrycan",15]; _this addbackpackCargoGlobal ["DZ_Backpack_EP1",2]; _this setPos (_lootPos select (_order select 1)); _this setVariable ["permaLoot",true,true]; //*DONN* //FOOD: _this = createVehicle ["TKVehicleBox_EP1", (_lootPos select (_order select 2)), [], 0, "CAN_COLLIDE"]; _this setDir -178.83; //Clear Cargo clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; //Add Cargo _this addWeaponCargoGlobal ["NVGoggles",3]; _this addWeaponCargoGlobal ["ItemGPS",4]; _this addmagazineCargoGlobal ["FoodCanBadguy",6]; _this addmagazineCargoGlobal ["FoodCanBoneboy",5]; _this addmagazineCargoGlobal ["FoodCanCorn",5]; _this addmagazineCargoGlobal ["FoodCanCurgon",5]; _this addmagazineCargoGlobal ["FoodCanDemon",5]; _this addmagazineCargoGlobal ["FoodCanFraggleos",5]; _this addmagazineCargoGlobal ["FoodCanHerpy",5]; _this addmagazineCargoGlobal ["FoodCanDerpy",5]; _this addmagazineCargoGlobal ["FoodCanTylers",5]; _this addmagazineCargoGlobal ["ItemSodaMtngreen",7]; _this addmagazineCargoGlobal ["ItemSodaR4z0r",5]; _this addmagazineCargoGlobal ["ItemSodaClays",5]; _this addmagazineCargoGlobal ["ItemSodaSmasht",5]; _this addmagazineCargoGlobal ["ItemSodaDrwaste",5]; _this addmagazineCargoGlobal ["ItemSodaLemonade",5]; _this addmagazineCargoGlobal ["ItemSodaLvg",7]; _this addmagazineCargoGlobal ["ItemSodaMzly",5]; _this addmagazineCargoGlobal ["ItemSodaRabbit",5]; _this addbackpackCargoGlobal ["DZ_Backpack_EP1",1]; _this setPos (_lootPos select (_order select 2)); _this setVariable ["permaLoot",true,true]; //*DONN* //MEDICAL: _this = createVehicle ["TKVehicleBox_EP1", (_lootPos select (_order select 3)), [], 0, "CAN_COLLIDE"]; _this setDir 90.560677; //Clear Cargo clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; //Add Cargo _this addWeaponCargoGlobal ["NVGoggles",1]; _this addWeaponCargoGlobal ["ItemGPS",1]; _this addmagazineCargoGlobal ["ItemBandage",50]; _this addmagazineCargoGlobal ["ItemPainkiller",15]; _this addmagazineCargoGlobal ["ItemMorphine",12]; _this addmagazineCargoGlobal ["ItemBloodBag",12]; _this addmagazineCargoGlobal ["ItemEpinephrine",10]; _this addmagazineCargoGlobal ["ItemAntibiotic",12]; _this addbackpackCargoGlobal ["DZ_Backpack_EP1",2]; _this setPos (_lootPos select (_order select 3)); _this setVariable ["permaLoot",true,true]; //*DONN* //BUILDING MATERIAL AND SOME WEAPONS: _this = createVehicle ["TKVehicleBox_EP1", (_lootPos select (_order select 4)), [], 0, "CAN_COLLIDE"]; //Clear Cargo clearweaponcargoGlobal _this; clearmagazinecargoGlobal _this; //Add Cargo _this addWeaponCargoGlobal ["ItemEtool",10]; _this addWeaponCargoGlobal ["ItemToolbox",5]; _this addWeaponCargoGlobal ["NVGoggles",2]; _this addmagazineCargoGlobal ["HandGrenade_West",10]; _this addmagazineCargoGlobal ["ItemSandbag",10]; _this addmagazineCargoGlobal ["ItemTankTrap",5]; _this addmagazineCargoGlobal ["ItemWire",10]; _this addmagazineCargoGlobal ["ItemTent",4]; _this addmagazineCargoGlobal ["PartGeneric",5]; _this addmagazineCargoGlobal ["TrapBear",8]; //*DONN* Jon Weapon Loot _this addWeaponCargoGlobal ["NVGoggles",2]; _this addWeaponCargoGlobal ["KSVK_DZE",3]; _this addWeaponCargoGlobal ["VSS_vintorez",2]; _this addWeaponCargoGlobal ["SCAR_H_CQC_CCO_SD",1]; _this addWeaponCargoGlobal ["FN_FAL_ANPVS4",1]; //*DONN* Jon Magazine Loot _this addmagazineCargoGlobal ["150Rnd_127x107_DSHKM",3]; _this addmagazineCargoGlobal ["5Rnd_127x108_KSVK",7]; _this addmagazineCargoGlobal ["5Rnd_127x108_KSVK",3]; _this addmagazineCargoGlobal ["20Rnd_9x39_SP5_VSS",3]; _this addmagazineCargoGlobal ["20Rnd_762x51_FNFAL",3]; _this addbackpackCargoGlobal ["DZ_Backpack_EP1",1]; _this setPos (_lootPos select (_order select 4)); _this setVariable ["permaLoot",true,true]; //*DONN* diag_log "[TERROR-Z] Buildings Finalized!"; //===================================== // SPAWN EXPLODING ZOMBIES //===================================== diag_log "[HC_ON] Terrozon script init!"; donn_terror_deadZombies = []; donn_terror_mult = 1; donn_terror_zombDamage = { private ['_zombie','_damage','_projectile','_zombie_explodeTrigered','_zombie_actDam','_source']; _zombie = _this select 0; _zombie_actDam = damage _zombie; _damage = _this select 2; _healt = _zombie getVariable ['donn_hp',1]; _damage = _damage * (0.5/_healt); _source = _this select 3; _projectile = _this select 4; if (isPlayer _source && !(_projectile in ['SmallSecondary','G_Camel_HE','Bo_GBU12_LGB',''])) then { if (_zombie_actDam + _damage > 0.5) then { _damage = 0; if !(_zombie in donn_terror_deadZombies) then { donn_terror_deadZombies = donn_terror_deadZombies + [_zombie]; [_zombie] call donn_terror_explode; }; }; } else { _damage = 0; }; _damage }; donn_terror_explode = { private ['_zombie','_special','_radSearch','_blowMult','_nearZombies','_nearToBlow','_randExtra','_rand','_blowWait']; _zombie = _this select 0; _special = _zombie getVariable ['donn_spe',0]; if (_special == 0) then {_radSearch = 10; _blowMult = 1; _blowWait = 0.25;}; if (_special == 1) then {_radSearch = 25; _blowMult = 5; _blowWait = 0.25;}; if (_special == 2) then {_radSearch = 120; _blowMult = 100; _blowWait = 0.25;}; _nearZombies = (nearestObjects [_zombie, ['zZombie_Base'], _radSearch]) - [_zombie]; _nearToBlow = []; _rand = random 100; _randExtra = 1; if (_rand < 80) then {_randExtra = 2;}; if (_rand < 60) then {_randExtra = 3;}; if (_rand < 40) then {_randExtra = 4;}; if (_rand < 20) then {_randExtra = 5;}; if (_rand < 10) then {_randExtra = 10;}; _randExtra = _randExtra * _blowMult; { if (count _nearToBlow < _randExtra) then { if (_x getVariable ['donn_spe',0] == 0) then { _nearToBlow = _nearToBlow + [_x]; }; }; } forEach _nearZombies; _zombie setDamage 0.6; _nearToBlow spawn { { _x setDamage 0.6; if (((_forEachIndex + 1) mod 5) == 0) then {sleep 0.15;}; } forEach _this; }; }; donn_terror_getTarget = { private ['_zombie','_viewDistance','_zTarget','_nearTargets','_playerPos','_playerPosZ']; _zombie = _this select 0; _viewDistance = _this select 1; _nearTargets = []; { _playerPos = _x getVariable ['donn_pos',getPosATL _x]; _playerPosZ = _playerPos select 2; if ((_zombie distance _playerPos) < _viewDistance && _playerPosZ < 4.5) then { _nearTargets = _nearTargets + [_x]; }; } forEach playableUnits; if (count _nearTargets > 0) then { _zTarget = _nearTargets call BIS_fnc_selectRandom; } else { _zTarget = ObjNull; }; _zTarget }; sleep 10; { { if (_forEachIndex == 0) then { donn_terror_check_var = _x select 1; _x spawn { private ['_center','_var','_rad','_cycle','_result']; _center = _this select 0; _var = _this select 1; _rad = _this select 2; _cycle = _this select 3; call compile format['donn_terror_trigger_%1 = false;', _var]; while {true} do { _result = false; { if (_x distance _center < _rad) exitWith { _result = true; }; } forEach playableUnits; call compile format['donn_terror_trigger_%1 = _result;', _var]; }; sleep _cycle; }; } else { private ['_qtyZomb','_deployRad', '_insertPoint','_viewDistance','_unitTypes','_sphere']; _insertPoint = _x select 0; _deployRad = _x select 1; _qtyZomb = _x select 2; _qtyZomb = round (_qtyZomb * donn_terror_mult); _viewDistance = _x select 3; _distToWalk = _x select 4; _special = _x select 5; _health = _x select 6; _inconTime = _x select 7; _unitTypes = []+ getArray (configFile >> 'CfgBuildingLoot' >> 'Default' >> 'zombieClass'); for '_k' from 1 to _qtyZomb do { private ['_agent','_type']; _type = _unitTypes call BIS_fnc_selectRandom; _agent = createAgent [_type,_insertPoint,[],_deployRad,'NONE']; sleep 0.01; if (_special > 0) then { for '_x' from 1 to _special do { _sphere = createVehicle ['Sign_sphere100cm_EP1', getPosATL _agent, [], 0, 'CAN_COLLIDE']; _sphere attachTo [_agent, [0,0,2.25 + (_x - 1) * 1]]; }; _agent setVariable ['donn_spe',_special,true]; } else { _agent setVariable ['donn_spe',0,true]; }; _agent removeAllEventHandlers 'handleDamage'; _agent addEventHandler ['handleDamage',{_this call donn_terror_zombDamage}]; _agent setVariable ['donn_terrorZombie',true,true]; _agent setVariable ['donn_hp',_health,false]; _agent setDir (random 360); [_viewDistance,_agent,donn_terror_check_var,_distToWalk,_special,_inconTime] execFSM 'terror_zombies\zombie_agent_terror.fsm'; }; }; } forEach _x; } forEach donn_terror_zomb; diag_log 'TERROR ZOMBIES RODOU (HC/SERVER)!'; //===================================== // SHOW ICONS ON THE MAP //===================================== [] spawn { while {true} do { _don_marker_put = createMarker ["Conrads Refugee Camp",[2889, 8870]]; _don_marker_put setMarkerShape "Icon"; _don_marker_put setMarkerText "Conrads Refugee Camp"; _don_marker_put setMarkerType "Flag1"; _don_marker_put setMarkerColor "ColorBlack"; sleep 5; deleteMarker "Conrads Refugee Camp"; }; }; 2 - Run on the Client, init.sqf for example. This makes the zombies explode when players are near then.
    if (!isServer) then { donn_playerInTerror = false; [] spawn { private ["_nearZombies","_isTerrorZ","_Zdamage"]; while {true} do { if (vehicle player == player) then { _nearZombies = (getPosATL player) nearEntities ["zZombie_Base",2.5]; _Zdamage = 0.6; } else { _nearZombies = (getPosATL vehicle player) nearEntities ["zZombie_Base",5]; _Zdamage = 0.8; }; { _isTerrorZ = _x getVariable ["donn_terrorZombie",false]; if !(isNil "_isTerrorZ") then { if (_x getVariable ["donn_spe",0] == 0) then { _x setDamage _Zdamage; }; }; } forEach _nearZombies; sleep 0.25; }; }; [] spawn { while {true} do { player setVariable ["donn_pos",getPosATL player,true]; uiSleep 2; }; }; diag_log "TERROR ZOMBIES OK (CLIENT)!"; donn_noZombieAreas = [ [[2889,8870,0],400] ]; { _x spawn { private ["_playerPos","_areaPos","_distCheck"]; _areaPos = _this select 0; _distCheck = _this select 1; while {true} do { waitUntil { sleep 5; _playerPos = getPosATL player; (_areaPos distance _playerPos) < _distCheck }; diag_log "ZOMBOFF!"; player_zombieCheck = {}; waitUntil { sleep 5; _playerPos = getPosATL player; (_areaPos distance _playerPos) > _distCheck }; diag_log "ZOMBON!"; player_zombieCheck = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_zombieCheck.sqf"; }; }; } forEach donn_noZombieAreas; }; 3 - FSM file (zombie behavior): put that code in a text file, in the mission folder, with this folder and name \terror_zombies\zombie_agent_terror.fsm. See that the extension of this file is not sqm, but fsm.
    /*%FSM<COMPILE "e:\Program Files (x86)\Bohemia Interactive\Tools\FSM Editor Personal Edition\scriptedFSM.cfg, DayZ Zombie Agent">*/ /*%FSM<HEAD>*/ /* item0[] = {"Inicia",0,250,-250.000000,-425.000000,-150.000000,-375.000000,0.000000,"Inicia"}; item1[] = {"Achou_Perto",4,218,-25.000000,-350.000000,75.000000,-300.000000,0.000000,"Achou" \n "Perto"}; item2[] = {"Verdadeiro",4,218,-250.000000,-325.000000,-150.000000,-275.000000,0.000000,"Verdadeiro"}; item3[] = {"Procura_um_Human",2,4346,-150.000000,-250.000000,-50.000000,-200.000000,0.000000,"Procura" \n "um Humano"}; item4[] = {"Procura_de_novo",4,218,-250.000000,-175.000000,-150.000000,-125.000000,0.000000,"Procura" \n "de novo?"}; item5[] = {"Andar_at__Humano",2,250,100.000000,-300.000000,200.000000,-250.000000,0.000000,"Andar até" \n "Humano!"}; item6[] = {"Update_posi__o_",4,218,225.000000,-350.000000,325.000000,-300.000000,0.000000,"Update" \n "posição?"}; item7[] = {"Perdeu_de_Vista",4,218,-25.000000,25.000000,75.000000,75.000000,0.000000,"Perdeu" \n "de Vista?"}; item8[] = {"Humano_Morto_",4,218,-25.000000,-75.000000,75.000000,-25.000000,0.000000,"Humano" \n "Morto?"}; item9[] = {"",7,210,-104.000000,-4.000001,-95.999992,4.000001,0.000000,""}; item10[] = {"",7,210,-104.000000,96.000000,-96.000000,104.000008,0.000000,""}; item11[] = {"Explodir_",2,250,400.000000,-425.000000,500.000000,-375.000000,0.000000,"Explodir!"}; item12[] = {"Recuperado_",4,218,400.000000,75.000000,500.000000,125.000000,0.000000,"Recuperado?"}; item13[] = {"Perto_Humano_",4,218,100.000000,-425.000000,200.000000,-375.000000,0.000000,"Perto" \n "Humano?"}; item14[] = {"",7,210,-104.000000,-404.000000,-96.000000,-396.000000,0.000000,""}; item15[] = {"Achou_Longe",4,218,-25.000000,-150.000000,75.000000,-100.000000,0.000000,"Achou" \n "Longe"}; item16[] = {"Correr_para_mais",2,250,100.000000,-200.000000,200.000000,-150.000000,0.000000,"Correr para" \n "mais perto"}; item17[] = {"Update_posi__o_",4,218,225.000000,-150.000000,325.000000,-100.000000,0.000000,"Update" \n "posição?"}; item18[] = {"Chegou_Perto_",4,218,225.000000,-250.000000,325.000000,-200.000000,0.000000,"Chegou" \n "Perto?"}; item19[] = {"",7,210,371.000000,-279.000000,379.000000,-271.000000,0.000000,""}; item20[] = {"",7,210,371.000000,-179.000000,379.000000,-171.000000,0.000000,""}; item21[] = {"",7,210,371.000000,46.000000,379.000000,54.000004,0.000000,""}; item22[] = {"",7,210,371.000000,-54.000000,379.000000,-46.000000,0.000000,""}; item23[] = {"Humano_Longe_",4,218,-25.000000,-250.000000,75.000000,-200.000000,0.000000,"Humano" \n "Longe?"}; link0[] = {0,2}; link1[] = {1,5}; link2[] = {2,3}; link3[] = {3,1}; link4[] = {3,4}; link5[] = {3,14}; link6[] = {3,15}; link7[] = {4,3}; link8[] = {5,6}; link9[] = {5,13}; link10[] = {5,19}; link11[] = {5,23}; link12[] = {6,5}; link13[] = {7,9}; link14[] = {8,9}; link15[] = {9,3}; link16[] = {10,9}; link17[] = {11,12}; link18[] = {12,10}; link19[] = {13,11}; link20[] = {14,13}; link21[] = {15,16}; link22[] = {16,13}; link23[] = {16,17}; link24[] = {16,18}; link25[] = {16,20}; link26[] = {17,16}; link27[] = {18,5}; link28[] = {19,20}; link29[] = {20,22}; link30[] = {21,7}; link31[] = {22,8}; link32[] = {22,21}; link33[] = {23,16}; globals[] = {25.000000,1,0,0,0,640,480,1,174,6316128,1,-488.040009,633.607056,150.522751,-478.192963,983,551,1}; window[] = {2,-1,-1,-1,-1,805,125,1333,125,3,1001}; *//*%FSM</HEAD>*/ class FSM { fsmName = "DayZ Zombie Agent"; class States { /*%FSM<STATE "Inicia">*/ class Inicia { name = "Inicia"; init = /*%FSM<STATEINIT""">*/"private [""_choosenEyePos"",""_agentOriPos"",""_timeLost"",""_choosenDead"",""_viewDistance"",""_grenade"",""_playersCanSee"",""_agent"",""_found"",""_choosen"",""_players"",""_start"",""_newPos""];" \n "" \n "_viewDistance = _this select 0;" \n "_agent = _this select 1;" \n "_varString = _this select 2;" \n "_ZdistToWalk = _this select 3;" \n "_Zspecial = _this select 4;" \n "_ZinconTime = _this select 5;" \n "" \n "_agentOriPos = getPosATL _agent;" \n "" \n "_agent disableAI ""FSM"";" \n "_agent setBehaviour ""CARELESS"";" \n "_agent setCombatMode ""RED"";" \n "_agent setSkill 0;" \n "" \n "_agentFugitiveQty = 0;"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Verdadeiro">*/ class Verdadeiro { priority = 0.000000; to="Procura_um_Human"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_found = false;" \n "_away = false;" \n "_newPos = getPosATL _agent;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Procura_um_Human">*/ class Procura_um_Human { name = "Procura_um_Human"; init = /*%FSM<STATEINIT""">*/"_start = diag_tickTime;" \n "if (call compile format[""donn_terror_trigger_%1"",_varString]) then {" \n " _choosen = [_agent,_viewDistance] call donn_terror_getTarget;" \n " if !(isNull _choosen) then {" \n " _found = true;" \n " " \n " _choosenPos = _choosen getVariable [""donn_pos"",getPosATL _agent];" \n " if (isNil ""_choosenPos"") then {_choosenPos = getPosATL _agent;};" \n " " \n " if ((_agent distance _newPos) + (_newPos distance _choosenPos) > 20) then {" \n " _away = true;" \n " } else {" \n " _away = false;" \n " };" \n " };" \n "};"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Procura_de_novo">*/ class Procura_de_novo { priority = 0.000000; to="Procura_um_Human"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(diag_tickTime - _start) > 5"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Achou_Longe">*/ class Achou_Longe { priority = 0.000000; to="Correr_para_mais"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"_found && _away"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_choosenDead = false;" \n "_distance_ZP_ok = true;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Perto_Humano_">*/ class Perto_Humano_ { priority = 0.000000; to="Explodir_"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"damage _agent >= 0.5"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Achou_Perto">*/ class Achou_Perto { priority = 0.000000; to="Andar_at__Humano"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"_found && !_away" \n ""/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_choosenDead = false;" \n "_distance_ZP_ok = true;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Andar_at__Humano">*/ class Andar_at__Humano { name = "Andar_at__Humano"; init = /*%FSM<STATEINIT""">*/"_start = diag_tickTime;" \n "" \n "_choosenPos = _choosen getVariable [""donn_pos"",getPosATL _agent];" \n "if (isNil ""_choosenPos"") then {_choosenPos = getPosATL _agent;};" \n "" \n "_distance_ZP_ok = _agent distance _choosenPos < _viewDistance && (_choosenPos select 2) < 4.5;" \n "" \n "if (_distance_ZP_ok) then {" \n " if (alive _choosen) then {" \n " _newPos = _choosenPos;" \n " _agent moveTo _newPos;" \n " _agent forceSpeed 2;" \n " } else {" \n " _choosenDead = true;" \n " };" \n "};"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Perto_Humano_">*/ class Perto_Humano_ { priority = 0.000000; to="Explodir_"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"damage _agent >= 0.5"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Humano_Longe_">*/ class Humano_Longe_ { priority = 0.000000; to="Correr_para_mais"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(_agent distance _newPos) + (_newPos distance (_choosen getVariable [""donn_pos"",getPosATL _agent])) > _ZdistToWalk"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Humano_Morto_">*/ class Humano_Morto_ { priority = 0.000000; to="Procura_um_Human"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"_choosenDead"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_newPos = _agentOriPos;" \n "_agent moveTo _newPos;" \n "_agent forceSpeed 10;" \n "_found = false;" \n "_away = false;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Perdeu_de_Vista">*/ class Perdeu_de_Vista { priority = 0.000000; to="Procura_um_Human"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"!_distance_ZP_ok"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_newPos = _agentOriPos;" \n "_agent moveTo _newPos;" \n "_agent forceSpeed 10;" \n "_found = false;" \n "_away = false;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Update_posi__o_">*/ class Update_posi__o_ { priority = 0.000000; to="Andar_at__Humano"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"moveToCompleted _agent || moveToFailed _agent"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Explodir_">*/ class Explodir_ { name = "Explodir_"; init = /*%FSM<STATEINIT""">*/"_agent forceSpeed 0;" \n "_agent setUnitPos ""DOWN"";" \n "_start = diag_tickTime;" \n """SmallSecondary"" createVehicle (getPosATL _agent);" \n "if (_Zspecial == 1) then {" \n " ""G_Camel_HE"" createVehicle (getPosATL _agent);" \n "};" \n "if (_Zspecial == 2) then {" \n " ""Bo_GBU12_LGB"" createVehicle (getPosATL _agent);" \n "};" \n "if (damage _agent > 0.7) then {" \n " ""G_Camel_HE"" createVehicle (getPosATL _agent);" \n " _agent setDamage 0.6;" \n "};"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Recuperado_">*/ class Recuperado_ { priority = 0.000000; to="Procura_um_Human"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"diag_tickTime-_start > _ZinconTime"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_agent setDamage 0;" \n "_agent setUnitPos ""UP"";" \n "" \n "_newPos = _agentOriPos;" \n "_agent moveTo _newPos;" \n "_agent forceSpeed 10;" \n "" \n "donn_terror_deadZombies = donn_terror_deadZombies - [_agent];" \n "" \n "_found = false;" \n "_away = false;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ /*%FSM<STATE "Correr_para_mais">*/ class Correr_para_mais { name = "Correr_para_mais"; init = /*%FSM<STATEINIT""">*/"_start = diag_tickTime;" \n "" \n "_agP = getPosATL _agent;" \n "_agPX =_agP select 0;" \n "_agPY =_agP select 1;" \n "" \n "_choosenPos = _choosen getVariable [""donn_pos"",getPosATL _agent];" \n "if (isNil ""_choosenPos"") then {_choosenPos = getPosATL _agent;};" \n "" \n "_distance_ZP_ok = _agent distance _choosenPos < _viewDistance && (_choosenPos select 2) < 4.5;" \n "" \n "if (_distance_ZP_ok) then {" \n " if (alive _choosen) then {" \n " _cP = _choosenPos;" \n " _cPX = _cP select 0;" \n " _cPY = _cP select 1;" \n "" \n " _nPX = (_agPX+_cPX)/2;" \n " _nPY = (_agPY+_cPY)/2;" \n " _newPos = [_nPX,_nPY,0];" \n " " \n " _agent moveTo _newPos;" \n " _agent forceSpeed 8;" \n " } else {" \n " _choosenDead = true;" \n " };" \n "};"/*%FSM</STATEINIT""">*/; precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/; class Links { /*%FSM<LINK "Update_posi__o_">*/ class Update_posi__o_ { priority = 0.000000; to="Correr_para_mais"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"moveToCompleted _agent || moveToFailed _agent"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Chegou_Perto_">*/ class Chegou_Perto_ { priority = 0.000000; to="Andar_at__Humano"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"(_agent distance _newPos) + (_newPos distance (_choosen getVariable [""donn_pos"",getPosATL _agent])) < _ZdistToWalk"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Humano_Morto_">*/ class Humano_Morto_ { priority = 0.000000; to="Procura_um_Human"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"_choosenDead"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_newPos = _agentOriPos;" \n "_agent moveTo _newPos;" \n "_agent forceSpeed 10;" \n "_found = false;" \n "_away = false;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Perdeu_de_Vista">*/ class Perdeu_de_Vista { priority = 0.000000; to="Procura_um_Human"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"!_distance_ZP_ok"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/"_newPos = _agentOriPos;" \n "_agent moveTo _newPos;" \n "_agent forceSpeed 10;" \n "_found = false;" \n "_away = false;"/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ /*%FSM<LINK "Perto_Humano_">*/ class Perto_Humano_ { priority = 0.000000; to="Explodir_"; precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/; condition=/*%FSM<CONDITION""">*/"damage _agent >= 0.5"/*%FSM</CONDITION""">*/; action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/; }; /*%FSM</LINK>*/ }; }; /*%FSM</STATE>*/ }; initState="Inicia"; finalStates[] = { }; }; /*%FSM</COMPILE>*/ OBS: fsm files are created by FSM Creator, but since they are text files, they can be provided like above.
    More help:

    Where to put the files?

    - Script 1 runs on server (i run it at the end of the file server_functions.sqf).
    - Script 2 runs on client (i run it in init.sqf).
    - Script 3 does not need to run, but you need to put it in the correct place in the mission file: \terror_zombies\zombie_agent_terror.fsm.
×
×
  • Create New...