Jump to content

samatra

Member
  • Content Count

    652
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by samatra

  1. Engine commands: https://community.bistudio.com/wiki/findEmptyPosition https://community.bistudio.com/wiki/selectBestPlaces https://community.bistudio.com/wiki/isFlatEmpty I've used them before but they're not THAT reliable, you'll need to do plenty of testing to make sure that they get you result that you want In other case you can do your own calculations with some of these commands: https://community.bistudio.com/wiki/lineIntersects https://community.bistudio.com/wiki/lineIntersectsObjs https://community.bistudio.com/wiki/lineIntersectsWith https://community.bistudio.com/wiki/terrainIntersectASL
  2. samatra

    [RELEASE] NRE Earplugs

    You're right, on a second look it should be fine. I didn't test or use it, I went through script and missed how you handled Respawn events.
  3. samatra

    [RELEASE] NRE Earplugs

    From looks of it, actions will not reappear when player will respawn and will remain on dead body.
  4. samatra

    HELP radom loot ammo box

    Crate will be cleared each time new player joins the game because your init field will be executed for them again. Disabling simulation is bad idea for crates, you wouldn't be able to properly use items in it, only drop them on ground first and then pickup later. Proper approach: if(isServer) then {clearItemCargoGlobal this; clearWeaponCargoGlobal this; clearMagazineCargoGlobal this;}; this allowDamage false; this addAction ["Activate", "MysteryBox.sqf"]; Reason why your script doesn't work: 1) You select random weapon with BIS_fnc_selectRandom before you define _weapons array 2) You define array of arrays, _wep = _crat select 0; will point to array ["weapon"], not string "weapon" so you either need to get rid of another layer of arrays or change it to _wep = _crat select 0 select 0; and same for magazines.
  5. It doesn't matter how it looks on output, you don't see or use that in game, this is simply a way to check how your file looks after preprocessor to understand what it does. Just make sure that file and its macros are readable and easily editable for you in source (pre-preprocessor) form. Yes, simply have list of INIT_MACRO with whatever indexes you want, you can extend macro to support custom stringtable entry or other parameters.
  6. Alright, macros and preprocessor stuff is rather difficuly to use especially when you have strings there, I'll help you by solving your problem, make sure to learn how it works :) #define STRINGIFY(STRING) #STRING #define CONCAT(LEFT, RIGHT) LEFT##RIGHT #define INTRO_MACRO(INDEX, FILE) \ class STR_intro##INDEX \ { \ name = STRINGIFY(CONCAT(STR_intro,INDEX)); \ sound[] = {FILE, db+0, 1.0}; \ titles[] = {0, $CONCAT(STR_intro,INDEX)}; \ }; INTRO_MACRO(1, "mysound.wss") INTRO_MACRO(2, "blah.wss") INTRO_MACRO(123, "whatever.wss") To make sure that it works execute this like: copyToClipboard preprocessFile "description.ext"; and paste it somewhere to see how your file looks after preprocessor did its magic. ^ Updated to include filename
  7. Start using preprocessor marcos: https://community.bistudio.com/wiki/PreProcessor_Commands
  8. samatra

    Screen loading script

    Copying right from the Wasteland: Start: RscNoise_color = [1,1,1,0.5]; 4 cutText ["", "BLACK", 1]; 5 cutRsc ["RscNoise", "PLAIN", 0.00001]; Stop: 4 cutFadeOut 1; 5 cutFadeOut 1; Change 4 and 5 whatever layers you want.
  9. Since flare doesn't trigger HandleDamage your only chance would be HitPart event handler: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HitPart, keep in mind that HitPart has to be added once to all entities\units that can be potentially ignited by flare gun and have to be added where flare pistol shooter is local, not where entity\unit victim is local.
  10. samatra

    KOTH Kill Notifications

    Unfortunately there is no easy way to give you the code that works as it is connected to lots of other stuff, you'll need to do your own implementation, it is just 3 controls - controls group, structured text inside of it and highlight text that is used as solid rectangle for the flash.
  11. samatra

    KOTH Kill Notifications

    Its a Structured Text control inside Controls Group. When new line gets added, colored rectangle appears above it to display a flash. When message times out entire Structured text gets moved down one line and controls group cuts it off.
  12. samatra

    Time acceleration in scenarios

    It all depends on mission designer and their vision, if it fits and aids the idea and gameplay mechanics then I don't care if it is real time or accelerated time.
  13. samatra

    house vectorUp in MP

    setPos weirdly (with delay) aligns objects by the surface normal, use setPosATL\ASL\World instead and always set direction and upwards vectors the last
  14. onEachFrame { if(cameraOn == vehicle player) then { if(vehicle player == player) then { if(driver vehicle player == player) then { if(cameraView == "EXTERNAL") then { player switchCamera "INTERNAL"; }; }; }; }; };
  15. You didn't copy the full code, one }; is missing. Btw I had a typo in condition making it no 3rd person in vehicles instead of when on foot, opposite of what you need. Fixed it in original post and posting here again, make sure to copy full code piece! onEachFrame { if(cameraOn == vehicle player) then { if(vehicle player == player) then { if(cameraView == "EXTERNAL") then { player switchCamera "INTERNAL"; }; }; }; }; Also since onEachFrame is not stackable make sure other scripts don't override it and no 3rd person stops working.
  16. Means you have scripts placed into wrong directory obviously, make sure you have bon_recruit_units directory and open_dialog.sqf script file in it.
  17. Never dealt with it but I'd suggest to unpack functions_f.pbo and look at the implementation, maybe even clone the function and adjust to your needs.
  18. onEachFrame { if(cameraOn == vehicle player) then { if(vehicle player == player) then { if(cameraView == "EXTERNAL") then { player switchCamera "INTERNAL"; }; }; }; };
  19. Do you create your weapon holder right at the server start? (CfgFunctions preinit\postinit, vehicles init line execution time)
  20. Do it through public variable. playableUnits has list of alive player-controller units so if you're going to create markers while player is dead, it wouldn't work. Server code, call on server whenever you need to create markers for everyone: createMarkersPlease = true; publicVariable "createMarkersPlease"; // If player is hosting the game, they should also get the markers if(!isDedicated) then {call createMarkersPleaseFunc}; Client code: "createMarkersPlease" addPublicVariableEventHandler { call createMarkersPleaseFunc; }; createMarkersPleaseFunc = { if(playerSide == blufor) then { //... createMarkerLocal ... }; };
  21. Ah, I was expecting it to be an array of units, forEach (units tango31) indeed then.
  22. private ["_index", "_highest"]; _index = -1; _highest = -1; { if(_x getVariable ["DOF_RANK", -1] > _highest) then { _highest = _x getVariable ["DOF_RANK", -1]; _index = _forEachIndex; }; } forEach units tango31; _highest would be your highest rank, _index would be index of unit with this rank in the array
  23. agents is extremely fast scripting command, also thread runs in scheduled environment, performance impact should be is minimal. Keep in mind that animals that constantly do path finding do hurt performance so theoretically in the end there actually should be performance gain after deletion.
  24. I can suggest a simple scripting solution To constantly delete all animals (including fish): true spawn { waitUntil { {deleteVehicle agent _x;} forEach agents; sleep 0.01; false; }; }; To delete just rabbits and snakes: true spawn { waitUntil { { if(agent _x isKindOf "Rabbit_F" || agent _x isKindOf "Snake_random_F") then { deleteVehicle agent _x; }; } forEach agents; sleep 0.01; false; }; }; Run one of these scripts once on each client.
×