-
Content Count
930 -
Joined
-
Last visited
-
Medals
Posts posted by mikey74
-
-
Try this. Place a trigger. lol It'll be easier just to look at my mission. This Arty script will work with most if not all artillery.
https://www.dropbox.com/s/68atxkce1t51635/annihilate.Stratis.rar?dl=0
-
1
-
-
Congrats on your release and I love your steam page script!!!! lol!!!
-
1
-
-
This is pretty good my man! Congrats on the release. 🙂
-
1
-
-
26 minutes ago, mickeymen said:Right! This happens too often. In addition, the AI will not always move with this kind of animation. A roll-animation without moving to the side looks unnatural
In my opinion. As it was during the FOA days. Dodging animation's should be a rarity. BUT Not everyone is of the same opinion. This is why I suggested maybe adding a random percentage option in the addon options. 🙂 So if the player loves it. Should be anywhere between 75% to 100%, or someone like me it should be 10% to 25% of the likelihood a unit will use a dodge animation.
-
4
-
-
@mickeymen I wasn't referring to the animation. ;) I was referring to how often they spin on the ground per bullet impact nearby. 🙂
-
I was wondering is there a way to tone down the AI rolling around like toddlers high on candy??? <---- I found it. lol I forgot you can configure certain mods in options. That said. Could you add a chance option of them rolling? IN FOA I randomized it a bit so they didn't roll evetime the hitnear triggered. I think it ended up around %25 of the time I would trigger it. If you can add that option. That would be pretty great. 😉
Your turret mod, and suppression mod totally complements my pinned mod. But Danger and Pinned together. lol The AI looks very silly when they are pinned for long periods of time because of the constant rolling.
-
2
-
-
On 9/10/2021 at 2:30 AM, LordJarhead said:It is sometimes hard to stay on road with all the content, like main, DLC, CDLC, all the most used mods. And I end up going always the same road - I start with the main game and think "I need to cover the DLC as well, and the mods... oh maybe the CDLCs, too?" and it ends up being a giant project pretty fast. So, I’d like to go a different approach maybe.
Now that Prairie Fire got released, I got some more free time lately. Maybe I can dig back into it and get some of that lost realistic approach back into it.
My personal problem is digging back into the situation in and around JSRS and how it’s currently working. At this point, making a new sound mod from scratch is far more simple, and less time consuming. The base mod is always the same and fairly simple to set up.Maybe you guys have some wishes that we could focus on and have another JSRS beta going that we can experiment with.
Thanks,
LJ
I definitely feel you. FOA/AISS are no where near as big as JSRS sound mod. I can tell you. I get burned out just thinking of pulling that old mod apart and making it work again. So, I started over with a very simple mod called pinned. Over time this may grow to be as big as My other mods. But I kind of like the ole motto Keep it simple stupid. Start small and slow. Take your time so you can enjoy it. Modding shouldn't be boring work. As we all do this because we enjoy it. So lets try to stay focused on the enjoying part. 😉 Other wise we will suffer the effects of our old pal burn out. 😄 Anyways incase you cant noticed. I'm excited to see you're back. 😉
-
@foxhound This sucks, but is understandable. BIS and its community owes you a debt of gratitude. Thanks for All you did sense 2006! If it weren't for you and supporting the modding community. Honestly doubt I would have made it past OFPCWC. Thanks 🙂
-
4
-
-
I don't know what changed, but why is it so hard to find my son on Arma servers to play prairie fire?????? Used to be easy. Whats changed? We have the same mods. We name our servers a unique name, but never show up anywhere. What gives??? Thanks in advance.
-
In reference to the 1st part of your video. Where you were firing fairly close without a suppressor and the AI was standing around waiting to be hit. I used this in FOA/AISS
Spoilerif (FOA_AI_Enhancments isEqualTo 0) exitWith {}; //!((group _unitA) in FOA_Ex_Groups) private ["_shooter","_S_pos"]; _shooter = vehicle _this;//(_this select 0); sleep .001; if (!alive _shooter) exitWith {}; if ((group _shooter) in FOA_Ex_Groups) exitWith {}; // _dubSuppressing = _shooter getVariable "lastSuppressing"; if (isnil ("_dubSuppressing")) then {_shooter setVariable ["lastSuppressing",time + (6 + random 10)]}; //change to -1000 _dubSuppressing = _shooter getVariable "lastSuppressing"; if (_dubSuppressing < time) then //at least 7 seconds from last holler { if (isPlayer _shooter) then {} else { if (count units (group _shooter) > 1) then {//holler out if (7 > random 100) then {[_shooter,8] call FOA_fnc_FOAVO}; }; }; _shooter setVariable ["lastSuppressing",time + (8 + random 16)]; }; _S_pos = getPosATL _shooter; //if ((random 1.5) > (skill _Shooter)) then { Private ["_weapon","_supr"]; _weapon = weaponsItems _shooter; _supr = ((_weapon select 0) select 1); if (isNil "_supr") then {_supr = "";}; sleep .05; if (_supr isEqualTo "") then { private "_shot_distance"; _shot_distance = if (!isNil "FOA_Shot_dis") then {FOA_Shot_dis} else {1000}; _men_close_NSUP = _S_pos nearEntities [["CAManBase","LandVehicle"], _shot_distance];//nearestObjects [_shooter, ["CAManBase","Vehicle"], _shot_distance]; sleep random .05; if (count _men_close_NSUP >= 1 and alive _Shooter) then { { _veh = vehicle _x; _veh setVariable ["Shot_Near",[], true]; _sk = if ((skill _veh) == 0) then {.1} else {(skill _veh)}; _ds = if ((_veh distance _Shooter) < 100) then {100} else {(_veh distance _Shooter)}; if (_sk == 0) then {_sk = .1}; if (_ds == 0) then {_ds = 100}; if (alive _veh and (group _veh) knowsAbout _Shooter < (_sk / _ds * .001) and !((group _x) in FOA_Ex_Groups)) then { (group _veh) reveal [_Shooter, _sk / _ds * .001]; }; } forEach _men_close_NSUP; }; } else { private "_shot_distance"; _shot_distance = if (!isNil "FOA_Shot_dis_sup") then {FOA_Shot_dis_sup} else {100}; _men_close_S = _S_pos nearEntities [["CAManBase","LandVehicle"], _shot_distance];// nearestObjects [_shooter, ["CAManBase","Vehicle"], FOA_Shot_dis_sup]; sleep random 1; if (count _men_close_S >= 1 and alive _Shooter) then { { _vehs = vehicle _x; _vehs setVariable ["Shot_Near",[], true]; _sk = if ((skill _vehs) == 0) then {.1} else {(skill _vehs)}; _ds = if ((_vehs distance _Shooter) < 100) then {100} else {(_vehs distance _Shooter)}; if (_sk == 0) then {_sk = .1}; if (_ds == 0) then {_ds = 100}; if (alive _vehs and (group _vehs) knowsAbout _Shooter < (_sk / _ds * .0001) and !((group _x) in FOA_Ex_Groups)) then { (group _vehs) reveal [_Shooter, _sk / _ds * .0001]; }; } ForEach _men_close_S; }; }; true
I inserted this in the config using CBA_shot Event Handler. There are a ton of variables in there to which I dont recal why I used them on some of them.
As to the stealth aspect. yeh lol You'd have to use a lot of forget targets. 🙂
-
1
-
-
This has been updated https://steamcommunity.com/sharedfiles/filedetails/?id=2431971204
I've been asked to re-upload Throw able satchel. I redid the effects, and sounds. Got rid of the cluster grenade as it will need work. You will find a Demolition Specialist under NATO Men. The class name is B_Soldier_Demo_F who carries the throw able demo. YES AI will use this, but 70% of the time foolishly! The satchel is found in Arsenal under the name Throwable Satchel Charge. The class name is Demo_AMMO. Just put the backpack on character and start. The arming switch will automatically be added.
-
2
-
-
Thanks for the info. Your tops as usual. Boy that really looks intimidating! lol
-
1
-
-
On 7/27/2015 at 2:33 PM, thelegendarykhan said:Very handy scripts indeed. However, mikey, I am trying to achieve a wasteland like mission in SP. So:
1. When the Ai and even my player unit if killed, the script should scan the entire map and then randomly choose a cover point far off. To maintain the Search and Destroy element. Can you please send me the edited script for this?
2. If I use your markername approach to determine more than one respawn location, how do you put the array of different markernames in unit init so that a random spot is chosen? take for instance markers named "m1" and "m2". I tried altering your init script but to no avail.
Thank you.^^
Wow sorry man I must have missed this. I've forgotten about this script...… That said. I've edited it that may be what youre looking for if youre still looking.... Here are my edits. Got a sample mission https://steamcommunity.com/sharedfiles/filedetails/?id=1965523583
MikesSP_Respawn.sqf
Spoiler/* Instructions Call this in units init, groups init, trigger, or init.sqf so long as you have unit defined right! :P Rsp = [Unitsname,3,7, markername or object] execVM "MikesSP_Respawn.sqf"; Unitsname = unit you want to respawn 3 = how many times to respawn 7 = delay in respawn.... 5 is the least you can go it defaults to 5 seconds do to my cheasy effects. "markername" OBJECTNAME OR LEAVE BLANK = name of marker or object you put on map. or just use an Objects name without quotes. or leave blank. ***(THIS IS OPTINAL)*** example: .. unit init Rsp = [this,3,7,"markername"] execVM "MikesSP_Respawn.sqf"; .. groups init {Rsp = [_x,14,5] execVM "MikesSP_Respawn.sqf";} forEach (units this); <---- POSITION IS NOT NEEDED IF YOU WANT TO GO RANDOM ..... init.sqf if you want all Units {Rsp = [_x,30,15, MAYBE_A_SECTORS_NAME_OBJECTSNAME_MARKERSNAME_TRIGGERSNAME.....] execVM "MikesSP_Respawn.sqf";} forEach AllUnits */ if (!isDedicated && (player != player)) then { waitUntil {player == player}; waitUntil {time > 3}; }; private ["_dplayer","_type","_group","_times","_delay","_respPos"]; _dplayer = _this select 0; _dplayer setVariable ["MYloadout", (getUnitLoadout [_dplayer, true]), true]; _times = (_dplayer getVariable "times"); _dplayer setVariable ["Respawnplace1", (_this select 3), true]; if (isNil "_times") then {_times = _this select 1}; if (isNil "_times") then {_times = 3}; _delay = _this select 2; if (isNil "_delay") then {_delay = 5}; _type = typeOf _dplayer; _group = group _dplayer; _isLeader = (_dplayer getVariable "isLeader"); if (isNil "_isLeader") then {_isLeader = (_dplayer == (leader _group));}; _dplayer setVariable ["isLeader", _isLeader, true]; _dplayer setVariable ["times", _times, true]; _dplayer setVariable ["delayS", _delay, true]; Mis_respawn = { _dplayer = _this select 0; _isLeader = _this select 4; _killer = _this select 5; _respawn = (_dplayer getVariable "Respawnplace1"); _respPos = _respawn; if !(isNil "_respPos") then { if (typeName _respPos == "STRING") then {_respPos = getMarkerPos _respawn} else {_respPos = getPos _respawn}; } else { _distance = if ((_dplayer distance _killer) < 100) then {100} else {(_dplayer distance _killer)}; if (_distance > 200) then {_distance = 200}; _OtherUnit = if ({alive _x} count (units (group _dplayer)) >= 1) then { selectRandom (units (group _dplayer)) } else { _ortypos = _dplayer getPos [_distance,(_killer getDir _dplayer)]; [[[_ortypos, _distance]],["water"]] call BIS_fnc_randomPos; }; _trypos = _OtherUnit getPos [_distance,(_killer getDir _OtherUnit)]; _respPos1 = selectRandom ([_dplayer,_trypos] call compile preprocessFileLineNumbers "FOA_find_cover.sqf"); _respPos = if (isNil "_respPos1") then { _ortypos = _dplayer getPos [_distance,(_killer getDir _dplayer)]; [[[_ortypos, _distance]],["water"]] call BIS_fnc_randomPos; } else {_respPos1}; }; _dplayer setVariable ["Respawnplace", _respPos, true]; _dplayer setVariable ["isSPlayer", isPlayer _dplayer, true]; _Tgroup = createGroup Civilian; _temp = _Tgroup createUnit ["C_man_polo_6_F", getPos (_this select 0), [], 0, "NONE"]; _temp allowDammage false; hideObject _temp; addSwitchableUnit _temp; temp setpos _respawnplace; _temp enableSimulation false; if (_dplayer getVariable "isSPlayer") then { selectPlayer _temp; cutText ["Respawning","BLACK IN",3.5]; RSP_hndl = ppEffectCreate ["colorCorrections", 1501]; RSP_hndl ppEffectEnable true; RSP_hndl ppEffectAdjust [0, 0, 0, [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]]; RSP_hndl ppEffectCommit 0; 0 fadeSound 0; 0 fadeRadio 0; 0 fadeSpeech 0; }; [_this select 0,_this select 1,_this select 2,_temp,_respPos,_respawn,_isLeader] spawn { params ["_dplayer","_type","_group","_temp","_respawnplace","_Respawn","_isLeader"]; [_dplayer] joinsilent grpNull; _delay = (_dplayer getVariable "delayS"); if (_delay < 5) then {_delay = 5}; _time = time + _delay; _times = (_dplayer getVariable "times"); _isplayer = (_dplayer getVariable "isSPlayer"); _isLeader = (_dplayer getVariable "isLeader"); if (_times == 0) exitWith { if (_isplayer) then {["epicFail",false,1] call BIS_fnc_endMission;} else {deleteVehicle _temp;}; }; if (isNil "_delay") then {_delay = time + 5;}; if (_isplayer) then {waitUntil {player == _temp};}; private "_player"; _player = _group createUnit [_type, (_dplayer getVariable "Respawnplace"), [], 0, "NONE"]; _player hideObject true; _player setVariable ["delayS", _delay, true]; _player setVariable ["delayT", _time, true]; _player setVariable ["times",_times - 1, true]; _player setVariable ["isSPlayer", _isplayer, true]; _player setVariable ["Respawnplace", _respawnplace, true]; _player allowDamage false; addSwitchableUnit _player; _player setUnconscious true; sleep (_delay); _player setUnitLoadout [(_dplayer getVariable "MYloadout"), true]; reload _player; _player allowDamage true; if (_isplayer) then {selectPlayer _player;waitUntil {player == _player};}; if (_isLeader) then { _player setVariable ["isLeader", _isLeader, true]; [_group,_player] spawn { params ["_group", "_player"]; [_player] joinsilent _group; _timer = time + ((_player distance (leader _group))/2); waitUntil {_player distance (leader _group) <= 15 || !alive _player || _timer <= time}; if (alive _player) then {_group selectLeader _player;}; }; }; deleteVehicle _temp; if (_this select 0 getVariable "isSPlayer") then { _lay1 = cutText ["gaining conscious", "BLACK IN", 15, true, false]; 25 fadeSound 1; 25 fadeRadio 1; 25 fadeSpeech 1; }; _player setUnconscious false; _player hideObject false; _respPos = nil; if (_isplayer) then {ppEffectDestroy RSP_hndl;}; [_player,(_player getVariable "times"),(_player getVariable "delayS"),(_dplayer getVariable "Respawnplace1")] execVM "MikesSP_Respawn.sqf"; }; true }; _dplayer removeAllEventHandlers "killed"; _dplayer addEventHandler ["killed", {[_this select 0,typeOf (_this select 0),group (_this select 0),_respawn,(_dplayer getVariable "isLeader"),(vehicle(_this select 1))] call Mis_respawn}];
FOA_find_cover.sqf
Spoiler/* File: FOA_find_cover.sqf Author: Mikey74 Description: Function to find good cover positions exluding insects,footprints,men,feathers,pavement, leaflets, and roads. Yes nearestObjects will get those! Parameter(s): _this select 0: unit called for Note: you need a unit _this select 1: seperate position or unit needed if you dont want to search around units position. Use a position or another unit or vehicle. Note: you need a position or a unit this is optional Returns: Array of positions around objects near unit or position thats called the script. How to call: example 1: _cover_positions = [player, getPos nameoftarget(optional)] execVM "FOA_find_cover.sqf"; //if you put this in a sqf file. example 2: _cover_positions = [player, getPos nameoftarget(optional)] spawn FOA_find_cover; //if already precompile or your using FOA. TODO: add building positions. Should be easy enough. */ private ["_obj_positions","_unitpos","_pos","_towns"]; _obj_positions = []; _unit = _this select 0; _pos = _this select 1; if (isNil "_pos") then {_pos = getPos _unit};/// lets make sure we have some kind of position here. if (typeName _pos != "ARRAY") then {_pos = getPos _pos};/// lets make sure _pos is really a position. if not you will get an error or it just wont work. _radius = count units group _unit * 21;/// lets set a radius based on group size. _towns = nearestLocations [_pos, ["NameVillage","NameCity","NameCityCapital"], 200]; // finding towns close by if (count _towns > 0) then {_radius = count units group _unit * 7};/// you want a smaller radius for towns. ;) if (_radius < 21) then {_radius = 21};// minimum 21 _Roads = _unit nearRoads _radius;// find roads near _unit //_c = 0; { if ( !(_x iskindof "Insect") and // lets not use bugs for cover Animals !(_x iskindof "Animals") and // lets not use Animals for cover !(_x iskindof "Man") and // nor live men !(_x iskindof "EmptyDetector") and // nor triggers !((str _x) find "NOID " > -1) and //nor footprints or anything without an ID !((str _x) find ": cl_" > -1) and // nor any type of freather or leaves !((str _x) find ": pavement_" > -1) and // get rid of pavement type's !((str _x) find ": garbage_" > -1) and // cant hind behind leaflets on ground !(_x in _Roads) ) then { /// oh yeh lets not forget to exclude roads //_c = _c + 1; private "_obj"; _obj = _x; if (_obj isKindOf "Building") then { _posarray = [_obj] call BIS_fnc_buildingPositions; _obj_positions append _posarray } else { { _CPos = ((getPos _Obj) findEmptyPosition [0,3]); if (count _CPos == 3) then { _obj_positions pushBack _CPos; //_n = "Sign_Arrow_Large_Green_F" createVehicle _CPos; }; } forEach units group _unit; }; }; } forEach ((nearestTerrainObjects [_pos, ["bush","tree","wall","rock","SmallTree","Building","House","Church","Chapel","Bunker","Fortress","Fountain", "View-Tower","Lighthouse","Quay","Fuelstation","Hospital","Wall","Hide","BusStop","Transmitter", "Stack", "Ruin", "Watertower","Rocks"], _radius]) + (nearestObjects [_pos, ["Wreck","LANDVEHICLE"], _radius]));//nearestObjects [_pos, [], _radius]; /*{ _n = "Sign_Arrow_Large_Green_F" createVehicle _x; } forEach _obj_positions;*/ _obj_positions;
https://www.youtube.com/watch?v=42qCaSH_FsI
Enjoy
-
1
-
-
On 12/12/2019 at 5:02 PM, tpM said:Tell me guys what to do you think about this new Carbine sound:
Do you think it is an improvement over the old one?
I like it. IMO most rifle sounds even in the best of mods are a bit weak. Very few of them have the punch like a real rifle sound. Granted we'll never get that. But lol few of them had that punch then weakened them later. idk why.
-
Yeh I have it set in a while loop with a few waitUntils. It did flash gunner view once or twice this last test.
Kind of figured there wasn't an easy way to control a players aim by script. lol
Thanks what I have works. Just need to polish it a bit.
Thanks again. 🙂
-
Thanks KillZone_Kid,
I tried that one. When I displayed a hint while zoomed or not it always said internal view. BTW there is no way to script in a lock on FOV is there?
Thanks again KZ You're probably the best coder and I've learned a lot from your site and you throughout the years in the OFP/Arma verse. I grovel at your feet. lol seriously kid your a hero. 😉
-
-
I've got a script I'm working on based a tad bit on dead eye in Red Dead 2. This is not for realism by the way! 😄 I was wondering if there is a way to set players aim more accurately. Like a random head, torso, arms, legs. But so far I've not found a way to set players aim very accurately. It only does it when you zoom. To me zoom in Arma is unrealistic anyways. lol Why not give an edge up. Click the spoiler to see the script.
Spoilermh_standerd_view = getObjectFOV player; While {alive player} do { waitUntil {(getObjectFOV player) < mh_standerd_view}; hint format ["Standerd View) %1\n Actual view) %2\n Target %3\n distance) %4",mh_standerd_view, (getObjectFOV player), cursorTarget, (player distance cursorTarget)]; //player camSetFov 0.75; sleep 20; waitUntil {(getObjectFOV player) >= mh_standerd_view || (((vehicle cursorTarget) isKindOf "AllVehicles") && (alive (vehicle cursorTarget)))}; _Target = if ((vehicle cursorTarget) isKindOf "AllVehicles") then {(vehicle cursorTarget)} else {player}; if ((getObjectFOV player) < mh_standerd_view) then { _Cpos = getPos cursorTarget; _pos = [(_Cpos select 0),(_Cpos select 1),0.1]; if (str _Cpos =="[0,0,0]") then {} else { _dis_mult = switch (true) do { case ((player distance cursorTarget) < 35): {0.5}; case ((player distance cursorTarget) > 35 && (player distance cursorTarget) < 50): {0.4}; case ((player distance cursorTarget) > 50 && (player distance cursorTarget) < 65): {0.3}; case ((player distance cursorTarget) > 65 && (player distance cursorTarget) < 80): {0.2}; case ((player distance cursorTarget) > 100): {0.05}; }; _timer = time + .35; while {_timer > time} do { Player setDir ((player getDir _pos)- _dis_mult);//(player getDir _pos);//((player getDir _pos)-0.5);// hint format ["Standerd View) %1 Actual view) %2 distance %3", mh_standerd_view, (getObjectFOV player), (player distance cursorTarget)]; } }; }; _sleep = switch (true) do { case ((player distance cursorTarget) < 35): {0.25}; case ((player distance cursorTarget) > 35 && (player distance cursorTarget) < 50): {0.5}; case ((player distance cursorTarget) > 50 && (player distance cursorTarget) < 65): {1}; case ((player distance cursorTarget) > 65 && (player distance cursorTarget) < 80): {2}; case ((player distance cursorTarget) > 100): {3}; }; //sleep _sleep; if (speed _target > 0 && _target != player) then { waitUntil {(getObjectFOV player) >= mh_standerd_view || !(alive (vehicle cursorTarget))};// || ((vehicle cursorTarget)) != _Target} sleep _sleep + (speed _target);// + 2; } else { waitUntil {(getObjectFOV player) >= mh_standerd_view || (str (vehicle cursorTarget)) == "<NULL-object>" || !(alive (vehicle cursorTarget)) || ((vehicle cursorTarget)) != _Target}; sleep _sleep; }; }
Thanks in advanced.
-
2
-
-
@nkenny yes it does do some anims. its based on morale of units within a certain range and distance. If it gets to low. They drop their weapons and surrender at this point.
update: Had another mod running I over looked that does effect AI.
Thanks for the compliment. 🙂
-
@nkenny No ACE. Just your mod, a few islands, unit mods like CUP, JSRS, CBA, and my surrender script. 🙂 Thanks for the reply.
-
mkenny. Looks very well done congrats! Just one question/ Is there anyway to turn it off for certain units. Example. I have a surrender script running, when I see the morale of certain groups break, and they go to surrender when vastly outgunned and pretty much no hope. They start to drop their weapons, buttt lol they go into what looks like a healing animation state and then pick back up there weapons and go back to fighting. Yes Its your mod. 😉 With AISS and FOA I put in a setvariable so that mission makers can turn off the AI scripts when needed. I was wondering if you have added something like this into LAMBS Improved Danger.fsm? Other than that. The AI look and respond very well. 🙂
-
On 6/10/2019 at 9:11 PM, XOSPECTRE said:Why I don't have that gun on the picture ? And aliens have ak12? 😄
-
Wow... Glad I missed you leaving! I would have had to crack some heads to get you back. 😄 Glad youre back Jarhead. You're actually one of the best in the whole of the Arma modding community! Glad youre back. Hope youre here for a long time into Arma 4,5,6,7...….
-
added forcefields to your aliens... Place this script in Init.sqf of mission, or call in a config for addon. They admit a small glow until field is depleted by hits. When hit the glow grows brighter for a short time. They do not take damage till after field is depleted.
I may rework it later to take into account kinetic energy, and explosive damage to effect the shields.Used Damage taken instead. Works just as well with less works and less FPS hits.Spoiler_Alienlist = ["mbg_u_alien_01_scout","mbg_u_alien_01_rusher","mbg_u_alien_02_gunner","mbg_u_alien_02_skirmisher","mbg_u_alien_03_commander","mbg_u_alien_hybrid_01_hunter"]; { private _unit = _x; if (typeOf (vehicle _unit) in _Alienlist) then { _unit setVariable ["hmhits",10,true];//(3+(ceil random 7)) private _position = getPos _unit; private _light = "#lightpoint" createVehicleLocal _position; _light setLightBrightness 0.1; _light setLightAmbient [1.05, 1.05, 1.5]; _light setLightFlareSize 5; _light setLightColor [1.05, 1.05, 1.5]; _light lightAttachObject [_unit, [0,0,0]]; [_unit,_light] spawn { params ["_unit","_light"]; waitUntil {((_unit getVariable "hmhits") <= 0)}; LightDetachObject _light; deleteVehicle _light; }; _unit setVariable ["HitVar",_unit addEventHandler ['HandleDamage', {// params ["_unit", "_hitSelection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; if ((_unit getVariable "hmhits") > 0) then { _Shielddamage = (_unit getVariable "hmhits") - _damage; hint str [_Shielddamage,(_unit getVariable "hmhits")]; _unit setVariable ["hmhits",_Shielddamage,true]; [_unit,_damage] spawn { params ["_unit","_damage"]; _unit setDamage 0; //hint str [(damage _unit),_damage,(_unit getVariable "hmhits")]; }; } else { [_unit,_damage] spawn { params ["_unit","_damage"]; _unit setDamage ((_damage*.15)+(damage _unit)); //hint str [(damage _unit),_damage,(_unit getVariable "hmhits")]; }; }; }]]; _unit addEventHandler ["HitPart", { (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; [_target,_position] spawn { params ["_target","_position"]; if ((_target getVariable "hmhits") >= 1) then { _light = "#lightpoint" createVehicleLocal _position; _light setLightBrightness 0.3; _light setLightAmbient [1.5, 1.5, 2.0]; _light setLightFlareSize 0.1; _light setLightColor [1.5, 1.5, 2.0]; _light lightAttachObject [_target, [0,0,0]]; sleep (.15 + random .15); LightDetachObject _light; deleteVehicle _light; }; //_hits = ((_target getVariable "hmhits")-1); //_target setVariable ["hmhits",_hits,true]; }; }]; }; } forEach AllUnits;
This version has some particle effects:
Spoiler_Alienlist = ["mbg_u_alien_01_scout","mbg_u_alien_01_rusher","mbg_u_alien_02_gunner","mbg_u_alien_02_skirmisher","mbg_u_alien_03_commander","mbg_u_alien_hybrid_01_hunter"]; { private _unit = _x; if (typeOf (vehicle _unit) in _Alienlist) then { _unit setVariable ["hmhits",10,true];//(3+(ceil random 7)) private _position = getPos _unit; private _light = "#lightpoint" createVehicleLocal _position; _light setLightDayLight true; _light setLightIntensity 2.5; _light setLightBrightness 0.05; _light setLightAmbient [1.05, 1.05, 1.5]; _light setLightUseFlare true; _light setLightFlareMaxDistance 5000; _light setLightFlareSize 0.1; _light setLightColor [1.05, 1.05, 1.5]; _ps = "#particlesource" createVehicleLocal _position; _ps attachTo [_unit,[0,0,.75]]; _PS setParticleCircle [0, [0, 0, 0]]; _PS setParticleRandom [0.2, [(0.5 + random (-0.5)), (0.5 + random (-0.5)), (0.5 + random (-0.5))], [(0.25 + random (-0.25)), (0.25 + random (-0.25)), (0.25 + random (-0.25))], 0.2, 0.2, [0, 0, 0, 0], 0, 0]; _PS setDropInterval 0.05; _PS setParticleParams [["\ca\data\ParticleEffects\FireAndSmokeAnim\FireAnim", 8, 2, 7], "", "Billboard", 1, 1, [random 0.25, random 0.25, 0.75], [0, 0, 2], 3, 10, 0.9, 0.3, [1,1],[[0,0,0.35,0.5],[0,0,0.35,0.3],[0,0,0.35,0.15]], [1,2], 0.5, 2, "", "", _unit]; _light lightAttachObject [_PS, [0,0,.75]]; [_unit,_light,_PS] spawn { params ["_unit","_light","_ps"]; waitUntil {((_unit getVariable "hmhits") <= 0)}; LightDetachObject _light; deleteVehicle _light; detach _ps; deleteVehicle _ps; }; _unit setVariable ["HitVar",_unit addEventHandler ['HandleDamage', {// params ["_unit", "_hitSelection", "_damage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; if ((_unit getVariable "hmhits") > 0) then { _Shielddamage = (_unit getVariable "hmhits") - _damage; hint str [_Shielddamage,(_unit getVariable "hmhits")]; _unit setVariable ["hmhits",_Shielddamage,true]; [_unit,_damage] spawn { params ["_unit","_damage"]; _unit setDamage 0; //hint str [(damage _unit),_damage,(_unit getVariable "hmhits")]; }; } else { [_unit,_damage] spawn { params ["_unit","_damage"]; _unit setDamage ((_damage*.15)+(damage _unit)); //hint str [(damage _unit),_damage,(_unit getVariable "hmhits")]; }; }; }]]; _unit addEventHandler ["HitPart", { (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; [_target,_position] spawn { params ["_target","_position"]; if ((_target getVariable "hmhits") >= 1) then { _light = "#lightpoint" createVehicleLocal _position; _light setLightDayLight true; _light setLightIntensity 5; _light setLightBrightness 0.1; _light setLightAmbient [1.5, 1.5, 2.0]; _light setLightUseFlare true; _light setLightFlareMaxDistance 5000; _light setLightFlareSize 0.1; _light setLightColor [1.5, 1.5, 2.0]; _ps = "#particlesource" createVehicleLocal _position; _ps attachTo [_target,[0,0,.75]]; _PS setParticleCircle [0, [0, 0, 0]]; _PS setParticleRandom [0.2, [(0.5 + random (-0.5)), (0.5 + random (-0.5)), (0.5 + random (-0.5))], [(0.25 + random (-0.25)), (0.25 + random (-0.25)), (0.25 + random (-0.25))], 0.2, 0.2, [0, 0, 0, 0], 0, 0]; _PS setDropInterval 0.05; _PS setParticleParams [["\ca\data\ParticleEffects\FireAndSmokeAnim\FireAnim", 8, 2, 7], "", "Billboard", 1, 1, [random 0.25, random 0.25, 0.75], [0, 0, 2], 3, 10, 0.9, 0.3, [1,1],[[0,0,0.35,1],[0,0,0.35,0.6],[0,0,0.35,0.3]], [1,2], 0.5, 2, "", "", _target]; _light lightAttachObject [_PS, [0,0,.75]]; sleep (.5 + random .5); LightDetachObject _light; deleteVehicle _light; //sleep (.5 + random .5); detach _ps; deleteVehicle _ps; }; //_hits = ((_target getVariable "hmhits")-1); //_target setVariable ["hmhits",_hits,true]; }; }]; }; } forEach AllUnits;
shield pic.... Video would be better though. The blur is something else unrelated to the alien shields.
-
1
-
6
-
Make AI turret automatically target and shoot any blufor that enter trigger?
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
https://www.dropbox.com/s/68atxkce1t51635/annihilate.Stratis.rar?dl=0 Sorry bout that