Jump to content

Search the Community

Showing results for tags 'eventhandler'.



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

  1. Hello, I'm having an issue getting this event handler to fire on dedicated server. Everything works perfect in player hosted server. I've tried to use the event handler with "remoteexec" but cannot seem to get that to work on player hosted or dedicated servers. I do believe "remoteexec" is the answer but I somehow have it setup wrong. Here are the codes ran from initserver.sqf This one works exactly as I want it to on player hosted server but does nothing on a dedicated server. while {true} do {sleep 5; {_x removeallEventHandlers "Handleheal"} forEach allUnits;{_x addEventHandler ["Handleheal", {_this select 1 addScore 1; _this select 0 disableai "move"; fire_enableaimoveforheal_trigger_1 = true}]} forEach allUnits }; This one above works exactly as I want it to on player hosted server but does nothing on a dedicated server. while {true} do {[{_x ["Handleheal", {_this select 1 addScore 1; _this select 0 disableai "move"; fire_enableaimoveforheal_trigger_1 = true}foreach allunits]] remoteExec ["addEventHandler", 0, true] }; This one above was my progress to get the Event Handler to work on dedicated server using "remoteexec". I cannot get this one to even do anything on player hosted server so I'm pretty sure I have some type of error in there but I'm getting no error code. Anyone that attempts to help is very much appreciated :-)
  2. I have a music loop eventhandler set up in a trigger. It works fine the code is: 1 fademusic 1; ehID = addMusicEventHandler ["MusicStop", {playMusic ["Track2", 2];}];playMusic ["Track2", 2]; And upon Deactivation it fades the music to 0. Works good. However. I have various other triggers on objective zones which fade back in the music using different tracks. Those work fine too but after they finish playing the music is still at fade 1 and it resumes the eventhandler for the loop. So basically I want this loop to only function inside of this trigger. How do I terminate this loop upon deactivation and will it reactivate on a repeatable trigger as it should after deactivation? Any help is greatly appreciated. For anyone wondering its for a type of safe house like Resident Evil style where you enter it and your cozy warm piano loop plays and reassures you that everything is going to be alright. ;) So it needs to be repeatable in and out type of deal. Thanks.
  3. Hi. How can I find the handler ID to use with ctrlRemoveEventHandler ? https://community.bistudio.com/wiki/ctrlRemoveEventHandler
  4. Hi I need some help with the precise syntax of an Eventhandler but I don't know programming and need help with the precise syntax. I want to insert in the init of a helicopter than when it switches its engine off, it kicks out of the vehicle all players in cargo. According to Arma wiki https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#Engine the init shoul be something like this. This addeventhandler "engine" [this, false] { moveOut this } forEach crew this; But I can't make it work. Any idea of what I am doing wrong?
  5. Hi, For those who don't know, Arma has a framework to check for an event on each frame of the game (similar to the sleep/sleepUI commands but unscheduled, so higher priority). Currently, there's no easy way to make it consider objects (or indeed any other data) that does not have a global name. This basic framework can let you add events easily based on time (it uses diag_tickTime fyi). Also, you can pass custom functions to it not based on time and write out the outcomes yourself (bit more advanced). If you specify a timeout parameter (in seconds), it will only execute your code once the timeout is up. Without a timeout specified, it will execute your code on each frame. FORMAT This is the format for using it: _thisEventHandler = [arguments,code,timeout (optional)] call horde_fnc_addMissionEventHandler; The rules are that the arguments you pass to it must be in an array. So these are ok: [[player],myFunction,10] call horde_fnc_addMissionEventHandler; [["string"],myFunction,10] call horde_fnc_addMissionEventHandler; [[player,"string"],myFunction,10] call horde_fnc_addMissionEventHandler; Using a single argument is NOT ok: [player,myFunction,10] call horde_fnc_addMissionEventHandler; // bad ["string",myFunction,10] call horde_fnc_addMissionEventHandler; // bad There's no error checking currently* so as long as you stick to the format, then you're ok. EXAMPLES ein) _fnc = { player sideChat format ["%1",_this select 0] }; [["hello"],_fnc,2] call horde_fnc_addMissionEventHandler; [["poopy"],_fnc,3] call horde_fnc_addMissionEventHandler; [["fluffy paws"],_fnc,4] call horde_fnc_addMissionEventHandler; Prints "hello" on screen after 2 seconds, then "poopy" a second later, then "fluffy paws" a second after that. drei) _fnc = { missionNamespace getVariable ("horde_gv_eachFrameArgs_" + (_thisEventHandler toFixed 0)) params ["_unit","_moving","_notMoving"]; if (vectorMagnitude velocity vehicle _unit > 1) then { systemChat format ["%1 is %2",_unit,_moving] } else { systemChat format ["%1 %2",_unit,_notMoving] } }; TAG_movingIndicatorID = [[player,"moving","not moving"],_fnc] call horde_fnc_addMissionEventHandler; Infinite loop informing player if he/she is moving or not by systemChat. Note that we no not define the timeout (3rd parameter in the arguments). You can stop it in this example by using the return (TAG_movingIndicatorID) TAG_movingIndicatorID call horde_fnc_removeMissionEventHandler; // stops the sideChat zwei) _fnc = { missionNamespace getVariable ("horde_gv_eachFrameArgs_" + (_thisEventHandler toFixed 0)) params ["_unit","_moving"]; if (vectorMagnitude velocity vehicle _unit > 1) then { systemChat format ["%1 is %2 - deleting EventHandler",_unit,_moving]; _thisEventHandler call horde_fnc_removeMissionEventHandler } }; [[player,"moving"],_fnc] call horde_fnc_addMissionEventHandler; This is a function that is not dependent on time so the 3rd parameter of the arguments does not need to be defined. If the unit passed to it moves, then it prints a message and then quits. Note that the deletion is specified in the function. CBA I just wanted to mention cba as they have a great system for this sort of thing, but if you want to use it, then you have to be comfortable with mod dependencies. This is a poor man's system that lets you manage an unscheduled event system without mods. ALWAYS DO BETTER If you can write something faster/better than this then please comment and post your code in here so we can all benefit. My code's not great but works ok I think. I'm sure there's better ways of doing it but I can't think of them right now. FUNCTIONS horde_fnc_addMissionEventHandler = { params ["_args","_code","_timeout"]; private _thisEventHandler = -1; if (isNil "_timeout") then { _thisEventHandler = addMissionEventHandler [ 'EachFrame', _code ]; } else { _thisEventHandler = addMissionEventHandler [ 'EachFrame', horde_fnc_missionEventHandlerTimeout ]; _args pushBack [_code,diag_tickTime + _timeout] }; missionNamespace setVariable ["horde_gv_eachFrameArgs_" + (_thisEventHandler toFixed 0),_args]; _thisEventHandler }; horde_fnc_missionEventHandlerTimeout = { private _args = missionNamespace getVariable ("horde_gv_eachFrameArgs_" + (_thisEventHandler toFixed 0)); _args select (count _args - 1) params ["_code","_timeout"]; if (diag_tickTime > _timeout) then { _args deleteAt (count _args - 1); _args call _code; removeMissionEventHandler ["EachFrame",_thisEventHandler]; missionNamespace setVariable ["horde_gv_eachFrameArgs_" + (_thisEventHandler toFixed 0),nil]; }; true }; horde_fnc_removeMissionEventHandler = { removeMissionEventHandler ["EachFrame",_this]; missionNamespace setVariable ["horde_gv_eachFrameArgs_" + (_this toFixed 0),nil]; true }; Ta * = I could put this in if required but it will slow the execution down a bit
  6. Hi guys, im trying to simulate a miles (Multiple Integrated Laser Engagement System) exercise but im having some troubles, i'm using a eventhandler "HIT" to execute the effects, like this: { if ((side _x) == Independent) then { _x addEventHandler ["HIT",{ _this select 0 setCaptive true; _this select 0 setdamage 0; _this select 0 disableai "Anim"; _this select 0 disableAI "Move"; _this select 0 disableAI "AutoTarget"; _this select 0 switchMove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon"; }]; }; } forEach allUnits; well, if i shoot a independent unit to a leg, to a arm or even in the kevlar vest at distance, work well, the unit will stop, put his hands behind the head and the blufor IA´s stop shooting them, but, if i shoot to the units at the head, well, they simply dies, the same if i shoot to the chest in close combat... if i put the units in allowdamage false, the eventhandler "HIT" dont work... somebody knows how can i solve this? thank for all and sorry about my poor english :(
  7. There is weapon and magazines for weapon in container. player addEventHandler [ "Take", { params ["_unit", "_container", "_item"]; diag_log format ["_item: %1", _item]; } ]; When I take weapon, it shows up in log (_item variable). Problem: With weapon I receive also magazines for this weapon. Question: How to prevent to pick up these additional magazines? Idea: I want to have control of what I can take from container. I want only take weapon without magazines.
  8. When I open container, I am adding items to container. _object addEventHandler [ "ContainerOpened", { params ["_container", "_player"]; { _container addItemCargoGlobal [_x, 1]; } forEach ["FirstAidKit", "MineDetector", "ItemMap"]; } ]; Problem: I don't see items in inventory. I need to do some action (selection in dialog) to see those items inserted items. Question: How to "AUTO-REFRESH" dialog so I can see items in inventory list? Possible solutions: - refresh dialog - waitUntil { code }; showDialog; - other GUI Wizard @moricky do you have some ideas ?
  9. Welcome, To keep this short : _hit = 0 I want this variable to increase everytime the object _Str been hit. _Str addEventHandler ["HitPart",{_hit = _hit + 1}]; This doesn't work because the EH doesn't know the localvariable. _Str addEventHandler ["HitPart",{hit = hit + 1}]; This does work because it is a globalvariable. But i need it to be a localvariable, because there are 200 objects that are being spawned using the same variable. waitUntil {_Hit > 3}; deletevehicle _Str; I want the obj to delete itself after being hit 3 times. Is there workaround that i can use? Or maby a different way to approach this? Draoth
  10. Hi, I am using a function for conversations. It's defined in CfgFunctions and called via spawn command. Now I want to archive that conversation stops if the unit (conversation partner) gets killed. The units with the conversation action are civilians, spawned dynamically via Engima's Civilians script. I could do that with: // inside attached action to all civilian units: /* ...some code... */ handle = [params] spawn createConversation; // And this in unit's eventhandler: if (not isNil {handle} and {not scriptDone handle}) then { terminate handle}; The problem is, when I want to start another conversation now with a different unit, the conversation (or better saying: the createConversation function) doesn't execute anymore. How can I make sure that the function gets executed again? As I understand, the terminate command fires when the spawned script is processed the next time by the scheduler. In my case it immediately stops the conversation when the civilian gets killed, but it seems to also terminating the next started conversation, and so on. I also tried it without the "killed" eventhandler, and instead in units callback (like init field) did this: // No conversations with dead civs waitUntil { // exit when unit gets deleted if (isNull _unit) exitWith {true}; !alive _unit; }; sleep 1; _unit removeAction talk; if (not isNil {handle} and {not scriptDone handle}) then { terminate handle}; I couldn't find anything helpful... could someone help me, please? Thx in advance
  11. hi guys, im trying to attach an Eventhandler to a plane, so when it is destroyed, all usermade actions get removed. The script is run by an action. Here is the script: am i missing something?
  12. 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
  13. At the moment i am experimenting with eventhandlers because i plan on creating missions for the Clan that I am in. But I have a problem with the IncomingMissile eventhandler. player addEventHandler ["IncomingMissile", {hint "SHOT";}] I flew over a ZSU with my A-10 and the ZSU shot a missile at me but I didn't get the message "SHOT". I tried it with various other things but they didn't work either. Can anyone please help? And yes i already googled the problem but every post that i found did not contain the information that i need.
  14. I want to add the Fired eventHandler to every player that walks into my TriggerArea. My current setup is below. However, what seems to be happening is that it is only applying it to a few players (for the most part none). It always seems to add it to me, but not really to the other 70+ players. Condition: this && (player in thisList) || (vehicle player in thisList) On Activation: eh1 = player addEventHandler ["Fired", {deleteVehicle (_this select 6);}]; On Deactivation: player removeEventHandler ["Fired", eh1]; This works perfectly on me, and 1 of my friends. However, it is not adding the event to other players that walk into the TriggerArea. Would it be smart/efficient to loop through theList and add the event to everyone in On Activation?
  15. Hey folks, so I am working on a gamemode but when you get killed I want the player's cash to be reset but I can't get this to work. I have the feeling I have made a big misstake somewhere (still learning). Script: //Reset cash when you respawn if (!isDedicated)then{ _killed=(_this select 0); _killed addEventHandler ["MPKilled", { _killed= (_this select 0); if (player == _killed)then{ cash=100; any = [ [ ["Died!","align = 'center' size = '0.7' font='PuristaBold'","#FF0000"], ["","<br/>"], [str (date select 3) + ":" + str (date select 4),"align = 'center' size = '0.7'"] //Show date when died ] ] spawn BIS_fnc_typeText2; (uiNameSpace getVariable "myUI_DollarTitle") ctrlSetText format ["$%1",cash]; _killed removeAllEventHandlers "MPKilled"; }; }]; }; Thanks! - Sciirof
  16. _civkilled = addMissionEventHandler ["EntityKilled",{if (((_this select 1) == player) && (side (_this select 0) == civilian)) then {[[], "ray_lose_fnc", true, true] call BIS_fnc_MP; [[(_this select 1)], "ray_killer_fnc", true, true] call BIS_fnc_MP; }else{}; }]; I have this type of code... it works correctly. But if i kill the second teammate in the group of the player (blufor) the trigger fires... Thanks :)
  17. Aright, i have multiple EventHandler executed on ai and Players but Im executing them differently, small example : initPlayerLocal.sqf -for players- pwrotateEH = player addEventHandler ['Killed',{_this spawn fnc_pwrotate;}]; bloodbathEH = player addEventHandler ["Hit",{_this spawn fnc_bloodbath;}]; fn_Init_CSAT.sqf -for AI- _Unit addEventHandler ['Killed',{_this spawn fnc_pwrotate;}]; _Unit addEventHandler ["Hit",{_this spawn fnc_bloodbath;}]; ====================================================== I know I can use one for both but , which is a better option to use ? part of why I'm running the EventHandlers separately is because player and AI load outs are also different So, I had made init's for all sides. I hope I"ve explained this good. thanks for the help
  18. Hi there, I'm looking for a way to attach an object to a building, in MP, remotely (from a client with a visual result for any client). Well, attachTo is a command supposed to be AG EG. So, where is the problem? If, as a client, my addon is able to attach an object thru an event Handler, the object is just attached locally (on client PC which triggered the EH). The other clients (or even hosted server) just can see the object on ground. Furthermore, if i try to attach this object on a vehicle, that works for every clients! On a building, only on the client PC performing the EH. I'm not sure there is a link with that: I remarked a difference between buildings and vehicles: The owner of (empty) vehicles is server ( owner returns 2), but buildings are just "remote" (owner returns 0). Any idea to attach an object to a building for any client?
  19. Hello everybody! I have an object - a wall with steel door - which I want to be only affectable by two kinds of explosive devices and not by any other possible influences. If it gets hit by DemoCharge ("DemoCharge_Remote_Mag"/"DemoCharge_Remote_Ammo") I want only the door to be breached. wall setDamage 0.7 or wall setHit ["hit1",1] If it gets hit by SatchelCharge ("SatchelCharge_Remote_Mag"/"SatchelCharge_Remote_Ammo") I want the wall to experience full damage. I've searched and tried for a couple hours now, but unforunately without success, so I hope one of you can reach a helping hand. Maybe it's important too to mention, that I am using ACE3? I noticed with this addEventHandler ["handleDamage", { hint parseText format ["Target: %1 <br/> Selection: %2 <br/> Damage: %3 <br/> Source: %4 <br/> Ammo: %5",(_this select 0),(_this select 1),(_this select 2),(_this select 3),(_this select 4)];}]; that there is no (_this select 4) "Ammo", when using the explosives. Is there any way to solve/workaround the problem? Kind regards.
  20. Hello, I am working on my first eventhandler and want to just ask if this thinking will work. I want to create a teamkill timeout for a dedicated server coop mission. I was going to add this to playable init null = [this]execVM "tkpunish.sqf"; Here is the tkpunish.sqf Is this an ok approach? This untested, but will it work calling adding the null = [this]execVM "tkpunish.sqf"; in the playable init to call the eventhandler? Does anyone have suggestions on a different way that could be more efficient or correct? dubl
×