Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

hunter1000

Member
  • Content Count

    15
  • Joined

  • Last visited

  • Medals

Community Reputation

5 Neutral

About hunter1000

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Oh cmon guys... Disable buttons and set custom VA dont work as intended. Cause if u make VA with custom guns and outfit if wont load any preset anymore in MP. I guess TS need another aproach. He could make a trigger near VA position for players only and deny use of inproper weapons and outfit.
  2. hunter1000

    [Release] Injured Ai script/Mod

    https://community.bistudio.com/wiki/say3D Read the last comment if u dont trust me))) Btw u can use remoteExec it will do.
  3. hunter1000

    [Release] Injured Ai script/Mod

    No problem mate. But... there is one thing to fix. As far as i know u use Say3D command to make ai speak or scream. The problem is that this command is a local one and others players wont hear anything from the "source" of the sound (cause its local). :rolleyes: U need a function to tell all players what sound and where will be. ok so lets begin... in init.sqf so all players and server know what is going on on mission. fn_Say3D= //Function itself to use later instead of Say3D {private ["_obj","_snd"]; _obj = _this select 0; //source or object _snd = _this select 1; //sound class name in soundsCfg must be in "" NetSay3D = [_obj,_snd]; publicVariable "NetSay3D"; if (not isDedicated) then {_obj say3D _snd}; true }; if (isNil "NetSay3D") then {NetSay3D = [objNull,0];}; //if none dont cry with error dear arma... "NetSay3D" addPublicVariableEventHandler { private["_array"]; _array = _this select 1; (_array select 0) say3D (_array select 1); }; then u must replace such lines like _sound = [ "fire1", "fire2", "fire3", "fire4", "fire5", "fire6", "fire7", "fire8", "fire9", "fire10", "fire11","fire12","fire13","fire14","fire15","fire16","fire17","fire18","fire19","fire20", "fire21","fire22","fire23","fire24","fire25","fire26","fire27","fire28","fire29","fire30", "fire31","fire32","fire33","fire34","fire35","fire36","fire37","fire38" ] call BIS_fnc_selectRandom; _source say3D [_sound, 100, 1]; //THIS ONE NEEDS TO REPLACE with new line _nul = [_source ,_sound] call fn_Say3D; //Correct But where i can define range and laudness for the sound u say? In class CfgSounds Example: class pain1 { name = "pain1"; // Display Name for editor sound[] = {"\sounds\pain1.ogg", db+10, 1.0, 80}; //In this string u must change or add some numbers titles[]={}; //Do not use unless you know what you are doing! }; Details sound[] = { "\sounds\pain1.ogg", //Path to the file. db+10, //Volume level. db+number means louder. Db-number means u know... cant remember word in English... 1.0, //Overall volume. keep it at 1.0 80 //Thats it! It defines distance from the sound source to the player. But keep that in mind if u make it about 1200 u wont get it "louder". }; I guess i wrote it right... ^_^
  4. hunter1000

    [Release] Injured Ai script/Mod

    Hi. ill help u in this. ive got no new version but with old it will do too i think: in "InCap.sqf" if (isNil {_unit getVariable "doomed"}) then {_unit setVariable ["doomed", 0, false];}; //checking if unit got any local variables, if it not, then add one if (_unit getvariable "doomed" == 0) then { //This will check if this unit got already spawn function. Cause we dont want to fire it twice or more... _doomtimer = [_unit,_anim] spawn { private ["_unit","_ls","_anim","_aCount"]; _unit = _this select 0; _anim = _this select 1; _unit setVariable ["doomed", 1, false]; //Mark the unit with this variable. then script above check for it later if something gets wrong with rescue team... _aCount = 0; while { (alive _unit) } do {_ls = lifeState _unit; if (_ls != "INCAPACITATED") exitWith {}; _unit playMove _anim; _aCount = _aCount + 1; if (_aCount == 20) then { _unit setDamage 1}; sleep ((random 4)+4); }; _unit setVariable ["doomed", 0, false]; //if unit got healed then reset variable }; }; Above there is a same function but in spawn format, cause we want to fire death timer to wounded ai unit there is more text... _arr = []; _unitdir = getDir _unit; _nearestunits = _unit nearEntities ["CAManBase", 50]; _dragger = selectRandom (_nearestunits - (playableUnits + switchableUnits + [_unit])); ///////////////////Find dragger loop//////////////////////////////////////// while {true} //We want that loop if rescue team didnt make it, unit will wait for help. do { //hint "searching dragger..."; _nearestunits = _unit nearEntities ["CAManBase", 50]; _dragger = selectRandom (_nearestunits - (playableUnits + switchableUnits + [_unit])); sleep 1; if ((alive _unit) && ((side _dragger) != civilian) && ((lifeState _dragger) != "INCAPACITATED") && (alive _dragger) && ((AnimationState _dragger) != "AcinPknlMwlkSrasWrflDb")) exitWith {}; if (!alive _unit) exitWith {}; //exit this while loop if unit has been killed }; if (!alive _unit) exitWith {}; //exit script when unit died... _hls = lifeState _dragger; //hint "dragger found"; waituntil { sleep 1; (_dragger distance _unit < 5) or !(alive _unit) or !(alive _dragger) }; if (!alive _dragger) exitWith {sleep ((random 15)+15); _null = [_unit, _anim] spawn inCap;}; //Exit script to repeat it all over again, to find another dragger if (!alive _unit) exitwith {}; if (isServer) then { _smokeColor1 = ["SmokeShellRed", "SmokeShell", "SmokeShellGreen", "SmokeShellBlue", "SmokeShellOrange" ] call BIS_fnc_selectRandom; _smoke1 = createVehicle [_smokeColor1, _unit, [], (random 6), "CAN_COLLIDE"];}; //add this AFTER waituntil loop to create smokes after dragger near unit, but u need to delete old code before waituntil loop... 160-180 string number: _animN = [ "UnconsciousReviveArms_A","UnconsciousReviveArms_B","UnconsciousReviveArms_C","UnconsciousReviveBody_A", "UnconsciousReviveBody_B","UnconsciousReviveDefault_A","UnconsciousReviveDefault_B","UnconsciousReviveHead_A", "UnconsciousReviveHead_B","UnconsciousReviveHead_C","UnconsciousReviveLegs_A","UnconsciousReviveLegs_B" ] call bis_fnc_selectRandom; _unit playMove _animN; sleep ((random 15)+15); _null = [_unit, _animN] spawn inCap; //Repeat again if dragger was killed or injured in drag action. Pay attention to _animN. in the end of script add green line if (true) exitwith {}; } else { _unit disableAI "TARGET"; _unit disableAI "AUTOTARGET"; _unit disableAI "MOVE"; _unit disableAI "TEAMSWITCH"; _unit disableAI "FSM"; _unit disableAI "AIMINGERROR"; _unit disableAI "SUPPRESSION"; _unit disableAI "COVER"; _unit disableAI "AUTOCOMBAT"; _unit disableAI "PATH"; _null = [_unit, _anim] spawn inCap; //Repeat... //This line is GREEN. or used to be. }; Thats it. Units will die after certain period of time Thanks to the spawn command, And will repeat "call" for help if something went wrong. I think it should work... EDIT: I wonder why text was not colored correctly. :( BTW: Script is working as intended on dedi server. just tested.
  5. hunter1000

    [Release] Injured Ai script/Mod

    This script is a fine written i must say, but it need some fixes. _arr = []; _nearestunits = _unit nearEntities ["Man", 25]; _dragger = selectRandom _nearestunits; if (_nearestunits isEqualTo _arr) exitwith {}; _hls = lifeState _dragger; this code with some optimized one _arr = []; _unitdir = getDir _unit; //later use _nearestunits = _unit nearEntities ["CAManBase", 25]; //CAManBase here cause on map there are some invisible "agents" _dragger = selectRandom (_nearestunits - (playableUnits + switchableUnits + [_unit])); // Exclude Players and the unit itself if (_dragger isEqualTo _arr) exitwith {}; _hls = lifeState _dragger; Also if u want AI to drag each other in cover positions use this code _coverobj = nearestTerrainObjects [_unit, ["TREE", "SMALL TREE", "BUSH", "ROCK", "WALL"], 200]; _nearestcoppos = [_coverobj, _unit] call BIS_fnc_nearestPosition; _Pos = [_nearestcoppos, 3, _unitdir + 180] call BIS_fnc_relPos; instead of this code _dis = (30 + random 20); _Pos = [_dragger, _dis, random 360] call BIS_fnc_relPos;
  6. Hi there! I wanna make a 1 trigger with zone sizes. When player1 enters the trigger area, it activates the code but just for the first time and for once. Then player2 can Activate the trigger too. How can i do that in editor? If i set trigger to Repeat state, anyone can activate it but for multiple times. thx.
  7. How about to make some script that enemy AI would search cover and run to it? I think it will be a nice script tho...
  8. _newGroup = createGroup east; _newUnit = _newGroup createUnit ['rhsgref_ins_grenadier', [583.116,4707.59,0.00143814], [], 0, 'CAN_COLLIDE']; _newUnit setSkill 0.5; _newUnit setRank 'PRIVATE'; _newUnit setFormDir 302.788; _newUnit setDir 302.788; _newUnit setPosASL [583.116,4707.59,36.8566]; _newGroup setFormation 'COLUMN'; _newGroup setCombatMode 'YELLOW'; _newGroup setBehaviour 'AWARE'; _newGroup setSpeedMode 'NORMAL'; {_x setVariable ["GAIA_ZONE_INTEND",["1", "MOVE"], false]} foreach units _newGroup; try this.
  9. thx to johnnyboy. If u need to delete ur composition later in mission, u must put it into array. But u must create invisible object for u mission or u can define global name ifor one of the objects of ur compositon. objcomp1 = [];{ if (( str typeof _x find "Land_" > -1 or str typeof _x find "object_name_starts_with_this_word_" > -1 ) and !(_x == Some_invisible_object)) then { objcomp1 pushBack _x; }; } forEach nearestObjects [Some_invisible_object, [], RADIUS]; Then u can easy delete it or move or whatever... { deleteVehicle _x; } forEach objcomp1;
  10. Need to define Z-coords from other object and add it to composition's objects: _z = getPosATL player select 2; [ ["Land_ButaneTorch_F",[0.34,0.21,0.86 + _z],357.521,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_MobilePhone_old_F",[-0.26,-0.37,0.86 + _z],174.7,1,1,[0,-0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_FilePhotos_F",[-0.5,-0,0.86 + _z],357.521,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], // and so on... // where _z is Z-coords of the spawn object... ]
  11. Hi there! i use BIS_fnc_ObjectsMapper to spawn compositions. It works fine on the flat ground. But i need to spawn objects with this function IN buildings (no matter on what floor or roof). And when i calling the function in a building 0 = [getpos player, 0, call (compile (preprocessFileLineNumbers "camp.sqf"))] call BIS_fnc_ObjectsMapper; i get next result: Example of camp.sqf: [ ["Land_ButaneTorch_F",[0.34,0.21,0.86],357.521,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_MobilePhone_old_F",[-0.26,-0.37,0.86],174.7,1,1,[0,-0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_FilePhotos_F",[-0.5,-0,0.86],357.521,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_MobilePhone_smart_F",[-0.47,-0.37,0.86],174.816,1,1,[0,-0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_MultiMeter_F",[0.42,-0.42,0.86],180.2,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_PortableLongRangeRadio_F",[-0.36,-0.53,0.86],0,1,1,[89,89],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_MetalWire_F",[0.7,0.12,0.86],96.7686,1,1,[0,-0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Suitcase_F",[-0.76,-0.43,0],81.8167,1,1,[-0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Suitcase_F",[-1.002,-0.281049,0.86],2.195,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_DrillAku_F",[1.0479,-0.104406,0.86],88.6,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Pliers_F",[199067,-0.391027,0.86],182.8,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_WoodenTable_large_F",[-1.13,-0.05,0],269.9,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_WoodenTable_large_F",[1.13,-0.06,0],269,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Ammobox_rounds_F",[1.15,0.26,0.86],88.4,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Screwdriver_V2_F",[1.21,-0.43,0.86],172.7,1,1,[0,-0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Suitcase_F",[-1.32,-0.42,0],89.1,1,1,[-0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Screwdriver_V1_F",[1.36,-0.46,0.86],185,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_DuctTape_F",[1.52,-0.24,0.86],357.521,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_MultiMeter_F",[-1.47,-0.52,0.86],180.2,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_GasCanister_F",[1.54,0.3016,0.86],215.483,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_GasCanister_F",[1.57,0.05,0.86],215.483,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Laptop_F",[-1.65,0.35,0.86],180.429,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_Wrench_F",[1.71,-0.46,0.86],215.483,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false], ["Land_SatellitePhone_F",[-1.76,-0.39,0.86],0.09,1,1,[0,0],"caseBomb_1","this addAction ['A Useless Action That Does Nothing', {}];",true,false], ["Land_GasCanister_F",[1.84086,0.0652722,0.86],215.4,1,1,[0,0],"","this setVectorUp [0,0,1]; this enableSimulation false;",true,false] ] How to solve this problem? Cause if i spawning composition on 1 floor or rooftop of the building objects always stack to the ground. thx.
  12. OMG it was so simple... THX.
  13. Hi. I wonder how to delete vehicles after spawn groups with BIS_fnc_spawnGroup? heres the script: _sGroup1 = [_Position, WEST, (configfile >> "CfgGroups" >> "West" >> "rhs_faction_usarmy_d" >> "rhs_group_nato_usarmy_d_HMMWV" >> "infantry")] call BIS_fnc_spawnGroup; {deleteVehicle _x;} foreach units _sGroup1 ; - Deletes units not vehicles in squad. Tryed to define vehicles with: _vehicle = vehicle leader _sGroup1; then delete it with: {deleteVehicle _x} forEach (crew _vehicle) + [_vehicle]; plz help.
  14. Hi! How can i turn off ACE3 for AI units? I mean, i want them to use medkits to heal eachothers. And ACE3 dont use default damage system? Cause if i shoot any unit, then hint by "getdammage" on him, hint say "unit damage is 0". can anyone help me with this? BTW modules dont turn off medical system for bots, they dont heal each others with any settings.
  15. hi! Iam using DAC on my server but after DAC init complete, there is an error: Error in expression <1",_entry] != "<null>") then { if(count _entry == 2) then { _newArray set [count> 12:42:10 Error position: <_entry == 2) then { _newArray set [count> it is from script file DAC_Write_Position.sqf here is the code private ["_oldArray","_newArray","_i","_n","_entry","_val]; _oldArray = _this;_newArray = [];_i = 0;_n = 0;_entry = [];_val = []; while {_n < count _oldArray} do { _entry = call compile (_oldArray select _n); if(format["%1",_entry] != "<null>") then { if(count _entry == 2) then { _newArray set [count _newArray,[format["%1",_entry select 0],format["%1",_entry select 1]]]; _n = _n + 1; }; }; }; _newArray did anyone encounter this problem? maybe some advices? after initialization of the DAC zone, units spawns, they just stand still and do nothing.
×