Search the Community
Showing results for tags 'event handler'.
Found 12 results
-
Can't catch BIS_fnc_kbTellLocal_played by addScriptedEventHandler
Nick Gotvyak posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
So, lately I've been trying to make NPCs "forward" their radio communications to player object, so later I can extend it to High Command module. I've tried many methods, of which the only semi-functional was by catching some events like commandChanged, enemyDetected etc. After some time I stumbled upon kbTtellLocal, which fires a scripted event on this line: [missionnamespace,"BIS_fnc_kbTellLocal_played",[_from,_to,_sentence,_channel],true] call bis_fnc_callScriptedEventHandler; Here is the code that tried subscribing to it in init.sqf. Unfortunatelly, it doesn't work even in cases when player is in the channel, to which initial sentence was intended [missionNamespace, "BIS_fnc_kbTellLocal_played", { params ["_from", "_to", "_sentence", "_channel"]; systemChat "Code ran!"; }] call BIS_fnc_addScriptedEventHandler; Am I misunderstanding something about kbTell, handlers or Converstations in general? -
EnemyDetected Group Event Handler fires multiple times
kibaBG posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
The problem is very strange ... I am trying to script so defenders of a building use a flare to "call reinforcements" (spawn reinforcements) at some distance and then send then against the attacking players. _garrGRPA = [(position structA), independent, ["rhsgref_cdf_reg_squadleader","rhsgref_cdf_reg_machinegunner","rhsgref_cdf_reg_grenadier_rpg","rhsgref_cdf_reg_marksman","rhsgref_cdf_reg_specialist_aa"]] call BIS_fnc_spawnGroup; [_garrGRPA, (position structA)] call BIS_fnc_taskDefend; {_x linkItem "rhs_1PN138"; _x setUnitPos "UP"; _x disableAI "PATH";} forEach units _garrGRPA; (leader _garrGRPA) addWeaponGlobal "rhs_weap_rsp30_green"; _garrGRPA addEventHandler ["EnemyDetected", { (leader _garrGRPA) forceWeaponFire ["rhs_weap_rsp30_green", "Single"]; _sposReinfGRPA = [(position structA), 100, 300] call BIS_fnc_findSafePos; _reinfGRPA = [_sposReinfGRPA, independent, (configfile >> "CfgGroups" >> "Indep" >> "rhsgref_faction_cdf_ground" >> "rhsgref_group_cdf_para_infantry" >> "rhsgref_group_cdf_para_infantry_squad")] call BIS_fnc_spawnGroup; _reinfGRPA deleteGroupWhenEmpty true; }]; First problem is Sl of defenders don't fire the flare straight up, second problem is the event handler fires multiple times with no end spawning so many groups the mission becomes unplayable. My intent is to spawn only one wave of reinforcements, not whole China. -
Revive player over distance with pistol
MinervaArts posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi guys, I'm currently working on a script that will allow a player to shoot another unconscious player and then revive him immediately. I already have the revive system ready, but I haven't found a way to make it so that only the player who was shot is revived. Do you have an idea how I can make it so that the code is only executed on the player who was hit? I have already tried to rebuild a taser script but didn't really get anywhere. Thanks for your help!- 2 replies
-
- event handler
- scripting
-
(and 2 more)
Tagged with:
-
Clientside OnPlayerDisconnected Event Handler
kaleb c0d3 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sup all! Do you know if there's a event handler that fires from the client side when the player disconnects? I'm working on a survival mod wich persists player info into a database, and need to force an update when the client disconnects. If I use the serverside events (HandleDisconnect, onPlayerDisconnected, and so on), some player data is not available because the client is no more online, and cannot query for it. Thanks in advance.- 4 replies
-
- event handler
- client
-
(and 1 more)
Tagged with:
-
ACE Medical: Change Wound Type When Hit
SeelieKnight posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm trying to come up with a way to change the wounds inflicted by bullets in the ACE medical system. For example, if shot with a bullet, change the possible wounds from 'avulsion'/'velocity wound'/etc. to 'bruise'/'crushed tissue'. Ideally I'd like to alter the values that are passed to ACE woundsHandler function, but I'm not sure how all that is implemented. Anyone got insight on this?- 2 replies
-
- ace
- ace medical
-
(and 1 more)
Tagged with:
-
Help - Detecting Kill Assist
GaryTheNoTrashCougar posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Is it possible to detect if a player has damaged a unit but another unit has killed that unit (kill assist)? I am using a Killed event handler for the unit that is killed & trying to combine that with a HitPart event handler but I can't get my head around the logic. in HitPart EH: playerShooting = (player isEqualTo _shooter); unitShot = _target; in Killed EH: if (playerShooting) //Obviously player is not the shooter when the unit is killed then { if ((_killed isEqualTo unitShot) && !(vehicle player isEqualTo _killer)) then {....blah blah Kill Assist}; }; also tried to use ((damage _target) < 1), but this is not true when _target is killed. Is there a way to check if the player dealt the damage? -
Need help with fired event handler - PLEASE HELP ME!!!
Nicole_UK posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey everyone 😀 Iv been stuck with this issue for AGES now and cant work out what to do, can someone please help me?! Basically im making a mission where the AI shouts when firing their weapon (like a warcry) I have implemented the sounds fine and I can get them to shout when firing which is great but they shout EVERYTIME they fire so the sounds are kind of overlapping and constantly been played. I dont want my AI to do their warcry everytime they fire their weapon maybe like 50% of the time or something. Is there a way i can set it to play every other time they fire their weapon (maybe every 3rd time? or at random?) so there is no overlapping and it sounds more like realistic shouting? This is the event handler im using: this addEventHandler ["Fired", { params ["_IS1"]; _IS1 say3D "akbar1"; }]; Im sure there is a very easy fix for this that someone will know of but i cant find an answer anywhere - if someone can help me id really appreciate it! 👍- 5 replies
-
- event handler
- say3d
-
(and 1 more)
Tagged with:
-
How to find an even handler's code?
Leopard20 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Due to incompatibility between some event handlers of the same type, one might need to remove the other event handlers. But there are times where you might need to reuse the old EHs. For example, let's say I want to create a "HandleDamage" EH which reduces the unit's damage, but I also have ACE running which interferes with this. So I'll have to remove the ACE's EH. However, if I were to use ACE again, it wouldn't work because its EH has been removed. Is it possible to somehow remove an event handler temporarily? As in removing the EH but saving its code for later use? -
examples Script Test Lab and Workshop
wogz187 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Test Lab Workshop for ARMA III, ver. BETA 0001 (2019) This download is compatible with APEX game version 1.7 and higher Drive Link Download: Test Lab New Live readMe file This download includes mission editor files. When my mission folder began to overflow with script test scenarios and VR compositions, I decided to create a master workshop file to use in the future. I considered what features should be built in. Hopefully this tool will be helpful for you, too. INSTALLATION Install the folder 0_testLAB.VR to your ArmA 3 mission folder (usually in Documents). Examples included: Images: Video: THANKS to everybody at: Bohemia Forums Check out our Patreon page Ascina Illustration & Design Arma Public License No Derivatives (APL-ND) -
Testing for presence of an Event Handler
atmo posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I probably being stupid again, and I suspect I have missed it already in the forums.. How do I test an object for the presence of an event handler? There seem to plenty of commands to add and remove them... I noticed @Larrow used !( isNil { _x getVariable "HitEH" } ) in a post recently.... Is that the same for all EHs? So reloaded would be "ReloadedEH"? I ask because I am transferring objects from servers to clients/HCs and I am not sure if they transfer with some or all of their respective EHs etc.... I am trying to test this but I would like to ask the community for a comprehensive answer before trying to test every single one.... Atmo -
When a display is closed, are its added event handlers removed?
Leopard20 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hey guys. I'm making a mod which creates a display every time the user presses a key. I also add some keyDown event handlers to this display. I was wondering whether or not I should add the keyDown event handler every time it's created? In other words, when a display is closed, are its added event handlers removed or not?- 5 replies
-
- event handler
- display
-
(and 1 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)