Jump to content

Search the Community

Showing results for tags 'deadunits'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • BOHEMIA INTERACTIVE
    • BOHEMIA INTERACTIVE - NEWS
    • BOHEMIA INTERACTIVE - JOBS
    • BOHEMIA INTERACTIVE - GENERAL
  • FEATURED GAMES
    • Arma Reforger
    • Vigor
    • DAYZ
    • ARMA 3
    • ARMA 2
    • YLANDS
  • MOBILE GAMES
    • ARMA MOBILE OPS
    • MINIDAYZ
    • ARMA TACTICS
    • ARMA 2 FIRING RANGE
  • BI MILITARY GAMES FORUMS
  • BOHEMIA INCUBATOR
    • PROJECT LUCIE
  • OTHER BOHEMIA GAMES
    • ARGO
    • TAKE ON MARS
    • TAKE ON HELICOPTERS
    • CARRIER COMMAND: GAEA MISSION
    • ARMA: ARMED ASSAULT / COMBAT OPERATIONS
    • ARMA: COLD WAR ASSAULT / OPERATION FLASHPOINT
    • IRON FRONT: LIBERATION 1944
    • BACK CATALOGUE
  • OFFTOPIC
    • OFFTOPIC
  • Die Hard OFP Lovers' Club's Topics
  • ArmA Toolmakers's Releases
  • ArmA Toolmakers's General
  • Japan in Arma's Topics
  • Arma 3 Photography Club's Discussions
  • The Order Of the Wolfs- Unit's Topics
  • 4th Infantry Brigade's Recruitment
  • 11th Marine Expeditionary Unit OFFICIAL | 11th MEU(SOC)'s 11th MEU(SOC) Recruitment Status - OPEN
  • Legion latina semper fi's New Server Legion latina next wick
  • Legion latina semper fi's https://www.facebook.com/groups/legionlatinasemperfidelis/
  • Legion latina semper fi's Server VPN LEGION LATINA SEMPER FI
  • Team Nederland's Welkom bij ons club
  • Team Nederland's Facebook
  • [H.S.O.] Hellenic Special Operations's Infos
  • BI Forum Ravage Club's Forum Topics
  • Exilemod (Unofficial)'s General Discussion
  • Exilemod (Unofficial)'s Scripts
  • Exilemod (Unofficial)'s Addons
  • Exilemod (Unofficial)'s Problems & Bugs
  • Exilemod (Unofficial)'s Exilemod Tweaks
  • Exilemod (Unofficial)'s Promotion
  • Exilemod (Unofficial)'s Maps - Mission Files
  • TKO's Weferlingen
  • TKO's Green Sea
  • TKO's Rules
  • TKO's Changelog
  • TKO's Help
  • TKO's What we Need
  • TKO's Cam Lao Nam
  • MSOF A3 Wasteland's Server Game Play Features
  • MSOF A3 Wasteland's Problems & Bugs
  • MSOF A3 Wasteland's Maps in Rotation
  • SOS GAMING's Server
  • SOS GAMING's News on Server
  • SOS GAMING's Regeln / Rules
  • SOS GAMING's Ghost-Town-Team
  • SOS GAMING's Steuerung / Keys
  • SOS GAMING's Div. Infos
  • SOS GAMING's Small Talk
  • NAMC's Topics
  • NTC's New Members
  • NTC's Enlisted Members
  • The STATE's Topics
  • CREATEANDGENERATION's Intoduction
  • CREATEANDGENERATION's HAVEN EMPIRE (NEW CREATORS COMMUNITY)
  • HavenEmpire Gaming community's HavenEmpire Gaming community
  • Polska_Rodzina's Polska_Rodzina-ARGO
  • Carrier command tips and tricks's Tips and tricks
  • Carrier command tips and tricks's Talk about carrier command
  • ItzChaos's Community's Socials
  • Photography club of Arma 3's Epic photos
  • Photography club of Arma 3's Team pics
  • Photography club of Arma 3's Vehicle pics
  • Photography club of Arma 3's Other
  • Spartan Gamers DayZ's Baneados del Servidor
  • Warriors Waging War's Vigor
  • Tales of the Republic's Republic News
  • Operazioni Arma Italia's CHI SIAMO
  • [GER] HUSKY-GAMING.CC / Roleplay at its best!'s Starte deine Reise noch heute!
  • empire brotherhood occult +2349082603448's empire money +2349082603448
  • NET88's Twitter

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber (xmpp)


Skype


Biography


Twitter


Google+


Youtube


Vimeo


Xfire


Steam url id


Raptr


MySpace


Linkedin


Tumblr


Flickr


XBOX Live


PlayStation PSN


Origin


PlayFire


SoundCloud


Pinterest


Reddit


Twitch.Tv


Ustream.Tv


Duxter


Instagram


Location


Interests


Interests


Occupation

Found 1 result

  1. Hey guys, Same old, same old, yet another noob looking for clarification. The objective of the script is to: a) after loading map, go through all units, verify which are dead (cuz yeh, in SP you get this, in fact you get units that kill themselves as soon as the map loads, nothing you don't already know), and place a marker on the map. b) every time something is killed, well place a marker on the map. Why? Because reasons... I kid, you all know the camo in this game is too good. Ever spent a couple of minutes looking for a corps to loot that you killed at I don't how many hundreds of meters? Thing is, and as you all know, a dead body is a CIV body. Is this an issue? No, but yes. The issue arises when I attempt to get a color from a unit side, to make the marker that color. It's always "ColorCIV". Closes I've got was this. My approach is to create an array with all units, containing netId and side, them when the EventHandler for "EntityKilled" is triggered, get the id from the unit, cross reference it with the array created at map loading time, to get the side the unit was once apart of. The code is as follows // Create the array of the not yet dead I hope, and each not dead has an array with [ID,SIDE] _unitSidesWhenAlive = []; { _unitSidesWhenAlive set [_forEachIndex, [_x call BIS_fnc_netId, side _x]]; } forEach allUnits; // Create EH to take care of marking for all killed during gameplay addMissionEventHandler ["EntityKilled", { params ["_unit", "_killer", "_instigator"]; if (isNull _instigator) then { _instigator = UAVControl vehicle _killer select 0 }; // UAV/UGV player operated road kill if (isNull _instigator) then { _instigator = _killer }; // player driven vehicle road kill _markerName = str(format ["%1 killed by %2",name _unit, name _killer]); // _sideColor = [side _unit, true] call BIS_fnc_sideColor; // My difficulties start here // An array within an array, attempting to get the index of the array, that contains the array with the units ID and SIDE // That is provided I'm actually contructing the array correctly. _unitNetId = _unit call BIS_fnc_netId; // The ID of unit that triggered "EntityKilled" _unitNetId_Index; // Were I hopefully am able to store the element of the unit's array, within the array contructed at the beginning { _unitNetId_Index = _x findIf { _unitNetId }; // Returns index of the unit's array I hope if (!isnil _unitNetId_Index) exitWith {}; // If the above is right, and we have an index, go no further. Boy does this scripting language } forEach _unitSidesWhenAlive; // have a learning curve // Create a new array to be able to get SIDE from ID _unit_Array = _unitSidesWhenAlive select _unitNetId_Index; // Set the damn color, that of the SIDE the unit used to belong to before it hit the dust _sideColor = [_unit_Array select 1, true] call BIS_fnc_sideColor; _marker = createMarkerLocal [_markerName, position _unit, playerSide call BIS_fnc_sideID, player]; _marker setMarkerAlphaLocal 1; _marker setMarkerColorLocal _sideColor; _marker setMarkerDirLocal (direction _unit); _marker setMarkerShadowLocal false; _marker setMarkerShapeLocal "ICON"; _marker setMarkerSizeLocal [1,1]; _marker setMarkerTextLocal _markerName; _marker setMarkerTypeLocal "hd_dot"; systemChat format ["%1 has been killed by %2", name _unit, name _killer]; // Extract from the log // I guess "_unit_Array select 1" does not return a SIDE? // Error in expression <e _unit, name _killer, side _unit_Array select 1, _sideColor]; // }]; // // { // _kind = ""> // 14:18:54 Error position: <select 1, _sideColor]; // }]; // // { // _kind = ""> // 14:18:54 Error select: Type Side, expected Array,String,Config entry // 14:18:54 File TGF_Init\functions\fn_markOnMapUnitKilled.sqf..., line 33 hint format ["%1 has been killed by %2. %3 color %4", name _unit, name _killer, side _unit_Array select 1, _sideColor]; // line 33 }]; // Mark all the dead after map has loaded // This actually works :) { _kind = ""; switch (true) do { case (_x isKindOf "Car"): {_kind = "Car"}; case (_x isKindOf "Tank"): {_kind = "Tank"}; case (_x isKindOf "Ship"): {_kind = "Ship"}; case (_x isKindOf "Helicopter"): {_kind = "Helicopter"}; case (_x isKindOf "Plane"): {_kind = "Plane"}; default {_kind = ""}; }; _text = ""; _markerType = ""; if (_kind == "") then { _text = "already dead"; _markerType = "KIA"; } else { _text = "already destroyed"; _markerType = "loc_destroy"; }; _markerName = str(format ["%1 " + _text, name _x]); _sideColor = [side _x, true] call BIS_fnc_sideColor; // This here, observation: // Syntax: createMarkerLocal [name, position, channel, creator] // I thought by providing "creator", I would have the ability to remove the markers, but not the case _marker = createMarkerLocal [_markerName, position _x, playerSide call BIS_fnc_sideID, player]; _marker setMarkerAlphaLocal 1; _marker setMarkerColorLocal _sideColor; _marker setMarkerDirLocal (direction _x); _marker setMarkerShadowLocal false; _marker setMarkerShapeLocal "ICON"; _marker setMarkerSizeLocal [1,1]; _marker setMarkerTextLocal _markerName; _marker setMarkerTypeLocal _markerType; systemChat format ["%1 " + _text, name _x]; hint format ["%1 " + _text + "." + "Side %2, color %3", name _x, side _x, _sideColor]; } forEach allDead; So, referencing data that resides in an array, itself in an array is my issue at the moment. Disclaimer: If you say I'm doing it wrong, to me, that much is a given. If you say this is pointless, hey, you clicked the link, you read the post, you know were I'm going with this. I very much do not enjoy this scripting language, the learning curve is... it's $@#% up. I guess until you get to know it... still $@#% up. Thank you.
×