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
    • 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
  • DayZ Italia's Lista Server
  • DayZ Italia's Forum Generale

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

  1. Hi together, I turn to you with a problem where I'm reaching the limit with my basic skills. Initial situation: I would like to use the addaventhandler Fired in a dedicated environment to trigger various environmental effects etc. when a bomb is dropped. This "Bombeffectpart" works without problems. But it only works if the event handler is tied directly to the vehicle, as described in the BI Wiki: Otherwise I sometimes get wrong parameters send in my tests or get directly Schript Errors because of wrong Variables. Problem: However, I am currently only able to bind the eventhandler to vehicles if I assign a fixed variable to a vehicle init field in the editor and then bind the eventhandler to this in the script. But the mission does not contain all vehicles at the beginning of the mission. There are some vehicles that are temporarily in the mission due to an RTO module and some other are only spawned / created by players. And this is exactly where I'm looking for a solution: How I can search for all "Air" objects in a loop and bind the event handler directly to the vehicle object (not the unit). Theoretically, referring to airplanes or an array in which I write all the class names it relates to would be sufficient. Do you have any ideas how I can solve this problem? I've been racking my brains about this for several days. Here my actual Code Snippet which wouldn't work because Eventhandler is not attached to vehicle (exclusive). Thank you so much for Input and Ideas. 🙂
  2. How would I turn this short script global. Basically, I need these mines, when placed by any Curator on the map, to lose the ability to be edited by the Curator who placed it. Currently, I have this short piece of code located in my "initPlayerLocal.sqf", however, when I test my multiplayer map using the "arma3server_x64.exe", it doesn't remove the ability for me to edit the mines after they are placed. Please help!
  3. Hi everyone! This is a bit of a read, but I hope what I have to share is worth the read. I have come to the forums in search of help, but first I would like to share my success with everyone. I have put together an addEventHandler that turns all satchel charges into "tree cutters". I got this from PierreMGI in a 5 year old post on Armaholic forums https://www.armaholic.com/forums.php?m=posts&q=31114. It forms one of the core logistics features in my Valhalla missions. It sets damage to maximum (1) on all trees and bushes within a 15m radius of the charge, when the charge is detonated. Works on dedicated servers. Tree Cutter eventHandler. Add to initPlayerLocal.sqf && onPlayerRespawn.sqf: player addEventHandler ["fired", { if ("SatchelCharge_remote_ammo"== _this select 4) then { "Tree Cutter Charge Placed, Effective range 15m!" remoteExec ["hint"]; _charge = _this select 6; 0 = [_charge] spawn { _pad = createVehicle ["Land_HelipadEmpty_F", player, [], 0, "CAN_COLLIDE"]; _charge = [_this, 0, objNull] call BIS_fnc_param; waituntil {sleep 0.1; isNull _charge}; { _x setDamage 1 } foreach (nearestTerrainObjects [_pad,["tree","bush"],15]); deleteVehicle _pad; } } } ]; Never be at the mercy of vegetation again! Now my Problem. The above code works everywhere except Tanoa. Tanoa's trees: 1, Don't have a "ruin" model, or destroyed state that they can be put in. Even when damage set to maximum, they still stand. 2, they don't have a configure class. The dubug console command hint str(typeOf cursortarget); copyToClipboard str(typeOf cursortarget); that I got from Haleks in the post always returns "". Which according to the description in typeOf means they don't have a config class. Making them nigh impossible for me to target by classname directly. So I went with a hideObjectGlobal approach that works on locally hosted games, but not on dedicated servers. Tanoa Tree Hider eventHandler. player addEventHandler ["fired", { if ("SatchelCharge_remote_ammo"== _this select 4) then { "Tree Cutter Charge Placed, Effective range 15m!" remoteExec ["hint"]; _charge = _this select 6; 0 = [_charge] spawn { _pad = createVehicle ["Land_HelipadEmpty_F", player, [], 0, "CAN_COLLIDE"]; _charge = [_this, 0, objNull] call BIS_fnc_param; waituntil {sleep 0.1; isNull _charge}; { _x hideObjectGlobal true } foreach (nearestTerrainObjects [_pad,[],25,false]); deleteVehicle _pad; } } } ]; I am too wrapped up in my own conundrum to see the solution. Would someone please show me the corrections that need to be made in order for the Tanoa tree hider event handler to work on dedicated servers. Thank you for reading and I hope the these tree cutters help you dominate the battlefield!
  4. 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
  5. 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.
  6. 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?
  7. 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
  8. 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.
  9. 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
  10. 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)) };
×