Arma 3
Animated Grenade Throwing - Additional Grenade Compatibility
Apricot_ale  [developer] 5 Jul, 2024 @ 8:17pm
Technical details:
ACE's special grenades (Flashbang M84/CTS9, Incendiary AN/M14, Hand Flares) detonate when they get a "fired" event, but AGT's throwing of grenades is executed by "createVehicle" the grenade.

Therefore, it does not go through the shot judgment and is not executed. Also, even if the script is called, it does not work by itself because it does not have enough values ​​to execute.
Therefore, a dedicated compatibility script that requires only the minimum necessary values ​​was needed. (Ver 1.0)

However, it does not work properly by itself. It seemed fine in single player, but there was a problem on the server where the explosion could not be observed by others.
This is basically due to the fact that the script that should be executed on the server is only executed locally when called from AGT. So we changed the script so that it could be executed on the server side. (Ver 1.1)

However, this was pointless because even if it was processed on the server, the explosion could not be observed at all on the client.
So we adjusted the script for the detonation part so that it would be executed on all machines (server + all clients). This worked well. In fact, at this point, the flares and incendiaries worked properly. Flashbangs also worked as required, and seemed to work "looks" fine in multiplayer. (However, it no longer worked properly locally, which was a simple mistake.) (Ver 1.2)

However, there was one problem with the flashbangs when executing the function (playsound3D) that plays the sound on the call "bangsoundscript"(not true name). This is because Arma3's default function synchronizes the sound to all clients. In other words, if the call is made on all clients, the sound is called on all clients, and as a result, the number of explosions heard is equal to the number of people. This is hard to say that it is works fine.
So I made further modifications more and more. I reproduced the call "bangsound" script in an AGT compatible script, and modified the script so that the sound playback is only performed locally. (playsound3D originally had this function, but it required a syntax change.) By doing so, it was finally found that the script worked properly in the test version, and I was able to achieve a complete solution. (Ver 2.0)



In reproducing the script, I decided not to reproduce the current version of ACE (ace3 3.17.1), but to imitate the script that will be included in a future release (probably ace3 3.18.0). This allows you to safely change the sound of the flashbang just by specifying it on the config side without changing the script, and some sounds have been changed to play randomly.
I decided that it would be better to leave it as it is now if there is no problem, rather than dealing with it in a future update. Therefore, the sound of the throw in AGT may be slightly different from the original ACE/vanilla throw, but in the future it will be the same sound.

It's been a long time (a week?), but I'm really glad I was able to make this compatible. If 0-0/Cucumber wants to incorporate this script into their mod, I'd be very happy. Their PIR, RCC, and AGT are really great. (Also, I personally like the Russian helmet.) Thank you so much to them for giving me the opportunity to work on it.
Last edited by Apricot_ale; 5 Jul, 2024 @ 8:19pm
< >
Showing 1-1 of 1 comments
Quack 21 Jul, 2024 @ 1:34am 
thanks man, makes it so I can use the other m84s now :)
< >
Showing 1-1 of 1 comments
Per page: 1530 50