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
  • Mercurious Brotherhood +2347063372861's +2347063372861>> I WANT TO JOIN OCCULT FOR MONEY RITUAL
  • 123betcasino01's Topics
  • TEORI BERITA's qqsuper99
  • QQSUPER99: Daftar Situs Slot Gacor Online Link Terbaru Gampang Menang's slot gacor
  • QQSUPER99: Daftar Situs Slot Gacor Online Link Terbaru Gampang Menang's slot gacor

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

  1. I created a group of units in SQF script and then add a killed eventHandler to all of them: { _x addEventHandler ["Killed", { params ["_unit", "_killer"]; hullaszamlalo = hullaszamlalo + 1; }]; } forEach (units _group_i): "hullaszamlalo" is a global variable, what is zero in init.sqf But when the create units script run, I got a "Invalid number in expression" error to "...o + 1;" It sounds like I cannot add one to a variable. Probably a noob mistake. Need a rubberduck to point to my noobness.
  2. Hi... I keep losing the team colours of my AI units after they go unconcious.... I thought if I can add an eventHandler to monitor player command input, I can store the colour to a variable, then recall it after revive. This link here is overwhelming: https://community.bistudio.com/wiki/User_Interface_Event_Handlers help appreciated cheers Bendy
  3. Hello all! I am a moderate beginner with Arma 3 scripting. I have a script that is used with the Survival mod (waves of enemies where you are required to loot bodies in order to find weapons, ammo, and FAKs). One of the problems that our group has is knowing which bodies have been looted or not (in the end, there are hundreds on the field). I am using an InventoryClosed (Script 1)event handler to change the color or remove the uniform (doesn't matter which behavior) after a player has closed the dead body's inventory. The problem that I'm having is that two of the three ways of opening an inventory (scrolling to the action and activating it, or pressing "I" when in range) work just fine. But if the player presses "Use" when the inventory icon is up on the screen, the inventory opens and closes immediately. They can go back into the Inventory after that and loot, but it's an odd experience. I tried switching to InventoryOpened (Script 2), and the behavior now pressing "I" or pressing "Use", and sometimes supports scrolling to "Inventory" action (but sometimes closes the inventory immediately in that case). It seems like an Arma 3 scripting bug to me. Any ideas about what I can try to prevent that weird behavior? Here are the scripts (I placed them in initPlayerLocal.sqf). Script 1: player addEventHandler ["InventoryClosed", { params ["_unit", "_container"]; if (_container isKindOf "Man") then { _container setObjectTextureGlobal [0, "#(rgb,8,8,3)color(1,0.61,0.65,0.6)"]; }; }]; Script 2: player addEventHandler ["InventoryOpened", { params ["_unit", "_container"]; if (_container isKindOf "Man") then { _container setObjectTextureGlobal [0, "#(rgb,8,8,3)color(1,0.61,0.65,0.6)"]; }; false; }];
  4. 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 :(
  5. Hey folks, I'll try and keep this short. I'm new to scripting in Arma 3, so I got a friend to assist me with custom dialogue that is set to occur in my mission when certain things happen. For example, I have audio that is supposed to play when an enemy plane gets shot down. But because the player is in their own plane for the entire mission, all that dialogue will sound muffled. We did go into the mission.sqm and set proper parameters for the briefing dialogue which makes it sound loud and clear even when inside a vehicle, but the shootdown dialogue is tied to eventhandlers within the unit's init in 3den. I tried setting the same parameters since it's also playSound script, but the audio is still muffled. Below is the code for one of the enemy units: this addEventHandler ["Hit", {bt1 setdamage 1}]; this addEventHandler ["killed", {playSound "GACSFXMODVSong0", 2, 0;}]; this addEventhandler ["Hit", {titleText ["<t align = 'center' shadow = '2' color='#FF0000' size='2' font='RobotoCondensedBold' >BOMBER</t><br /><t color='#FFFFFF' size='2' font='RobotoCondensed' shadow = '2' >This is Grey Two, we're hit, we're hit!</t>", "PLAIN DOWN", -1, true, true];}]; I'm using the information provided on this page as well: https://community.bistudio.com/wiki/playSound I'm hoping I'm just implementing the parameters wrong and someone here can show me the light. That, or someone can show me a better way to implement sounds that occur during the mission without using 3den triggers. Many thanks in advance! EDIT: Someone else helped me out and now the audio plays unmuffled, all because of a little syntax issue: this addEventHandler ["killed", {playSound "GACSFXMODVSong0", 2, 0;}]; The old code above was missing brackets around the sound and parameters itself. The fix is below: this addEventHandler ["killed", {playSound ["GACSFXMODVSong0", 2, 0];}]; Really simple fix, but I'll leave this post up in case someone else has this specific problem in the future. Case closed!
  6. Last content update: 6/13/2018 showing how to use the radius for addAction, using params instead of select, adding to arrays with various commands, altering arrays with various commands, get/setUnitLoadout Last content update: 6/10/2018 going through config files and getting details to sort what you want, using radius with addAction, params, and altering arrays with resize, pushBack, pushBackUnique, set, and append and going over to assist with resize count. Last content update: 5/27/2018 added GUI tutorial for how to make a weapon selector using cfgWeapon Last content update: 5/24/2018 added sector control tutorial Last content update: 5/21/2018 This is my arma 3 scripting tutorial series which is aimed to help both people getting into making their own scripts with fairly detailed simple tutorials as well as for the intermediate person looking to create their own features for their missions. The plans for this series is to almost fully cover everything behind the arma 3 missions that people play on a daily basis and have enough content provided in the videos where people can go off and make their own vision for their mission with the knowledge gained. Most of these videos are made on the fly at 1AM-4AM without any pretesting which should give someone the idea of what goes into finding syntax errors and narrowing down a bug that's causing your feature to not function properly. It is also an excuse for you to cut me some slack if you see mistakes :) . A lot of these tutorials are made with multiplayer in mind since I think most people want to play their missions online with their friends(which is why publicVariable has been utilized so much so new people can get a good grasp on the power those commands have). New videos are added to the playlist almost every day so if your stuck with something, maybe it has been covered in a video. If you have any requests on what you would like to see made then please suggest it here. topics covered so far Scripting tutorial playlist Database tutorials with INIDBI2 playlist GUI/Dialog tutorials playlist
  7. What is the best way to create and eventhandler for currentThrowable items? I want an event handler to track every time I throw a throwable, so when my player's inventory of "HandGrenade"or "SmokeShellGreen" is depleted I can refill it. I have tried to use an "explosion" EH with the following but does not work as _throwableArray is an array of strings, and I can't figure out how to create an array of throwables on the player...Also I don't think this would work for a "SmokeShell" _throwableArray = []; { if (_x == _throwable) then {_throwableArray pushBack _x} } forEach (magazines player); { _x addEventHandler ["Explosion", { params ["_vehicle", "_damage"]; if (damage _vehicle > 0.1) then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }]; } forEach _throwableArray; I have tried to use "AnimDone" EH, but could not even find the common animation for throwing... player addEventHandler ["AnimDone", { params ["_unit", "_anim"]; if (_anim == "AmovPercMrunSlowWpstDf_AmovPercMstpSrasWpstDnon_gthThrow") then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }];
  8. Hi, I need help to get this running. I want to call some code on opening the parachute. I didn't found anything matching in the list: https://community.bistudio.com/wiki/Arma_3:_Event_Handlers. I even tried the GetIn-Handlers because the parachute seems to be handled as a vehicle. Any ideas? Thx in advance ;)
  9. I get it to work when I change "_killed say3D [_sound,10000,1];" to _killer instead. Then my player says those reactions when the enemy dies. But I want it to be coming from "_killed". I get no errors when doing so but there is NO SOUND at all. This is the code I'm running in my death_sounds.sqf. I would be so happy to get this working! { if (side _x == east) then { _x addEventHandler ["Killed", { _killer = _this select 1; _killed = _this select 0; if ( _killer in (units (group player)) ) then { _sounds = ["death1","death2","death3","death4"]; _sound = _sounds select (floor(random(count _sounds))); _killed say3D [_sound,10000,1]; }; } ]; }; } foreach allUnits; EDIT: I tried stripping the code trying to make it work but no success. No errors but also no sound: { if (side _x == east) then { _x addEventHandler ["Killed", { _downed = _this select 0; _sounds = ["death1","death2","death3","death4"]; _sound = _sounds select (floor(random(count _sounds))); _downed say3D [_sound,10000,1]; } ]; }; } foreach allUnits;
  10. Unwanted Double post sorry... Moderators can you delete this topic please (or tell me how to delete it).
  11. Hello everyone.. I was trying to test something since I got down by A.A vehicles and units all the time when I'm in the chopper, so... I was thiking about 2 things.. 1 - I was trying to make a "script" that if a locked-on missile is fired, then it loses its target immediately after CM is launched. But I can't get it work... can anyone tell me what is wrong with this code? vehicle player addEventHandler ["IncomingMissile", { "cmImmunity = 0"; }]; ]; 2 - since I didn't get the first one to work I manage to do this script below. I learned that when you CM in the exact moment a missile is fired, you can avoid them. but this code doesnt work either.. this addEventHandler ["IncomingMissile", {params ["_target", "_ammo", "_vehicle", "_instigator"];[_target, "240Rnd_CMFlareMagazine"] call BIS_fnc_fire;}]]; I know there are briliants minds here.. and I hope you guys could help me. Thanks in advance.
  12. I am looking for ways to use a trigger to notify the players when civilians have been killed. Right now, I have groups of civilians huddled in different spaces that aren't tied to anything in particular. My vision is to make one trigger that notifies the player whenever any civilian from any of these groups has been killed. Is this possible without having to name every single civilian and making a trigger for each one? I'm not super familiar with tools outside of the actual Arma mission editor, but am certainly willing to learn more if it makes this process easier. Thanks to all who respond!
  13. This is on a multiplayer server. It must work there. I want to breach a door via Slug Ammo. I placed a wooden plank the size of the door in front of it. After two hits the plank gets destroyed and the door opens. I want to use this script multiple times during my mission. Therefore, I don't want n variables counterPlank0 - counterPlankN I want to save the counter locally. Called in init of plank: [this] execVM "scripts\eh_slugBreach.sqf" File: Working with global variable: Not working with setVariable: params ["_object"]; _counterplank = 0; _object setVariable ["counterPlank", _counterPlank]; DIFFERENCE _object addMPEventHandler ["MPHit", { params ["_unit", "_causedBy", "_damage", "_instigator"]; if (currentMagazine _instigator isEqualTo "rhsusf_5Rnd_Slug") then { _unit setVariable ["counterPlank", _counterPlank + 1]; DIFFERENCE }; if (_unit getVariable "counterPlank" > 1) then { DIFFERENCE deleteVehicle _unit; myBuilding animateSource ["Door_1_sound_source", 1]; }; }];
  14. Hello everyone! I am here asking for help with an error I am getting from an eventhandler contained within a custom soldier class config.cpp file. This custom class is the project to make giant and miniature soldiers using setObjectScale. The error comes from a misidentification of a variable. Here is my config.cpp file. I used Drungo's config generator. config.cpp [(_this select 0)] returns an error: type array, expected object... .Please correct me here. I figured that the first variable in the TWZ_Pym_Warriors would be "units[]={"TWZ_Twz_Pym_Little_F","TWZ_Twz_Pym_Big_F"};" and when I flex the little knowledge I have of passing variable from scope to scope I add another "select 0" to identify the first variable, of the first variable in units. However, this returns the error: type object, expected array..... *facePalm*. I am obviously way off here. Would you please explain/show me how to Identify the variable of the body of the unit which I am attempting to execute the code upon.
  15. I'm making an awful inhouse mod for me and my buddies. It's my first time trying to mod anything really and I've gotten a lot farther then I thought I would. I've got everything working except Randomized headgear. I would like the units spawned to use the randomized headgear made for the FIA in the bootcamp DLC but for the life of me I can't get it working. There doesn't seem to be much documentation on config modding in general and the stuff I do find requires trial and error to get working because it's incredibly vague. Anyway I just want another set of eyes to look this over and tell me what I'm doing wrong. class EventHandlers; class CfgVehicles { class B_Soldier_F; class B_Kitbag_rgr; class MO_inf_soldierOB : B_Soldier_F { side = 0; scope = 0; displayName = "Base"; editorCatergory = "MO_csr_fact"; author = "Kaas298"; nakedUniform = "U_BasicBody"; uniformClass = "CUP_U_O_CHDKZ_Kam_03"; backpack = "rhssaf_kitbag_md2camo"; weapons[] = {"hlc_wp_m16a1","rhs_weap_m72a7","Throw","Put"}; respawnWeapons[] = {"hlc_wp_m16a1","Throw","Put"}; magazines[] = {"hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","HandGrenade","HandGrenade"}; respawnMagazines[] = {"hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","hlc_30rnd_556x45_EPR_EMAG","HandGrenade","HandGrenade"}; linkedItems[] = {"rhssaf_vest_otv_md2camo","ItemMap","ItemCompass","ItemWatch","ItemRadio","ACRE_PRC343","ACE_fieldDressing","ACE_fieldDressing","ACE_morphine"}; respawnLinkedItems[] = {"rhssaf_vest_otv_md2camo","ItemMap","ItemCompass","ItemWatch","ItemRadio","ACRE_PRC343","ACE_fieldDressing","ACE_fieldDressing","ACE_morphine"}; headgearList[] = { //"", 0.3, "rhssaf_beret_green", 0.5, "CUP_H_Ger_M92", 0.3, "rhsgref_helmet_pasgt_woodland", 0.1, //"H_FakeHeadgear", 0.7, "H_Watchcap_blk", 0.4, "H_Watchcap_khk", 0.5, "rhs_beanie_green", 0.9, }; allowedFacewear[] = { //"", 0.5, "rhsusf_shemagh_grn", 0.5, "rhsusf_shemagh2_grn", 0.5, "rhsusf_shemagh_od", 0.5, "rhsusf_shemagh2_od", 0.5, "rhs_scarf", 0.5, "G_Balaclava_blk", 0.5, "G_Balaclava_oli", 0.5, "G_Bandanna_oli", 0.5, "G_Balaclava_combat", 0.5, "CUP_G_Scarf_Face_White", 0.5, }; class EventHandlers: EventHandlers { init = "if (local (_this select 0)) then {[(_this select 0), [], []] call BIS_fnc_unitHeadgear;}"; }; }; };
  16. I want a unit to move in a vehicle after respawn but it shows that error code: 17:52:36 Error in expression <_wp = _unit addWaypoint [_pos1, 0];> 17:52:36 Error position: <_unit addWaypoint [_pos1, 0];> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointType "MOVE";> 17:52:36 Error position: <_unit setWaypointType "MOVE";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointSpeed "Full";> 17:52:36 Error position: <_unit setWaypointSpeed "Full";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointBehaviour "Combat";> 17:52:36 Error position: <_unit setWaypointBehaviour "Combat";> 17:52:36 Error Undefined variable in expression: _unit 17:52:36 Error in expression <_unit setWaypointType "GETIN NEAREST";> 17:52:36 Error position: <_unit setWaypointType "GETIN NEAREST";> 17:52:36 Error Undefined variable in expression: _unit the script is activated with this in the unit's init:this addMPEventHandler ["MPRespawn", {[_unit] exec "respawnvehiclescript.sqf"}]; the script: _unit = _this select 0; _pos1 = getMarkerPos "Marker1"; _wp = _unit addWaypoint _pos1 _unit setWaypointType "MOVE"; _unit setWaypointSpeed "Full"; _unit setWaypointBehaviour "Combat"; _unit setWaypointType "GETIN NEAREST"; hint "%1 respawned!!!"
  17. According to BIKI, the IncomingMissile EventHandler is global. (When talking about local/global of EH, we're talking about whether the EH will be triggered on remote vehicles that the EH is assigned to.) However, the author found that this is incomplete. Few days ago in latest CTI MPMissions (ver TZK_2.12 v00) the author add IncomingMissile EH (used for alert) to tanks on all clients but not on dedicated server. The result is surprising that this EH won't be triggered by server-local rockets/missiles. This follows that IncomingMissile EH must be related to client-local rocket/missiles as well. Further tests show that the "command" parameter of addEventHandler about IncomingMissile EH on dedicated server can be empty string, like <a server-remote vehicle> addEventHandler ["IncomingMissile", ""] and the IncomingMissile EH on player clients' can be triggered by server-local rockets/missiles. Thus the conclusion is that although IncomingMissile EH is global, it requires at least an empty EH on remote clients that you wish their rocket/missile trigger this EH. The command of EH can be nothing, but the EH can't be omitted. It would be more clearly if compare with Fired EH. Assume there are 2 clients: call player's client "A", and call a remote client, e.g. dedicated server, "B". On A client Fired EH can be added to all tanks created on "B" to display tracer effect of tanks created by "B". The Fired EH will work for A once any tank of B shoot any bullet. But if A add IncomingMissile EH to B vehicles, the EH won't work if vehicle is attacking by missiles shot from clients except A, unless on the client where missiles are shot from added IncomingMissile EH to that B vehicle as well.
  18. I am attempting to create a rewards script for transport pilots fulfilling their duties. I have it set up to count the passengers, create a starting marker and ending marker, and calculate it, but my waitUntils do not seem to be functioning properly, causing the script to finalize as soon as the Event handler fires. Are Event handlers able to be suspended? Examples: waitUntil {count fullCrew [_vehicle,"",false] >= 2}; waitUntil { ((getPos (_vehicle) select 2) > 25) && (speed (_vehicle) > 30) }; If it is not suspendable, I guess I will have to make addActions for Transport begin, and Transport ended; but if it gets crazy at the LZ, remembering to do that may be a issue.
  19. I've been hitting my head against a wall for a few days trying to sort this issue. I have a script (see below) that I wrote for a firing range. It works perfectly in SP and on locally hosted servers. I am having issues with it on the dedicated server. I dug through the (recent) topic below and have attempted tweaks off of that to no avail. https://forums.bohemia.net/forums/topic/221167-addmpeventhandler-not-working-on-dedicated-server/?_fromLogin=1 I feel like my issue is lying somewhere in the eventHandler not updating the score variables for some reason. I am not sure why it would be working on a local host and not dedicated. Below is the first snippet of the script down to where I added the first check to see if the EHs were working. Any help offered would be greatly appreciated. My head hurts and I'm afraid I'll dent my wall if I keep hitting it. PS. I am using the targetHumanSimple because it does not fall when it gets shot. I did this so the shooter has to observe the bullet strike and does not have a visual aide. I don't think this would make any difference but full disclosure is full disclosure.
  20. Hi, I'm still looking for the best way to manage some revive heal in SP and MP session. SP works fine but I can't find a reliable solution for MP, with the EH handleDamage. Restarting from the basement, I'd like to share this test I can't explain the result: I placed 2 playable groups in editor. and 1 trigger (true) to run this code: {_x addEventHandler ["handleDamage", { params ["_unit","","_dam"]; hint str (getAllHitPointsDamage _unit); _dam min 0.86 }]; } forEach allunits; This code is running on each hosted/clients. The EH is supposed to limit all the hits at 0.86 max. This way the unit is wounded but never die (OK in SP or units on hosted server). PS: I know, I can write the hint inside of a loop rather than inside of the EH, but that doesn't change anything for the following issue: If I JIP on the 2nd group leader, so the group will be remote to the client's PC. The group owner changes. Normal. Then if I continue to fire against these remote units, the EH still fires (I can see the new value for getAllHitPointsDamage), so the hint is "ok" then the EH code runs but the remote units die! - I can shoot the units of my group: they never die, - all remote units are dying... Everything goes as the EH fires locally (normal: E.L.) but this localization is not updated to the new localization of the unit! This EH is hard to manage, even for so small behavior as modifying a value for hit damage. I miss something, probably. Any help appreciated. Thanks.
  21. Hey guys, I would like to add for my players the ability to use an action which would only appear to them if they met a specific criteria. The criteria is to have a specific backpack and inside it, a specific item. I got the script responsible for the condition working, but only once I put it in the init.sqf. If I did it that way, the action would appear and remain available even after the condition was no longer fulfilled (the object being dropped for example). Naturally, I'd like to remove the action if the condition was no longer met. I basically do not know how to check for the condition so that it always pops up for the player once he meets that criteria. This is the script that I don't know how to call: if ((unitBackpack Player isKindof "tfw_ilbe_a_gr") && ("tfw_rf3080Item" in (items player + assignedItems player))) then {Player addAction ["Test Action", "test_action.sqf"];} Thanks!
  22. Hey! If I want to add eventHandlers to: EDIT: class CfgVehicles { class Man; class CAManBase: Man { class EventHandlers { addEventHandler ["GetInMan", {[player] call Salmon_fnc_function}]; addEventHandler ["GetOutMan", {[player] call Salmon_fnc_function}] }; }; }; How would I go about doing that? I want to call a function every time a player with the mod loaded gets in or out of a vehicle.
  23. Hello Armaholics! I must admit I'm very bad when it comes to scripting. Is there a easy way to have a trigger activate when you have closed a leaflet after you've read it. Couldn't find anything on leaflets on the wiki regarding event handlers. I'm using this for the leaflets: ["init", [this, "image.jpg", "Text message"]] call BIS_fnc_initLeaflet It will be used in a upcoming horror mission this halloween. Thanks in advance! :) Some of my missions: [CO-04] Last Stand - Bunker [CO-04] Last Stand - Compound [CO-04] Last Stand - Town [CO-04] Terrorist Hunt - Village [CO-04] Terrorist Hunt - Factory
  24. What is the best way to create and eventhandler for currentThrowable items? I want an event handler to track every time I throw a throwable, so when my player's inventory of "HandGrenade"or "SmokeShellGreen" is depleted I can refill it. I have tried to use an "explosion" EH with the following but does not work as _throwableArray is an array of strings, and I can't figure out how to create an array of throwables on the player...Also I don't think this would work for a "SmokeShell" _throwableArray = []; { if (_x == _throwable) then {_throwableArray pushBack _x} } forEach (magazines player); { _x addEventHandler ["Explosion", { params ["_vehicle", "_damage"]; if (damage _vehicle > 0.1) then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }]; } forEach _throwableArray; I have tried to use "AnimDone" EH, but could not even find the common animation for throwing... player addEventHandler ["AnimDone", { params ["_unit", "_anim"]; if (_anim == "AmovPercMrunSlowWpstDf_AmovPercMstpSrasWpstDnon_gthThrow") then { if !( _throwable in (magazines player) ) then {for "_i" from 1 to 3 do {player addItemToVest _throwable};}; }; }];
×