Jump to content

Dj Rolnik

Member
  • Content Count

    143
  • Joined

  • Last visited

  • Medals

Everything posted by Dj Rolnik

  1. Hey, I am in need of help with trigger conditions checking whether there are enemy units (OPFOR) present inside vehicles such as jets, helicopters or boats. The idea is to have the trigger check whether enemy aircraft (or boats, but that's really low priority and optional) is approaching a large location covered by a trigger (about 10+km in size) and when that happens, launch an alarm sound effect in a certain place on the map (possibly not the trigger itself, because they are supposed to be placed in different locations). The important thing is that it's not only OPFOR - present, as the activation type, but OPFOR units in aircraft-type vehicles. An extra nice-to-have feature (if even doable) would be to display a hint or any kind of message on the screen informing about the type of aircraft incoming (not necessarily the name of the specific type of aircraft, but rather its type, so in that case "helicopter" or "jet"). I would be grateful for help in defining this condition! Thanks! Adam
  2. Seems to be working, thanks a lot for your help @stanhope! Now that it does work I think that I may have incorrectly set up some other things in the mission which may have triggered the sound twice, not the original script provided by you in the first post. Anyways, I will dig a bit more but for now this solution does work, so thanks a lot again!
  3. Ok, so I tested it a little bit and the condition check is working ok. It does detect the aircraft and activates the trigger. Once it leaves the trigger it deactivates. I have actually not managed to get the display name of the aircraft type displayed - it spewed some kind of error, but I actually decided not to use this as it suited the scenario better. I have a different problem though. Currently whenever one aircraft enters the trigger it activates it. However, if more aircraft were to enter the trigger activation zone in small intervals, the trigger will activate a few times, once per each enemy aircraft. This is a problem because the trigger runs a sound script on activation which triggers an alarm and when more aircraft enter the trigger zone the sounds queue up and overlap each other. I imagine there is got to be some kind of check whether the trigger is still active and if it already is, not trigger it again, but I don't know how to do that 😞 Currently the triggered script looks like this: while {triggerActivated trigger_alarm} do { speaker1 say3D ["alarm1", 250, 1, false]; speaker2 say3D ["alarm1", 250, 1, false]; speaker3 say3D ["alarm1", 250, 1, false]; speaker4 say3D ["alarm1", 250, 1, false]; speaker5 say3D ["alarm1", 250, 1, false]; sleep 14.284; //duration of the sound }; Any ideas? Maybe something to do with this? https://community.bistudio.com/wiki/scriptDone Thanks! Adam
  4. Ah yes, I see what you mean. I kind of blanked and forgot how the trigger is going to be set up. Will try that as soon as possible : )
  5. Hey @stanhope Thanks for a quick reply, I will give this a try. Does this include a check for whether it's an enemy plane? That's a crucial component for all that 😉 Thanks!
  6. Dj Rolnik

    Disable Vehicle Panels

    Does this work work UAVs as well? I cannot seem to get this to work with the latest drone form the Contact DLC.
  7. 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!
  8. Thanks a lot for your suggestions guys! I actually did not think about the performance aspect of the script, you're right. I will try to digest your suggestions and come back with the results probably in the next few days. Unfortunately I lack some thorough scripting knowledge so I do struggle with event handlers and most importantly where to call all those scripts from, but I will try to solve it. I really appreciate the feedback. Thanks!
  9. Hey guys, I was recently thinking of something that I saw in a separate mod, which is unfortunately not being developed any more, strictly speaking, radio jammer for radio controlled IED detonations. There is a mod which comes with a backpack item that has that option but it naturally only works for the explosives provided by that specific mod. I would, however, like to try and incorporate the same mechanism but to the ACE Explosives. Turns out there is a function for that but I am not skilled enough to implement it using my scripting skills. I have found this: https://ace3mod.com/wiki/framework/explosives-framework.html#53-detonation-handler At the very bottom of the page there is a section which seems to be doing what I need it to do, which is block all the detonations of radio controlled explosives (such as the cellphone). I was thinking about using this code possibly in a form of a switch that the player could use. Similarly to the backpack from the other mod, it could be whatever item that the player can have (possibly some kind of a backpack as well) that would have the ON and OFF switch. Those switches would then control whether the Cellphone detonation of an IED is possible or not. Another thing I found was that Achilles actually seems to have a similar functionality but it appears to be restricted to Zeus-placed objects via this specific module as well as looks to be "jammable" only by an actual vehicle. I will need to test this one today tho. https://github.com/ArmaAchilles/Achilles/wiki/Module-Information I would be very grateful for any help in terms of how to achieve that result possibly using that first bit of code. Thanks a lot! Adam
  10. Yep, it did work just as expected. Dropping an object removes the action and adding it back in brings the action back. Thank a lot @cb65!
  11. Dj Rolnik

    ACE 3 Explosive jammer

    Ok, so for now I have tried the code provided in the ACE3 Framework wiki, copied below: [{ params ["_unit", "_range", "_explosive", "_fuzeTime", "_triggerItem"]; if (_triggerItem == "ace_cellphone") exitWith { systemChat "Blocking Cell Phone"; false }; // always block cell phones if (_triggerItem == "ace_m26_clacker") exitWith { _range = _range / 1000; private _actualRange = _unit distance _explosive; systemChat format ["Limited Range For RF Clacker [%1m / %2m]", _actualRange toFixed 1, _range toFixed 1]; (_actualRange < _range) // return bool }; // allow anything else (like timers / wired clackers) true }] call ace_explosives_fnc_addDetonateHandler; I have copied all that into a separate .sqf which I run on a simple addAction - works just fine. However, I cannot seem to revert the process. I would still like to turn the jammer off but cannot understand which parameter I would need to change in order to do so. Any advice? Thanks!
  12. Dj Rolnik

    ACE 3 Explosive jammer

    Thansk for the quick response @Dedmen. To be honest I am not planning on using the other mod, just used it as an example which I got the idea from and then found the function in the ACE 3 Framework page. I am still curious as to how the original mod creators managed to add that turn on option. It is literally a backpack with a few replacable antennaes all of which stand for the jamming range. Once you have that backpack you have a scroll wheel option to turn it on and off. It even blocks TFAR comms (as it's RF jam in the end). I sure will try your solution today too. Will see how it goes but I am still open for any other suggestions. Thanks!
  13. Hey guys, I am thinking of changing some tank reload sounds for use with my group. I am considering changing some of the default reload sounds of the round being loaded to a couple different ones. Only thing is, I'd like it to be kind of random across several different sounds. I already figured I would need to make a small mod out of it that would override the files that tanks use (in this case I believe it's default vanilla tank reload sfx). I think I would be able to override the sound itself, but I would like to have a few variants of the reload sfx which would be chosen and played at random. Is it possible to script in any way? I will be thankful for any guidance in this regard. Thanks! Adam
  14. Dj Rolnik

    Ambient battle sounds Module

    Hey guys, I know it's kind of a revival of an old thread, but worth a shot nonetheless. I have a different problem. For some reason when the mission is launched on a server, it does not seem to read the module settings I used in the editor, namely the volume, distance, etc. I tried it solo and found the settings that worked for me, but then when launching it on a dedi, it just reads some other, much louder settings which are rather unfitting most of the times. Anyone had this problem before?
  15. Dj Rolnik

    Disable AI going prone

    I have no idea if you ask me - it may well be the case that it was just fixed somewhere on the way : )
  16. Dj Rolnik

    Disable AI going prone

    They're basically the same things, just one is a big discussion on the BI Forums and the other is a repost on Reddit. Sure, I can share this, no problem. Unfortunately I am not sure how to attach files to posts, so had to generate a link, sorry for that... I left out the raw folder just for ease of modification :) https://www68.zippyshare.com/v/HdEQcsCw/file.html - it's a whopping 866 bytes so shows as 0 MB ^^ Otherwise, it's just a config.cpp containing the below code from @.kju's first link - packed into a PBO. class CfgSurfaces { class Default { AIAvoidStance = 2; }; }; Thanks again!
  17. Dj Rolnik

    Disable AI going prone

    Wow, thanks for so many responses guys! I took a look at all of them and I indeed needed something that would work for spawned units as well, so I could not just assign a scirpt to a specific group. The solution from @.kju works flawlessly - I made a small local mod out of it and works like a charm! I may try out @GEORGE FLOROS GR's solution too, as in some missions I actualy may want the AI to lie down except for buildings - thanks for sharing the script man! Thanks all for your help - that's a big thing!
  18. Dj Rolnik

    Spawn stun grenade effect

    Thanks @davidoss, I will surely check this out as soon as possible. Dzieki! ;)
  19. Hello, I am looking for a solution for spawning a flashbang effect, possibly on a marker, invisible helipad or possibly using any other way that works best and can be customized for future use. So far I was trying to spawn the grenade using the createVehicle command and getting a position of a marker. Two problems I have are: - Flash/stun grenades do not explode on spawn, they appear for a few seconds and then disappear entirely (I've checked smoke as well as frag grenades and those two do work fine) - The command spawns a literal grenade which can be seen physically, whereas I am looking for it to either explode on spawn (for the grenade itself not to be seen) or for it to trigger only the effect instead. The command is supposed to be a supplement to door breaching on action and is supposed to affect AI as well. I believe that the effects of the ACE M84 grenades do, so that would be the ideal solution. Thanks for any suggestions! Adam
  20. Dj Rolnik

    Spawn stun grenade effect

    ;) I am using the ACE3 mod in all of my games. If there is any way to incorporate the ACE3 addon to achieve that effect, I am perfectly willing to give it a shot. Problem is I have no idea how to achieve that. I am still open for suggestions if anyone knows a potentially working solution for this. Thanks!
  21. Hello, I am in need of your guys's help when it comes to calling some functions or simply executing scripts for each player individually within Multiplayer. With the help of some friendly folk from the BI Forums I managed to come up with the below script. However, long story short is: I wanted to make a "civilian interaction" script which would allow all players to order civilians to "Get Down!" as well as "Get Out!". It is supposed to work after player respawn as well, so that's also worth pointing out. The script works fine until the point we connect to MP. From there it works only for my character (the civilian gets down and leaves the area when issued), but it does not work for other players on the server. They just play gestures and screm the voicelines I put there, but the civs do not react. I dare to believe it is due to how the script is called, where it is placed and probably something with the locality of the script and the civs called by it, if you may. I have tried calling functions, placing it in initPlayerLocal.sqf, but for the love of me, I cannot figure it out... This is how it looks currently: initPlayerLocal.sqf if (side player == blufor) then { player addAction ["Na ziemię!", {cursortarget call CivDown}]; player addAction ["Wynocha!", {cursortarget call CivGoAway}]; }; acim_fnc_playActionNow = { _unit = _this select 0; _gesture = _this select 1; _unit playActionNow _gesture; }; CivDown = { _civ =_this; _side = side _this; if (( _side == Civilian) && (_civ isKindOf "Man") && (alive _civ)) then { _random = 6; _randomResult = floor(random _random); switch (_randomResult) do { case 0: {[player, "get_down_on_the_ground"] call CBA_fnc_globalSay3d;}; case 1: {[player, "get_down"] call CBA_fnc_globalSay3d;}; case 2: {[player, "freeze"] call CBA_fnc_globalSay3d;}; case 3: {[player, "freeze_2"] call CBA_fnc_globalSay3d;}; case 4: {[player, "stop"] call CBA_fnc_globalSay3d;}; case 5: {[player, "stop_right_there"] call CBA_fnc_globalSay3d;}; }; [player, "gestureGo"] call acim_fnc_playActionNow; sleep 1; if (player distance _civ < 40) then { _civ disableAI "MOVE"; sleep 0.3; _civ setUnitPos "DOWN"; _civ setBehaviour "CARELESS";} }; }; CivGoAway = { _civ =_this; _side = side _this; if (( _side == Civilian) && (_civ isKindOf "Man") && (alive _civ)) then { _random = 6; _randomResult = floor(random _random); switch (_randomResult) do { case 0: {[player, "move_it"] call CBA_fnc_globalSay3d;}; case 1: {[player, "go"] call CBA_fnc_globalSay3d;}; case 2: {[player, "move"] call CBA_fnc_globalSay3d;}; case 3: {[player, "get_the_hell_outta_here"] call CBA_fnc_globalSay3d;}; case 4: {[player, "move_your_ass"] call CBA_fnc_globalSay3d;}; case 5: {[player, "off_you_go"] call CBA_fnc_globalSay3d;}; }; [player, "gestureGo"] call acim_fnc_playActionNow; sleep 1; if (player distance _civ < 40) then { _civ enableAI "MOVE"; sleep 0.3; _civ setUnitPos "UP"; _civ setBehaviour "COMBAT"; _civ move (waypoint_trigger call BIS_fnc_randomPosTrigger);} }; }; I have also created a onPlayerRespawn.sqf which looks basically the same in case the action gets lost, so since the current state requires the script to work after respawns, it leads me to believe that all of it should not be placed in initPalyerLocal in the first place. I will be extremely grateful for someone helping me out with making the script work for all players and allowing them to order civilians to move. Thank you! Adam
  22. Confirmed! Working as expected. Triggers now activate only for the players who enter them. Thanks a lot @Larrow!
  23. Hello everyone, I am looking for help in regards to the BIS_fnc_infoText command which is supposed to trigger a small prompt in the bottom right corner of the map with some details on the location. Currently I have a trigger placed over an area and the trigger is set up to repeatable and triggered by blufor present. The trigger onActivation field points to a script which has this in it: any= ["SHAPUR-3", "Coordinates:", mapGridPosition player ] spawn BIS_fnc_infoText; Whenever I join a test server with a friend and I trigger the command, we all see it - it appears to be global. What I would like to achieve though is trigger this option for each player individually, whenever they enter the trigger zone. So far I have not managed to achieve it, not sure if that's even possible with this command, but I would appreciate any help that I can get. Thanks a lot! Adam
  24. Thanks Larrow! That's a solid explanation, I think I do get this now. Will try the solution you provided when I get back home and report back. Cheers! Adam
  25. Bumping this topic. Can anyone please advise how can I make the actions work for all players in the game? Thank you in advance.
×