Jump to content
Sign in to follow this  
thy_raven

chopper chainguns and shilka

Recommended Posts

cool, thank you greatly deanosbeano, that looks amazing, its strange, i thought the chopper woulda been simpler, but that is awsome.

As for BIS, i'm sure they have their hands full fixing more important things atm, thats why i wanted a mod/script. i think it would be a shame if they didn't include this later on, but if some of us come up with all the scripts etc to make it work, i don't see why they wouldn't include it in an upcoming patch. until then hopefully there might be a work around, also when i was messing around i noticed the harrier does the same when firing its main MG. i wasn't sure whether this is intentional or whether harriers are actually supposed to have 2 front firing MG's.

Share this post


Link to post
Share on other sites
you can solve it by adding an eventhandler to the shilka but for the helo it would need a math genius or use a drop command which can spawn a shape at the muzzle_2 and tthen take those velocities and coord and place a bullet there .(mind boggling huh). too much for me

Actually, it would be easier to add a 2nd, 3rd and 4th weapon to the shilka, and force them to fire when the EH detects the firing of the first (main) weapon.

That way you dont need any of the drop command or physics calcs, and you still retain the kill "ownership" without having to script that too.

IIRC the shilka fires sequentially, so you could even add that to the script too. smile_o.gif

Share this post


Link to post
Share on other sites

i'm liking the sound of this more and more every minute. that sounds incredably promising for the shilka, what about the Chopper? could the same be applied to that? using mulitple weapons?

Share this post


Link to post
Share on other sites

It wouldn't take any math at all really. You'd just have to give the 2nd projectile the same vector and velocity as the real one (which you can get with commands).

And about the FFARs, you can fake them as gunpod rounds like we did on the Hinds but it's not perfect especially for miniguns on an AH-6. And no you can't do it for the Shilka, like I said FFARs don't work on turrets. And yes I know missiles do work on tank turrets but that's different, and there's still only 1 firing point.

Share this post


Link to post
Share on other sites

can't the princliple of adding extra weapons that fire in tandum (like that suggested for the shilka) be used on the AH-6? can't you just add a second gatling gun to the other side and add a script like that for the shilka? save messing around with FFAR's at all? or does that script only work because the shilka has a turret?

Share this post


Link to post
Share on other sites
can't the princliple of adding extra weapons that fire in tandum (like that suggested for the shilka) be used on the AH-6? can't you just add a second gatling gun to the other side and add a script like that for the shilka? save messing around with FFAR's at all? or does that script only work because the shilka has a turret?

I actually tried this before in OFP, sounded good in theory but trust me in practice it's not that great. The first problem is that you can't have all the weapons available for the player to use at the same time, the only way to do this is to remove the weapon after each time it's fired. But in OFP this caused the camera to recenter every time, so it was very twitcy and just annoying. Second, it would cause problems with rearming the shilka (or disarming it). Long story short, it'd cause more problems than it'd solve, believe me.

Share this post


Link to post
Share on other sites
can't the princliple of adding extra weapons that fire in tandum (like that suggested for the shilka) be used on the AH-6? can't you just add a second gatling gun to the other side and add a script like that for the shilka? save messing around with FFAR's at all? or does that script only work because the shilka has a turret?

I actually tried this before in OFP, sounded good in theory but trust me in practice it's not that great. The first problem is that you can't have all the weapons available for the player to use at the same time, the only way to do this is to remove the weapon after each time it's fired. But in OFP this caused the camera to recenter every time, so it was very twitcy and just annoying. Second, it would cause problems with rearming the shilka (or disarming it). Long story short, it'd cause more problems than it'd solve, believe me.

Thats where your problem lies - you're still thinking inside the OFP "box."

Its perfectly feasable to add a 2nd minigun (hidden from the player) and force it to fire via script (when the player fires the primary minigun)

As for the specifics of how you'd get the script to fire the 2nd gun, I havent investigated yet, but it should be possible.

Share this post


Link to post
Share on other sites
can't the princliple of adding extra weapons that fire in tandum (like that suggested for the shilka) be used on the AH-6? can't you just add a second gatling gun to the other side and add a script like that for the shilka? save messing around with FFAR's at all? or does that script only work because the shilka has a turret?

I actually tried this before in OFP, sounded good in theory but trust me in practice it's not that great. The first problem is that you can't have all the weapons available for the player to use at the same time, the only way to do this is to remove the weapon after each time it's fired. But in OFP this caused the camera to recenter every time, so it was very twitcy and just annoying. Second, it would cause problems with rearming the shilka (or disarming it). Long story short, it'd cause more problems than it'd solve, believe me.

Thats where your problem lies - you're still thinking inside the OFP "box."

Its perfectly feasable to add a 2nd minigun (hidden from the player) and force it to fire via script (when the player fires the primary minigun)

As for the specifics of how you'd get the script to fire the 2nd gun, I havent investigated yet, but it should be possible.

Possibly, but you'd still have problems with ammo count, rearming, etc... it still wouldn't be perfect.

Share this post


Link to post
Share on other sites
Possibly, but you'd still have problems with ammo count, rearming, etc... it still wouldn't be perfect.

Ammo count wouldnt be a problem, as the 2nd minigun would be configured exactly the same as the primary gun. You might get a discrepancy of 1 or 2 rounds, but since its being fired dependant on the EH on the primary gun, it will discharge its mag at the same rate.

Rearming - well i've not had much experience with rearming yet in arma, but if it works the same (or similar) way as OFP, rearming from a truck shouldnt be an issue, since it just pushes up the ammo count until full/depleted.

As long as the user is mindful of the requirements of the 2nd gun when adjusting the ammo load, there shouldnt be any of the OFP style problems, since it is a normal, configed gun, rather than a script hack smile_o.gif

Share this post


Link to post
Share on other sites

The whole point of this conversation is that the ah6 fires out of only one gattling gun, and it's not possible to use the same procedure for tanks wink_o.gif

Share this post


Link to post
Share on other sites

hmm looks like i mistook the point on the helo guns, the shilka script i posted will work for that too, ya just need to mess with _relpos.

it wont register your kill unless the bullet that kills what you aim at is the original bullet you fired .

all this fixing needs to be done in the addon ,but it makes for fun ,for now.

change the bullet type ,list in wiki and have yaself some real fun smile_o.gif

you can even fire men out of the gun if your that way out :0

Share this post


Link to post
Share on other sites
hmm looks like i mistook the point on the helo guns, the shilka script i posted will work for that too, ya just need to mess with _relpos.

it wont register your kill unless the bullet that kills what you aim at is the original bullet you fired .

all this fixing needs to be done in the addon ,but it makes for fun ,for now.

change the bullet type ,list in wiki and have yaself some real fun smile_o.gif

you can even fire men out of the gun if your that way out :0

Instead of spawning another bullet, couldn't you just setpos every 2nd bullet?

Share this post


Link to post
Share on other sites

could always check if memory points are happy to be animated in arma, and then rotate the memory points 90 degrees every shot so that while it isnt exactly 4 barrels at once, after 4 shots each barrel has fired one round.

another simple work around without scripts, although it relies on the ability of memory points to be rotated.

Share this post


Link to post
Share on other sites
Quote[/b] ]Instead of spawning another bullet, couldn't you just setpos every 2nd bullet?

you could and thats good thinking.

unfortunately it adds to the unstable nature of the fired event handler (it is however not so bad on burst or auto firing weapons) but on a single firing such as ak or m16 it dosent like it unless you shoot the ground infront of you within 20 feet.

but setpos is a little unstable and the init speed and velocity of the bullet makes the engine work hard to start setposing them ,

i will try it myself however because all avenuues should be explored.

also any settings above normal and the engine no longer likes the

fired eventhandler , i presume its like the human body , it will only feed the major organs at time of hardship or struggle . smile_o.gif.

like the way you think tho .

another good one for this kind of script is try it with a sabot round from a tank and add a loop so it tracks the shell .

then spawn a new shell on death of the first . and set its velocity - _sx,_-sy,-_sz , it deflects off the thing it hits.

to make it look right you need to delete the first shot spawn a dummy round tho and i dont have any dummy tounds at the mo smile_o.gif.

plus i think this type of code is better for the sqf type scripter ,of which i am not one .YET

Share this post


Link to post
Share on other sites
Quote[/b] ]could always check if memory points are happy to be animated in arma, and then rotate the memory points 90 degrees every shot so that while it isnt exactly 4 barrels at once, after 4 shots each barrel has fired one round.

why just not setpos the bullet at the different memory points (one for each barrels's muzzle)? It's easier, once you can edit p3d models.

Quote[/b] ] unfortunately it adds to the unstable nature of the fired event handler

in OFP it was not unstable: it was pretty rock-steady in my opinion. What's the problem in Arma, Deanosbeano?

Quote[/b] ]Instead of spawning another bullet, couldn't you just setpos every 2nd bullet?

I think yours is the better idea, Maddmatt, and this could be readily applied, for example on the AH6: the only problem is to know the roll angle. Of course once you can look inside arma p3d models and in such a way know the named selection for the right barrel's muzzle you don't need the roll angle any more.

EDIT>

perhaps the command modelToWorld can be used to setpos the bullet in the right place without having to resort to the roll angle, if this command works a little like the 'drop' one in OFP.

Share this post


Link to post
Share on other sites
Quote[/b] ]in OFP it was not unstable: it was pretty rock-steady in my opinion. What's the problem in Arma, Deanosbeano?

the fired evvent handler wont trigger on my pc on settings above normal.

it was the same in ofp on high settings.

also on normal in cities the fired event handler wont trigger . i guess its just all too much for the engine.

also on a personal rifle on the higher settings and normal in cities unless the rifle is in burst mode it wont trigger the EH

and ultimately theres something about the arma engine , unless the unit moves or does something (anything) the engine does not seem to recognise that unit is actually in the game at all AND i must stress it only needs to take one small action or small move once at startup. ( this problem is rare but present and only apperent when your waiting for an EH or init script on that unit).

all bugs but not biggies until you need some data on a unit for your own modded scripts.

another way to describe this , when i put 2 units on a map and an empty vehicle ( again this is on better than normal settings), as soon as the map inits ask the second man to enter te vehicle, roger is the reply and he wont move , now restart and this time ask him to move somehwre first , then ask him to mount the vehicle , voila it works. again this is rare but present in 1.05

Share this post


Link to post
Share on other sites

Deanosbeano: I see.

Anyway, in regards of the AH6, you just need to put this line in the init field of the unit:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">this addEventHandler ["fired",{if((vehicle(_this select 0) ammo "TWINM134") mod 2 == 0)then{nearestObject[_this select 0,_this select 4] setpos((_this select 0) modelToWorld [.7,-.5,-.25])}}]

well, sort of: I just thought that the tracers were made differently than OFP, and instead this seems not to be the case. The result is crappy for this. ModelToWorld sesms to work like 'drop', but the offset I put in is not 100% accurate. I just don't have the time to check the exact position. To use in game just remember to check if the ammo being fired is a minigun bullet ("B_762X51_BALL" or sort of), because as it's now it modifies even the rockets' positions, which you don't want to.

Share this post


Link to post
Share on other sites
another good one for this kind of script is try it with a sabot round from a tank and add a loop so it tracks the shell .

then spawn a new shell on death of the first . and set its velocity - _sx,_-sy,-_sz , it deflects off the thing it hits.

to make it look right you need to delete the first shot spawn a dummy round tho and i dont have any dummy tounds at the mo smile_o.gif.

plus i think this type of code is better for the sqf type scripter ,of which i am not one .YET

Trust me, trying to accurately detect the impact point of a bullet is hell! Might not be so bad with tank shells though.

With OFP, I made an impact effect for bullets, so you would see dust get kicked up from the ground. Hitting an object would cause a puff of smoke. Accurately getting the position of the impact was incredibly difficult, and the fact that using the getpos and deletevehicle command on craters causes the game to crash just made it much harder. I eventually used the drop command to create an invisible particle on the crater that would disappear instantly and execute a script for the dust or smoke effect - depending what was hit (determining what was hit was another big challenge).

I pretty much finished that though, but it would still sometimes create the effect at the wrong spot. Never released it. Also had to use sqf for as much as I could to prevent performance loss in firefights.

Don't know if all that work will have any use in ArmA, but if anyone does have a use for it then thay can ask. Should be easier to track explosives as you could detect the nearest "explosion" instead of the crater. that would have less chance of creating the effect at the wrong spot.

Share this post


Link to post
Share on other sites

It honors all of you to try to find a workaround for this, but since ArmA is already a resource consumer like hell, wouldn`t it make the situation worst if you script a workaround? If I remember correctly all those workarounds in OFP created most of the time fuzzy effects in MP games and under laag conditions and sucking CPU. Hence I would rather approach BI to solve it within this engine or forget it until Game2.

Share this post


Link to post
Share on other sites
First, it's not a bug, it's an engine limitation. Second, they're gatling guns on the AH-6, not chainguns. BIS didn't impliment multiple muzzle positions per weapon/turret on vehicles, that makes it a non-feature. They don't have to add it, especially if the current method works.

Still would be nice if it worked.

The FFAR rockets fire from either side just fine, so why not the miniguns? It could be sorted with scripting, but this is something that should be in the game already.

I guess there are more important issues to be sorted out though.

FFARs are also fixed and forward firing - they can't be put on turrets (at least they couldn't in OFP) or fire in any direction other than the direction the aircraft's model was pointing. FFARs are a different simulation than MGs, so don't try to make the comparison. Sure BIS might have been able to make MGs work like FFARs, but then we wouldn't have had any turrets at all.

I'm sorry to add to this "old" comment: It was a pretty valid comparison.

All that needs to be done, is a check with every bullet fired and a simple

Muzzle = Muzzles( bulletCount modulo (MuzzleCount) );

There is no problem rotating the memory points, as it is already in the engine, and it should not be too hard to count the number of muzzles. All it needs is a "muzzleCount" for the config, and the obligatory memory points.

I mean, common, somehow BIS managed to select the correct memory point, from which to fire the rockets?

The only problem I see, is, from which muzzle the weapon should be aimed; I'd leave that to the first two muzzle points.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×