Search the Community
Showing results for tags 'killed'.
Found 6 results
-
So I have a problem with my helis/planes that whenever someone goes unconscious/is dead in one or one explodes you can't respawn and you either need the zeus to delete you or someone else pull you out of the vehicle. I have made this script so far but it doesn't seem to properly work. { if ( _X getVariable ["ACE_isUnconscious", false]) or (!alive _x) then {moveOut _x} } foreach crew _vehicle This seems to simply move the unconscious guy out of the vehicle even if he is the only one unconscious there. How would I make it so anyone who is unconscious gets moved out of the thing only when everyone else in the vehicle is also unconscious? Thank you in advance
-
GF Drop Loot Script by GEORGE FLOROS [GR] Description: GF Drop Loot Script , Enemies , will drop items or add to their inventory , when killed , configurable . You are free to do anything but i would like to give me Credits for this! Simple and easy to use and adapt . Have Fun ! Installation / Usage: For usage instructions and information of how to use the GF Drop Loot Script please refer to the included documentation and/or example mission. Place in your mission the files . There is everything included in the description.ext and initPlayerLocal.sqf , to copy paste in your mission . https://community.bistudio.com/wiki/SQF_syntax Don't try to open this with the simple notepad. For everything that is with comment // in front or between /* means that it is disabled , so there is no need to delete the extra lines. You can open this ex: with notepad++ https://notepad-plus-plus.org/ and also use the extra pluggins (this way will be better , it will give also some certain colours to be able to detect ex. problems ) http://www.armaholic.com/page.php?id=8680 or use any other program for editing . For the Compilation List of my GF Scripts , you can search in: https://forums.bohemia.net/forums/topic/215850-compilation-list-of-my-gf-scripts/ Notes: The Loot is configurable Credits & Thanks: Thanks to All script contributors Thanks to everyone who tries to do the best for this game! Thanks to BIS for such a great platform . Thanks to BIS Community and BIS Community Forums . Thanks to Armaholic Community and Forums . Changelog: v2.0 Code optimization, added configurable items inside uniforms, added setting options and small additions inside the script, changed the name of all the scripts , starting now with GF . Version 1.0 - first release Forum topic: - Armaholic forums http://www.armaholic.com/forums.php?m=posts&q=39889 Armaholic download GF Drop Loot script
-
Hello to everyone from the community! 🙂 I would like to ask for a script that: - creates groups of units by force (from sqf file) and WHEN a trigger is activated and its condition is met. My idea is to: 1.create a group in the EDEN editor and give the unit a callsign X (for example); 2.force spawn the same group when a condition is met in my trigger (it must not exist until this moment, OR be invisible); 3.use the sqf file to check if the ENTIRE group is eliminated and forced respawn it again; 4.have another script from another trigger which could stop spawning the group when another condition is met (for example a visible timer reaches 0 second - such scripts could be used when the player awaits reinforcements and must hold a position for certain time). Here is everything again: [trigger is activated and spawns the X group] ---> [the group is eliminated - checked by the sqf file that also spawns it again] ---> [use a no matter what condition in a 2nd. trigger to stop the respawn /a timer is preferred/] Thank you for the help in advance and cheers! Edit: additional question - can I use multiple groups named X_1, X_2, X_3 etc. and also use multiple sqf files with similar names that work as the first file, only for the next X groups that follow? 🙂
-
multiplayer Last Man Standing Notification / Multiplayer Scripting
driftingnitro posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm working on a mission that doesn't have re-spawns and designed for quick firefights. My intention is to design a mission for a dedicated server with the following: If all Blufor (players) are killed, failure If time runs out, failure If all Opfor units are killed, victory Notify all players (even dead) when there is one player remaining Notify all players (even dead) when there is one enemy remaining have the same number of units and type of unit on the enemy side, i.e. 1 autorifleman blufor and 1 autorifleman opfor (shown in the initServer.sqf is already working) My experience with multiplayer scripting is limited and I'm struggling to understand why it works in local hosted multiplayer (as the host alone) but not on dedicated servers, issues include: After starting the operation using the action (see flowgraph) the LastMan.sqf will start running immediately, even with 2 blufor players Server, after starting the operation using the action, will stop updating unit positions and AI will not react. All players except yourself are running in place, coupled with sudden spikes in framerate loss when initially activated and unable to kill enemies. Enemies don't react to being shot or standing directly in front of them even. this problem isn't present on the locally hosted Possibly an issue of the server ending the mission locally but not for clients (just a guess)? Mission must still be working enough to continue the countdown timer, mission fails properly when timer reaches zero Maybe I should be getting rid of triggers entirely? But it always seemed like they synced across multiplayer better Using the trigger and (count Thislist < 2) is that when all remaining players enter one vehicle, it counts as one unit and starts the trigger Tried using setting the triggers to server only and using Bis_fnc_MP but led to the mission immediately ending upon starting the operation action Code Flowgraph Mission Source https://drive.google.com/file/d/0B85GbOCq33caWlhHNW1KcENzV00/view?usp=sharing Thanks for the help on this issue -
[Solved] change unit in global array if unit is killed
sarogahtyp posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys, I ve to fight a bug in Sarogahtyps Spawn Script Creator - SSSC and thats the problem: I ve a main array which is called globalLeaderArray. There in I store group leaders. My problem is that when one of that group leaders die then it auto leaves the group and I cant get the group later to handle it in my caching parts of the script. Now I thought about to add a killed EH to store the new group leader (after the old has been killed) in globalLeaderArray. The following code has 2 functions fnc_mark_leaders initially pushs a leader in the global array and fnc_add_killed_EH adds an EH to that leader which changes the leader object in the global array if the leader dies. Because I use fnc_add_killed_EH inside of the EH itself there is some kind of recursive structure in it and I d like to know if that could work. Also I think its a bit complex for only change one object in an array so I wonder if someone knows a neater way to do that. fnc_mark_leaders = { params [["_unit", objNull, [objNull]]]; if (isNull _unit) exitWith {true}; private _leader = leader _unit; if (isNil "globalLeaderArray") then { globalLeaderArray =[]; }; if (!(_leader in globalLeaderArray)) then { _lead_index = globalLeaderArray pushBack _leader; _leader setVariable["lead_info", [_lead_index, (group _leader)]]; _leader call fnc_add_killed_EH; }; }; fnc_add_killed_EH = { params ["_leader"]; _leader addEventHandler ["killed", { params ["_old_leader"]; _lead_info = _old_leader getVariable "lead_info"; _lead_index = _lead_info select 0; _group = _lead_info select 1; _new_leader = _group call fnc_get_highest; _group selectLeader _new_leader; globalLeaderArray set [_lead_index, _new_leader]; _new_leader setVariable["lead_info", [_lead_index, _group]]; _new_leader call fnc_add_killed_EH; }]; }; EDIT: function to get the highest ranked and highest rated unit in group. with that I dont need to wait until engine changed the leader itsself. fnc_get_highest = { params ["_group"]; private _highest_rank = 0; private _highest_rating = -99999; private ["_highest_rank_array"]; //select the highest ranked units found (last element is ranked highest) _highest_rank_array = ((units _group) select {alive _x}) select { _rank = rankID _x; _highest_rank = _highest_rank max _rank; (_highest_rank == _rank) }; // reverse array to have highest ranked units at array start reverse _highest_rank_array; // cut the array after last unit with the highest rank { if(rankID _x < _highest_rank) exitWith {_highest_rank_array resize _forEachIndex}; } forEach _highest_rank_array; //exit if only one unit has the highest rank if(count _highest_rank_array == 1) exitWith { (_highest_rank_array select 0) }; //select the highest ranked unit whith the highest rating (last element is rated highest) _highest_rank_array = _highest_rank_array select { _rating = rating _x; _highest_rating = _highest_rating max _rating; (_highest_rating == _rating) }; //return the last element because its the highest ranked an the highest rated unit in group (_highest_rank_array select ((count _highest_rank_array) - 1)) };- 10 replies
-
- addEventHandler
- killed
-
(and 3 more)
Tagged with:
-
A safe way to get the weapon/object which killed a unit?
Heeeere's johnny! posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Since the "Killed" EH does not provide the weapon/object which killed the unit, I was looking through the other possible EHs (Dammaged, HandleDamage, Hit, HitPart), only to find that each one of these is either fireing multiple times for each damaged/hit part or potentially NOT fireing at all. So, if I wanted to print a single line to the log, mentioning the killing weapon/object, which would be the most senseful (most efficient) way of doing that? Best wishes, Johnny- 4 replies
-
- event handler
- killed
- (and 4 more)