Jump to content

Search the Community

Showing results for tags 'addEventHandler'.



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
    • 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

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 7 results

  1. So what kind of script I'm creating/ searching for is to have certain kits from which each unit's equippement is randomly selected from like kit2 is ACP2 and kit6 is revolver etc. for each unit which will have [] exec "Class_randomize_script.sqf"; in their Init-field (or some other way?). I already asked help from great scripter George Floros GR in private and he have helped me very openly already but it hasn't been enough to me get through with this problem. Here's how far I have got this far: And here's what I'm aiming for: Above code (obviously?) doesn't work and I have taken parts of it from _NotASemiPro_ user's "_Custom Ammo Crates with Random Loadout_ script" but since he hasn't visited BI-forum in 5 years I didn't even try to ask his help. So what I still need help with?: 1) How I get _unit or whatever work so that it works for any unit seperatly? Creating sqf-file for each enemy unit doesn't sound wise way to do it 2) How to get eventHandlers work in .sqf form? In-game I get it work like this but in sqf it doesn't work and I have tried many different " ] } ; placements without getting it to work. Those who have opened my earlier published missions and campaigns at Eden editor might have realized I'm not very good with .sqf-codes. I tried to check George's "Drop Loot Script", "Set Custom Loadout Script" and "Auto random loadout script" but don't been able to understand if I could customize those scripts the way I want to and if I could, how? What I'm asking for your help is to either customize my Class_randomize_simple or simplest so that it would work like I have intended, customize one George's great scripts so that I can use it the way I intend or either create totally new script that would work like intended. If you manage to help me you will be absolutly credited in the missions credits-scenes and in the download-page like I have done in my earlier missions and campaigns when people have helped me in various obstacles. - Unluckymonster
  2. Hello there, I'm making a local script where a crew of a vehicle is set to allowdamage false when inside the vehicle, but returns to taking damage normally when they get out. I'm trying to make use of the addEventHandler GetOutMan, but since the crew already left the vehicle when the event handler is triggered, the script doesn't work obviously. Does anyone have any idea or work around to this problem? cheers.
  3. Hello. When I try to add an event handler to a newly spawned vehicle, the event handler is NOT working. [_helicopter] remoteExec ["jey_helicopter_restriction",0,true]; jey_helicopter_restriction = { _vehicle = _this select 0; _vehicle addEventHandler ["GetIn",{_this call checkpilot}]; _vehicle addEventHandler ["Engine",{_this call checkengine}]; }; But if I add an event handler to an already spawned vehicle (that has been there from the mission start) it works : chopp3 addEventHandler ["GetIn",{_this call checkpilot}]; chopp3 addEventHandler ["Engine",{_this call checkengine}]; Any ideas?
  4. Hello, I've been succesfully using this "safezone.sqf" script to restrict small arms fire, throwing grenades and placing explosives inside a "spawn protected area" which essentially is a trigger area. I assume the script itself is an evolution of grenadeStop.sqf by Bake or it could be from completely different origins who knows. In short what the script does is that it will delete the fired projectile, thrown grenade or placed explosive and display a message that can be customized freely with #define MESSAGE "Type your message here" To add the restriction to certain projectile, grenade or explosive the classname needs to be typed in the SPAWN_Restriction = -field I was trying to use the aforementioned script to also restrict vehicles from firing their guns inside the spawn protected area but it is so that declaring the ammo classnames (that are used in different vehicles) in the SPAWN_Restriction = ["insert ammo classname here"]; is not enough to get the job done. The question here would be that: whether the safezone.sqf can be adapted in a way so that using vehicle guns (or "turrets") to shoot inside the spawn protected area would also be restricted? (if so, any suggestion on how-to?) OR if I should start looking for a completely different approach with the issue at hand (if so, any suggestions what should that approach then be)? There weren't too many discussions available that did share somekind of similarity with what I'm asking here. I actually only found this and this but well, for me those didn't give the comforting "I got this and I know I can do this" feeling. Thus here I am, asking questions. Greetings Asmodeuz
  5. Basically when player take item, it will give him action, for example if he take radio to inventory, he can call air-strike with action menu. I am using eventHandler "Take" to add addAction to player. Question: How to remove added action when user "TakeOut" item from inventory? I did not find magic eventHandler for that. Ideas: - loop to unit and constantly checking if item is in inventory - InventoryClosed eventHandler Edit: I managed with 1st idea (loop), but still searching for optimal solution.
  6. Dear Community, I'm trying to trigger an effect for a vehicle when it's hit by a flare (kind of a superman EMP flare). The only function that triggers when a vehicle is hit by a flare is the "HitPart" eventhandler. Unfortunely this only works local, but I'd really like the engine to break for every client! I already tried adding the following lines in the function that spawns the vehicle: [[_vehicle, {_this addEventHandler ["HitPart", {_this call life_fnc_handleVehDamage}]}], "BIS_fnc_spawn", true, true] spawn BIS_fnc_MP; [[_vehicle, {_this addEventHandler ["HitPart", {_this call life_fnc_handleVehDamage}]}], "BIS_fnc_call", true, true] call BIS_fnc_MP; Created a file that adds the eventhandler: [[_vehicle], "life_fnc_addVehEH", true, true, false] call BIS_fnc_MP; [_vehicle] remoteExec ["life_fnc_addVehEH", 0, true]; Neither client log nor server log are showing any errors. None of these does work... Do you have any suggestions or see any mistakes? I'd appreciate it! Cheers, Faron
  7. 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)) };
×