Jump to content

logan83

Member
  • Content Count

    125
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by logan83

  1. Hi guys... a stupid question... how can i put a EventHandler to All Units??
  2. Greetings harzach, i cant handle this... need extra help... i suppouse this function makes an addaction to a dead unit with info about "his pockets", bio and wallet... :( or a determinate building info... but i cant make it... i dont need mp compatible... need to run in editor and spawned units... there are something miss?? Function.sqf i extract this from DZS mission systemChat "function runing"; systemChat "Loading fn_getBuildingPositions"; fn_getBuildingPositions = { private ["_building","_positions","_i","_next"]; _building = _this; _positions = []; // search more positions _i = 1; while {_i > 0} do { _next = _building buildingPos _i; if (((_next select 0) == 0) && ((_next select 1) == 0) && ((_next select 2) == 0)) then { _i = 0; } else { _positions set [(count _positions), _next]; _i = _i + 1; }; }; // return positions _positions }; systemChat "fn_getBuildingPositions Loaded"; systemChat "Loading arrayCompare"; arrayCompare = { private ["_array1","_array2","_i","_return"]; _array1 = _this select 0; _array2 = _this select 1; _return = true; if ( (count _array1) != (count _array2) ) then { _return = false; } else { _i = 0; while {_i < (count _array1) && _return} do { if ( (typeName (_array1 select _i)) != (typeName (_array2 select _i)) ) then { _return = false; } else { if (typeName (_array1 select _i) == "ARRAY") then { if (!([_array1 select _i, _array2 select _i] call arrayCompare)) then { _return = false; }; } else { if ((_array1 select _i) != (_array2 select _i)) then { _return = false; }; }; }; _i = _i + 1; }; }; _return }; systemChat "arrayCompare Loaded"; systemChat "Loading DZS_fn_displayInfo"; DZS_fn_displayInfo = { _build = _this select 0; if (typeName _build == "STRING") then {[["User", "Usermade",(_build + ".")]] call DZS_fn_hints;} else { _buildMessage = _build getVariable "Message"; if (!isNil "_buildMessage") then { [["User", "Usermade",(_buildMessage + ".")]] call DZS_fn_hints; } else { _buildMessage = [_build] call DZS_fn_houseNotes; waitUntil {!isNil "_buildMessage"}; [["User", "Usermade",(_buildMessage + ".")]] call DZS_fn_hints; _build setVariable ["Message",_buildMessage,true]; }; }; }; systemChat "DZS_fn_displayInfo Loaded"; systemChat "Loading DZS_fn_houseInfo"; DZS_fn_houseInfo = { while {alive player} do { _builds = nearestObjects [(getpos vehicle player), ["house"], 400]; { _housePs = _x call fn_getBuildingPositions; if ((count _housePs) != 0 && !((typeOf _x) in militarylist) && (isNil {_x getVariable "Processed"})) then { _house = _x; _houseStanding = true; if (!(isNil {_house getVariable "Destroyed"})) then {_houseStanding = false} else { _houseStanding = true; }; if ((random 100) < 20 || !(_houseStanding)) then {_houseStanding = false;} else {_houseStanding = true}; if (!_houseStanding) then { _house setVariable ["Destroyed",true,true]; _house setDamage 1; _housePos = getPos _house; [_house] spawn { _house = _this select 0; _housePos = getPos _house; waitUntil {(count nearestObjects [_housePos,["Ruins_F"],50]) > 0}; _nearBuilds = nearestObjects [_housePos,["Ruins_F"],50]; _ruinBuild = _nearBuilds select 0; _ruinBuild setVariable ["Destroyed",true,true]; _house setVariable ["Destroyed",true,true]; _ruinBuild setVariable ["Processed",true, true]; //[[[_ruinBuild],DZS_fn_addAction],"BIS_fnc_call",false,true] spawn BIS_fnc_MP; }; } else { //[[[_house],DZS_fn_addAction],"BIS_fnc_call",false,true] spawn BIS_fnc_MP; if ((random 100) < chanceNumber) then { _vehPos = (getPos _house) findEmptyPosition[ 1 , 20 ,"LandVehicle"]; [_vehPos,0] call DZS_fn_vehicleSpawn; }; if ((random 100) < 90) then {_house setVariable ["Infested",true,true]}; _house setVariable ["Loot","Civilian",false]; _house setVariable ["Processed",true, true]; }; }; if (count _housePs > 2 && ((typeOf _x) in militarylist) && not (_x getVariable "Processed")) then { _house = _x; _houseStanding = true; if ((random 100) < 20) then {_house setdamage 1;_houseStanding = false;} else {_houseStanding = true}; if (!_houseStanding) then { _house setDamage 1; _housePos = getPos _house; [_house] spawn { _house = _this select 0; _housePos = getPos _house; waitUntil {(count nearestObjects [_housePos,["Ruins_F"],20]) > 0}; _nearBuilds = nearestObjects [_housePos,["Ruins_F"],50]; _ruinBuild = _nearBuilds select 0; _ruinBuild setVariable ["Destroyed",true,true]; _ruinBuild setVariable ["Processed",true, true]; }; } else { //[[[_house],DZS_fn_addAction],"BIS_fnc_call",false,true] spawn BIS_fnc_MP; if ((random 100) < chanceNumber) then { _vehPos = (getPos _house) findEmptyPosition[ 1 , 20 ,"LandVehicle"]; [_vehPos,1] call DZS_fn_vehicleSpawn; }; _house setVariable ["Infested",true,true]; _house setVariable ["Loot","Military",true]; _house setVariable ["Processed",true, true]; }; }; } forEach _builds; //[_builds] spawn DZS_fn_ZinBuildings; //[_builds] call DZS_fn_LinBuildings; _waiting = true; _Playerpos = position (vehicle player); while {_waiting} do { sleep 5; if (position vehicle player distance _Playerpos > 50) then {_waiting = false}; }; }; }; systemChat "DZS_fn_houseInfo Loaded"; systemChat "Loading DZS_fn_hints"; DZS_fn_hints = { /* File: advHint.sqf Author: Borivoj Hlava Description: Advanced hint system Parameter(s): _this select 0: Array - Array in format ["hint mainclass","hint class"] _this select 1: Number (optional) - Duration of short version of hint in seconds _this select 2: String (optional) - Condition for hiding of short version of hint _this select 3: Number (optional) - Duration of full version of hint in seconds !!!not implemented now!!! _this select 4: String (optional) - Condition for hiding of full version of hint !!!not implemented now!!! _this select 5: Bool (optional) - True shows hint even if tutorial hints are disabled via game settings !!!not implemented now!!! _this select 6: Bool (optional) - True shows directly the full hint without using of the short hint _this select 7: Bool (optional) - Show the hint in a mission only once (true) or multiple times (false) Returned value: None. Create variable BIS_fnc_advHint_hint: BIS_fnc_advHint_hint select 0: String - Class of hint BIS_fnc_advHint_hint select 1: String - Structured text of full hint BIS_fnc_advHint_hint select 2: String - Structured text of short hint BIS_fnc_advHint_hint select 3: Number - Duration of short hint in seconds BIS_fnc_advHint_hint select 4: String - Condition for hiding of short hint (default: "false") BIS_fnc_advHint_hint select 5: Number - Duration of full hint in seconds BIS_fnc_advHint_hint select 6: String - Condition for hiding of full hint (default: "false") BIS_fnc_advHint_hint select 7: Bool - True shows directly full hint (default: "false") Note: Hint must be defined in CfgHints. */ if (isTutHintsEnabled) then { if (isNil {BIS_fnc_advHint_shownList}) then {BIS_fnc_advHint_shownList = []}; _onlyOnceCheck = true; _onlyOnce = [_this,8,false] call BIS_fnc_param; //show only once or multiple times if ((count BIS_fnc_advHint_shownList) != 0) then { _class = _this select 0; { if ((_x select 1) == (_class select 1)) then { if ((_x select 0) == (_class select 0)) then { _onlyOnceCheck = false } else { BIS_fnc_advHint_shownList = BIS_fnc_advHint_shownList + [_class]; }; } else { BIS_fnc_advHint_shownList = BIS_fnc_advHint_shownList + [_class]; }; } forEach BIS_fnc_advHint_shownList; }; if (!_onlyOnce || _onlyOnceCheck) then { _this spawn { // ========== Parameters ========== _class = _this select 0; //classes, 2 requires _showT = [_this,1,15,[0]] call BIS_fnc_param; //duration of short hint _cond = [_this,2,"false",[""]] call BIS_fnc_param; //hide condition of short hint _showTF = [_this,3,35,[0]] call BIS_fnc_param; //duration of full hint _condF = [_this,4,"false",[""]] call BIS_fnc_param; //hide condition of full hint _show = [_this,5,false] call BIS_fnc_param; //show even if its disabled in options _onlyFull = [_this,6,false] call BIS_fnc_param; //show directly full hint if (_showT == 0) then {_showT = 15}; if (_cond == "") then {_cond = "false"}; if (_showTF == 0) then {_showTF = 35}; if (_condF == "") then {_condF = "false"}; // ========== Basic variables ========== _topicCfg = [["CfgHints",(_class select 0)],configfile >> "CfgHints" >> "Empty"] call bis_fnc_loadClass; _titleCfg = _topicCfg >> (_class select 1); if !(isclass _titleCfg) exitwith {["Hint 'CfgHints >> %1 >> %2' does not exist",_class select 0,_class select 1] call bis_fnc_error;}; //_topicName = getText (_topicCfg >> "displayName"); //temporary disabled _titleClass = _class select 1; _titleName = getText (_titleCfg >> "displayName"); _titleNameShort = getText (_titleCfg >> "displayNameShort"); _desc = _this select 0 select 2; _tipString = getText (_titleCfg >> "tip"); _arg = getArray (_titleCfg >> "arguments"); _image = getText (_titleCfg >> "image"); if (isNil {player getVariable "BIS_fnc_advHint_HActiveF"}) then { player setVariable ["BIS_fnc_advHint_HActiveF",""] }; if (isNil {player getVariable "BIS_fnc_advHint_HActiveS"}) then { player setVariable ["BIS_fnc_advHint_HActiveS",""] }; // Control if paramater image is used _imageVar = false; if (_image != "") then { _imageVar = true; }; // ========== Hint creation ========== // -- Info string creation and variables compilation -- _keyColor = (["GUI", "BCG_RGB"] call BIS_fnc_displayColorGet) call BIS_fnc_colorRGBtoHTML; //_elementColor = (["IGUI", "TEXT_RGB"] call BIS_fnc_displayColorGet) call BIS_fnc_colorRGBtoHTML; _infoString = _desc; // Info + arguments processing //_infoString = [_infoString] call BIS_fnc_advHintInfo; //optimalization _argArray = [_arg, _keyColor] call BIS_fnc_advHintArg; _titleName = toUpper (format ([_titleName] + _argArray)); _titleNameShort = format ([_titleNameShort] + _argArray); _infoArray = [_infoString] + _argArray; _info = format _infoArray; disableSerialization; waitUntil {!(isNull call BIS_fnc_displayMission)}; BIS_fnc_advHint_HPressed = nil; // -- Hint recalling -- if (isNil "BIS_fnc_advHint_hintRecall") then { _display = [] call BIS_fnc_displayMission; BIS_fnc_advHint_hintRecall = _display displayAddEventHandler [ "KeyDown", " _key = _this select 1; if (_key in actionkeys 'help') then { BIS_fnc_advHint_HPressed = true; [true] call BIS_fnc_AdvHintCall; true; }; " ]; }; // -- Build hint -- _textSizeSmall = 1; // derived from default hint font size 0.8; final size = (0.8 * 1) = 0.8 _textSizeNormal = 1.25; // derived from default hint font size 0.8; final size = (0.8 * 1.25) = 1.0 _invChar05 = "<img image='#(argb,8,8,3)color(0,0,0,0)' size='0.5' />"; //invisible object for small spaces _invChar02 = "<img image='#(argb,8,8,3)color(0,0,0,0)' size='0.2' />"; //invisible object for small spaces _shadowColor = "#999999"; _helpKey = ""; _helpArray = actionKeysNamesArray "help"; if (count _helpArray != 0) then { _helpKey = _helpArray select 0 } else { //wrong name of action or undefined key, actionKeysNamesArray return empty array _helpKey = localize "STR_A3_Hints_undefined" }; _keyString = format ["<t color = '%1'>[%2]</t>", _keyColor, _helpKey]; _partString = format [localize "STR_A3_Hints_recall", _keyString]; _partShortString = format [localize "STR_A3_Hints_moreinfo", _keyString]; _startPartString = ""; if (_titleNameShort == "") then { _titleNameShort = _titleName; _startPartString = ""; // from start to image } else { _startPartString = format ["<t size = '%3' align='center' color = '%5'>""%2""</t><br/>", _titleName, _titleNameShort, _textSizeNormal, _keyColor, _shadowColor]; // from start to image }; _middlePartString = format ["<t align='left' size='%2'>%1</t><br/>", _info, _textSizeSmall]; // from image to tip _endPartString = format ["%4<br/><t size = '%2' color = '%3'>%1</t>", _partString, _textSizeSmall, _shadowColor, _invChar02]; // from tip to end _tipPartString = ""; if (_tipString != "") then { //_tipString = [_tipString] call BIS_fnc_advHintInfo; //optimalization _tipArray = [_tipString] + _argArray; _tip = format _tipArray; _tipPartString = format ["<t align='left' size='%2' color='%3'>%1</t><br/>", _tip, _textSizeSmall, _shadowColor] }; _shortHint = format ["<t size = '%5' color = '%6'>%2</t>", _titleName, _partShortString, _textSizeNormal, _keyColor, _textSizeSmall, _shadowColor]; if (_imageVar) then { // hint with image if (_tipString != "") then { // hint with tip _hint = format ["%1<img image = '%5' size = '5' shadow = '0' align='center' /><br/>%2<br/>%3%4", _startPartString, _middlePartString, _tipPartString, _endPartString, _image]; BIS_fnc_advHint_hint = [_titleClass, [_titleName,_hint], [_titleNameShort,_shortHint], _showT, _cond, _showTF, _condF, _onlyFull]; } else { // hint without tip _hint = format ["%1<img image = '%4' size = '5' shadow = '0' align='center' /><br/>%2%3", _startPartString, _middlePartString, _endPartString, _image]; BIS_fnc_advHint_hint = [_titleClass, [_titleName,_hint], [_titleNameShort,_shortHint], _showT, _cond, _showTF, _condF, _onlyFull]; } } else { // hint without image if (_tipString != "") then { // hint with tip _hint = format ["%1<br/>%5<br/>%2<br/>%3%4", _startPartString, _middlePartString, _tipPartString, _endPartString, _invChar02]; BIS_fnc_advHint_hint = [_titleClass, [_titleName,_hint], [_titleNameShort,_shortHint], _showT, _cond, _showTF, _condF, _onlyFull]; } else { // hint without tip _hint = format ["%1<t size='0.05'><br/>a<br/>a<br/></t>%2%3", _startPartString, _middlePartString, _endPartString]; BIS_fnc_advHint_hint = [_titleClass, [_titleName,_hint], [_titleNameShort,_shortHint], _showT, _cond, _showTF, _condF, _onlyFull]; } }; [false] call BIS_fnc_AdvHintCall; }; }; }; }; systemChat "DZS_fn_hints Loaded"; systemChat "Loading DZS_fn_processHuman"; DZS_fn_processHuman = { _male = ["Jim","James","John","Craig","Cal","Al","Sam","Bill","Mel","Mike","Michael","Philip","Paul","Charlie","Jay","Nathan","Carter","Kent","Peter","Pete","Steve","Tom","Bob","Trent","Travis","Andrew","Andy","Dean","Carl","Carlos","Ben","Trent","Dan","Tim","Juan","Trey","Jon","Don","Ron","Aaron","Adam","Alex","Austin","Brad","Brady","Bradon","Bret","Chad","Chris","Clay","Cody","Connor","Colton","Daniel","David","Devon","Derek","Doug","Danny","Fred","Glen","Grant","Greg","Jacob","Jake","Jordan","Jared","Jason","Joe","Josh","Justin","Kyle","Luke","Lukas","Lucas","Mark","Martin","Marty","Matt","Matthew","Martin","Noah","Nick","Rixhard","Rich","Sean","Shawn","Thomas","Tylor","Tyler","Trevor","Wesley","Wes","Zach","Zach"]; _female = ["Emily","Madison","Emma","Hannah","Abigail","Olivia","Ashley","Samantha","Alexis","Sarah","Elizabeth","Elisabeth","Isabella","Alyssa","Grace","Lauren","Taylor","Jessica","Brianna","Kayla","Sophia","Anna","Natalie","Victoria","Chloe","Sydney","Jasmine","Hailey","Megan","Rachel","Morgan","Sami","Kennedy","Julia","Destiny","Ava","Jennifer","Mia","Katherine","Alexandra","Haley","Savannah","Nicole","Maria","Allison","Mackenzie","Stephanie","Brooke","Amanda","Ella","Faith","Keylee","Jenna","Andrea","Mary","Jordan","Gabrielle","Rebecca","Paige","Madeline","Kimberly","Trinity","Zoe","Michelle","Sara","Lily","Kylie","Alexa","Caroline","Vanessa","Amber","Angelina","Gabriella","Lillian","Riley","Sierra","Danielle","Leah","Jada","Autumn","Erin","Maya","Ariana","Audrey","Isabel","Sofia","Marissa","Bailey","Jacqueline","Melissa","Claire","Evelyn","Shelby","Jocelyn","Mariah","Avery","Leslie","Melanie","Arianna","Aaliyah"]; _last = ["Smith","Johnson","Williams","Jones","Brown","Davis","Miller","Wilson","Moore","Taylor","Anderson","Thomas","Jackson","White","Harris","Martin","Thompson","Garcia","Martinez","Robinson","Clark","Rodriguez","Lewis","Lee","Walker","Hall","Allen","Young","King","Wright","Hill","Scott","Green","Adams","Baker","Nelson","Carter","Mitchell","Roberts","Turner","Philips","Campbell","Parker","Evans","Edwards","Collins","Morris","Rogers","Reed","Cook","Morgan","Bell","Murphy","Bailey","Cooper","Vander Galien"]; _bio = "After digging through his pants you found his wallet and drivers license. They revealed the following info: <br/> <br/>"; _name = _male call bis_fnc_selectRandom; _name = _bio + _name; _name = _name + " " + (_last select (floor random count _last)); _locations = ["New York, New York","Chicago, Illinois","Madison, Wisconsin","Tampa Bay,Florida","Los Angeles, California","Sacramento, California","Dallas, Texas","Philadelphia, Pennsylvania","San Diego, California",["Randolph, WI","Victor, Colorado","Lola, Kansas","Chapman, Kansas","Paris, Kentucky","Great Falls, South Carolina","Spearfish, South Dakota","Pepin, Wisconsin","Souix Center, Iowa","Dyersville, Iowa","Halfway, Oregon"],["London, United Kingdom","Birmingham, United Kingdom","Leeds, United Kingdom"]]; _location = _locations select (floor random (count _locations)); while {(typeName _location) == "ARRAY"} do { _location = _location select (floor random (count _location)); }; _bio = _name + " was born in " + _location; _months = ["January","February","March","April","May","June","July","August","September","October","November","December"]; _days = 30; _month = _months call BIS_fnc_selectRandom; if (_month == "February") then {_days = 28}; _day = ceil random _days; _year = 1950 + (round random 50); if ((round random 100) < 50) then { _bio = _bio + " on " + _month + " " + (str _day) + " " + (str _year)+ ". "; } else { if ((round random 100) < 50) then { _bio = _bio + " on " + _month + " " + (str _day) + " of the year " + (str _year)+ ". ";} else { _bio = _bio + " on " + _month + " " + (str _day) + " the year of our Lord " + (str _year)+ ". "; }; }; if (_month == "July" && _day == 5 && _year == 1995) then { player sideChat "THIS PERSON'S BIRHTDAY IS THE SAME AS THE CREATOR, CRAIG VANDER GALIEN! YOU HAVE BEEN GRANTED A GIFT! Look Down!"; _invObj = "GroundWeaponHolder" createVehicle (getPos player); _invObj setDir (random 360); _invObj setPos (getPos player); _invObj addWeaponCargoGlobal ["LMG_Mk200_pointer_F",1]; _invObj addMagazineCargoGlobal ["200Rnd_65x39_cased_Box_Tracer",5]; }; _bio }; systemChat "DZS_fn_processHuman Loaded"; systemChat "Loading DZS_fn_processWallet"; DZS_fn_processWallet = { private ["_cards","_num","_ran","_toRemove","_count","_counts","_ind","_message","_cash","_runs","_bio"]; _runs = ceil (random 2); _ran = 0; _cards = []; while {_ran <= _runs} do { _num = random 100; if (_num <= 40) then { //Visa _num = random 100; if (_num <= 30) then { _cards = _cards + ["Standard Visa Card"]; }; if ((_num > 30) && (_num < 80)) then { _cards = _cards + ["Visa Rewards Card"]; }; if (_num > 80) then { _cards = _cards + ["Platinum Visa Rewards Card"]; }; }; if ((_num <=80) && (_num > 40)) then { //MasterCard _num = random 100; if (_num <= 40) then { _cards = _cards + ["Standard MasterCard"]; }; if ((_num > 40) && (_num <= 70)) then { _cards = _cards + ["Gold MasterCard"]; }; if ((_num > 70) && (_num <= 80)) then { _cards = _cards + ["Platinum MasterCard"]; }; if ((_num > 80) && (_num <= 90)) then { _cards = _cards + ["World MasterCard"]; }; if (_num > 90) then { _cards = _cards + ["World Elite MasterCard"]; }; }; if ((_num <= 90) && (_num > 80)) then { //Discover _cards = _cards + ["Discover Card"]; }; if ((_num <= 100) && (_num > 90)) then { //American Express _cards = _cards + ["American Express Card"]; }; _ran = _ran + 1; }; _toRemove = []; _counts = []; { _card = _x; if (_card in _toRemove) then {_cards = _cards - [_card]}; _count = {_card == _x} count _cards; if (_count > 1) then {_toRemove = _toRemove + [_card]}; _counts = _counts + [_count]; } forEach _cards; _message = "The following things are in his wallet:<br/>"; { _c = _x; _ind = _cards find _c; _num = _counts select _ind; if (_num > 1) then {_c = _c + "s"}; if (_num != 0)then { _message = _message + " " + (str _num) + ": " + _c+ ", <br/>"; }; } forEach _cards; _num = random 100; if (_num <= 50) then {_cash = round random 50}; if (_num > 50 && _num <= 75) then {_cash = ((round random 50) + 50)}; if (_num > 75 && _num <= 10) then {_cash = ((round random 100) + 100)}; if (_num > 99) then {_cash = ((round random 500) + 500)}; if (_num > 85 && _num <= 99) then {_cash = 0}; if (isNil "_cash") then {_cash = round random 50}; _message = _message + " and $" + (str _cash) + " in cash."; if ((random 100) < 80) then { _pocket = [" right "," left "," back left ", " back right "] call BIS_fnc_selectRandom; _state = [" brand new "," slightly used "," worn out "," well kept "] call BIS_fnc_selectRandom; _phone = ["Galaxy S4","Galaxy S3","Galaxy S2","Motorola X","Nexus 4","LG Optimus","Droid Maxx","HTC One","iPhone 4S","iPhone 5","Galaxy Note 2","Galaxy Note","iPhonen 4"] call BIS_fnc_selectRandom; _message = _message + "<br/>Also within his" + _pocket + "pocket he has a" + _state + _phone; /*if (random 100 < 30) then { _message = _message + ". Despite its waning battery power you decide to check out his recent messages. They were to a man by the same last name. <br/> <br/>"; _texts = ["Dude this shit is getting crazy, alright if I get out of town and head over to your house? You basically have an arsenal of weapons...","Hey! get over here, a military truck crashed outside, and we took their weapons"]; _text = _texts call BIS_fnc_selectRandom; if (_text == _texts select 0) then { }; };*/ }; _bio = [] call DZS_fn_processHuman; _message = _bio + " "+ _message; parseText _message; _message }; systemChat "DZS_fn_processWallet Loaded"; systemChat "Loading DZS_fn_onDeath"; DZS_fn_onDeath = { private ["_h","_unit","_message"]; _unit = _this select 0; _h=getPosATL _unit nearObjects ["logic",0.1]; if (count _h>0) then {deleteVehicle (_h select 0)}; _message = [] call DZS_fn_processWallet; _unit setVariable ["Message", _message, true]; [[[0,_unit],DZS_fn_addAction],"BIS_fnc_call",false,true] spawn BIS_fnc_MP; sleep 300; hideBody _unit; sleep 10; deleteVehicle _unit; }; systemChat "DZS_fn_onDeath Loaded"; systemChat "Loading DZS_fn_houseNotes"; DZS_fn_houseNotes = { _build = _this select 0; _Fight = [["There are signs of a battle","Bullet holes are scattered across the wall","The door has been destroyed by what looks like a battering ram","Windows have bullet holes in them","The door lock has been shot","Empty shell casings litter the inside near the windows","Bandages litter the floor inside"],["The house has been destroyed by explosives","Most of the structure has been annihilated","Battle damage has destroyed this building","Building destroyed in an attempt to stop apocalypse"]]; _Fire = [["There are signs of a fire","There are scorch marks above the windows","The wallpaper has been burned to a crisp","The walls have been burned"],["Half the building was destroyed by fire","The building has collapsed by what looks like fire","This building has burned down","Nobody was around to put out the fire"]]; _Age = [["The roof is caving in","The paint has completely fallen off","Siding has fallen off","Rain has damaged the inside of the building","There are plants growing inside"],["Rain damage and general age has collapsed the building","Some buildings just can't handle the apocalypse"]]; _Defense = [["There is a barricade in front of the door","The windows are boarded","Metal bars cover the windows","This building has been barricaded like a prison","There are remains of a machine gun nest on the roof","A firing port is in every window","Craters from exploded mines litter the ground around the building"],[]]; _Occupied = [["There are empty cans of food everywhere inside","A latrine is set up in the back","Solar panels are on the roof","Many pots and pans are on the roof","Empty boxes of cereal are inside"],[]]; _mMessages = ["This building was just another cog in the military machine","This building was merely another cog in the military machine","Weapons were stored here during the outbreak, but they've undoubtedly been stolen, or have they?","Someone held out here","Someone held out in this building","The soldiers in here fought well, but now they have become the enemy"]; _m1 = [_Fight,_Fire,_Age,_Defense,_Occupied]; _m1 = _m1 call BIS_fnc_selectRandom; _m1 = _m1 select 0; _m1 = _m1 call BIS_fnc_selectRandom; _m1 }; systemChat "DZS_fn_houseNotes LOADED"; systemChat "Loading DZS_fn_addAction"; DZS_fn_addAction = { _ruinBuild = _this select 0; if (_ruinBuild == 0) then { (_this select 1) addAction ["Investigate Body",{[_this select 0] call DZS_fn_displayInfo}]; } else { _ruinBuild addAction ["Analyze building",{[_this select 0] call DZS_fn_displayInfo}]; }; }; systemChat "DZS_fn_addAction Loaded"; fnDone = true; i let you the orignal file if can help... And here the original mision https://steamcommunity.com/sharedfiles/filedetails/changelog/176185661
  3. yes, many spawns after init... nopes dont use cba
  4. logan83

    Zombies & Demons 5.0

    hi dudes! to the mod developers, actually, forceadduniform option its breaking the revived zombies movement, Can this problem be fixed? i love that option, its a ggo inmersive point!
  5. logan83

    Zombies & Demons 5.0

    its really strange, its a old scenario campaing, it was working before Jets release, its a sp campaign, im testing it in a clean map and the problem persist... no mods / scripts variations, and are only a few zombies, inclusive with one...
  6. logan83

    Zombies & Demons 5.0

    ok right now, walkers, slow, medium or fast, when resurrected, dont walk... :(
  7. logan83

    Zombies & Demons 5.0

    Uhm, after the Arma last update, wen a IA has infected and revived as Zombie Walker, lose the ability to move, somebody have the same problem? To reproduce the "bug" place an infection module and set the chance to 100%, place resurrection module too and place a unit called unit1 and in his init put if (unit1 getvariable ["ryanzombiesinfected",0] == 0) then {[unit1, EAST] execVM "\ryanzombies\infected.sqf";}; sleep 0.5; unit1 setVariable ["ryanzombiesinfected",0.9,true]; wait to the zombification, and the resurrected zombie cant walk... :(
  8. Nopes, dont work, i try this when update, but the poseidon icon dosnt appear, then i give the path to the poseidon exe, and dont work... uhm, what values have to change in regedit to do this?
  9. y try to do this and dont work... Soldier attachto [Table, [0,0,0]]; soldier setdir 180; the soldier is attached to the table... but i can rotate the soldier :| Ok forget... the soldier is named as local variable... sorry...
  10. logan83

    MILES system

    ok i used the eh handledamage like this: _MilUnit = _this select 0; _MilUnit setVariable ["selections", []]; _MilUnit setVariable ["gethit", []]; _MilUnit addEventHandler ["HandleDamage", { _unit = _this select 0; _unit disableai "Anim"; _unit disableAI "Move"; _unit disableAI "AutoTarget"; if (animationState _unit != "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon") then { _unit switchMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"}; _selections = _unit getVariable ["selections", []]; _gethit = _unit getVariable ["gethit", []]; _selection = _this select 1; if !(_selection in _selections) then { _selections set [count _selections, _selection]; _gethit set [count _gethit, 0]; }; _i = _selections find _selection; _olddamage = _gethit select _i; _damage = _olddamage + ((_this select 2) - _olddamage) * 0; _gethit set [_i, _damage]; _damage; }]; _index = _MilUnit getVariable ["selections", []] find "nameofselection"; _damage = if (_index >= 0) then { _MilUnit getVariable "gethit" select _index; }else{ 0; }; And work like a charm, thank u pierremgi
  11. Hi guys, im trying to simulate a miles (Multiple Integrated Laser Engagement System) exercise but im having some troubles, i'm using a eventhandler "HIT" to execute the effects, like this: { if ((side _x) == Independent) then { _x addEventHandler ["HIT",{ _this select 0 setCaptive true; _this select 0 setdamage 0; _this select 0 disableai "Anim"; _this select 0 disableAI "Move"; _this select 0 disableAI "AutoTarget"; _this select 0 switchMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"; }]; }; } forEach allUnits; well, if i shoot a independent unit to a leg, to a arm or even in the kevlar vest at distance, work well, the unit will stop, put his hands behind the head and the blufor IA´s stop shooting them, but, if i shoot to the units at the head, well, they simply dies, the same if i shoot to the chest in close combat... if i put the units in allowdamage false, the eventhandler "HIT" dont work... somebody knows how can i solve this? thank for all and sorry about my poor english :(
  12. logan83

    MILES system

    Thanks pierremgi, I never use this EH, im try it and see how it work, ;)
  13. I have been using poseidon for some time, I have not updated it, and now that I have it in the latest version, I can not predefine poseidon as the program to open the sqf, ext, .hhp etc and I have to open owned, and open the filesFrom the menu. Install it by copying and pasting the folder.How can I predefined pose as the program to open those files?
  14. Hi Guys! I'm stuck on one of those things that look easy, but then they are not. Im going to explain my self... I Have two arrays _ArrayA = [1,2,3]; _ArrayB = [2,1,0]; If I try to add them together, I get: _ArrayC = _ArrayA + _ArrayB; hint str _arrayc; _ArrayC returned [1,2,3,2,1,0], oks my question Now... How can i add each value to get [3,3,3] not [1,2,3,2,1,0]. Im sorry but my english not good enought. :(
  15. logan83

    Operating with Arrays

    yea i forget... too many hours... im having a breack now watching VIKINGs xD need to refresh my mind, thank u saro.
  16. logan83

    Operating with Arrays

    // null = [player,1,Tresure,RescuePlane] execVm "scripts\location.sqf"; _unit = _this select 0; _UnitPos = _this select 1; _load = _this select 2; _Plane = _this select 3; if (_UnitPos == 1) then {_OffsetPos = [1,3.18,1.16594]}; if (_UnitPos == 2) then {_OffsetPos = [.8,4.97,1.16594]}; _unit setpos (_Plane modelToWorld _OffsetPos); my mind blowup, this returnme _OffsetPos not defined... im let this for today :(
  17. logan83

    Operating with Arrays

    I feel very stupid right now... better take a break, my head its burning xDD thanks a lot sarogahtyp.
  18. logan83

    Operating with Arrays

    ok i trying to set objets positions relative to a another Object position, i cant use attachto or something, and the base object has a random start. Sorry about my english i cant explain myself better :(
  19. logan83

    Operating with Arrays

    uhm, another question, how can i make this cleaner? _unitpos = this select 0; _DropPos = []; if (_UnitPos == 1) then {_DropPos pushBack .8; _DropPos pushBack 3.18; _DropPos pushBack 1.16594}; Cause if i use: if (_UnitPos == 1) then {_HaloPos pushBack [.8,3.18,1.16594]}; _HaloPos returns [[0.8,3.18,1.16594]] instead of [0.8,3.18,1.16594]... Sorry about the stupid questions but im newbie :(
  20. logan83

    Operating with Arrays

    Great! Thanks to you both guys!! You'res my heroes!
  21. logan83

    Zombies & Demons 5.0

    Hi dude, in older versions i see a option in the modules, but cant see the option now... maybe removed?
  22. logan83

    Zombies & Demons 5.0

    youre the boss!
  23. logan83

    Zombies & Demons 5.0

    Thanks so much!!
  24. logan83

    Zombies & Demons 5.0

    Thanks ryandombrowsky but, i have to explain my self better :), in the mission, im doing scene, where meet with your friend, but he is in the floor, he has bitten but still as a human you help him and in a exact moment he become in a zombie, need to be a transformation (need to be the same guy with the same clothes and inventory), thank you again for answe the question. :)
  25. logan83

    Zombies & Demons 5.0

    I love this mod, actually i want to infect a alive civilian via script, to simulate a bitten guy has tranformed, but i havent idea how can do this thing, can anyone help? Sorry about my english :(
×