Jump to content
Sign in to follow this  
Inkompetent

Real M136 v1.0

Recommended Posts

I'll be trying to for sure, since the scenario you described is really what I thought of as a drawback.

Downside with getting the M136 to not use any ammo slots is that there isn't a single weapon in ArmA not using some kind of ammo, or being the weapon itself (i.e bomb, hand grenade), but I'll be trying to get that sorted too. It has lower priority than to get the above working though.

Share this post


Link to post
Share on other sites

Well actually grenades need a weapon but you always have it with you. The Weapon is simply called "throw".

However... please make this addon as realistic as possible.

Share this post


Link to post
Share on other sites

Ohh, I hadn't looked that close on the hand grenades. Me and assuming stuff...

Well, then it's definitely a possibility! Thanks for the notice, Freshman!

Share this post


Link to post
Share on other sites

what if i put this on my server, will everybody have an one shot tube ?

or is it still clientside-only ?

regards

rocko

Share this post


Link to post
Share on other sites

Afraid I don't know that yet, since if someone has tried it on a dedicated server I haven't heard of the result.

I think it should work though, since it is all trigged by the "fired" eventhandler. I'm no pro at ArmA game mechanics, but I'd think that is checked by the server, regardless if a "client" shoots, or an AI.

Share this post


Link to post
Share on other sites

With one client having this addon on a dedicated server (server and other clients without), players get an error message - first line in excerpt of my arma.cfg:

Quote[/b] ]Warning Message: No entry 'bin\config.bin/CfgWeapons.M136Used'.

Warning Message: No entry '.scope'.

Warning Message: '/' is not a value

Warning Message: Error: creating weapon M136Used with scope=private

Warning Message: No entry '.displayName'.

Warning Message: '/' is not a value

Warning Message: No entry '.nameSound'.

Warning Message: '/' is not a value

Warning Message: No entry '.type'.

Warning Message: '/' is not a value

Warning Message: No entry '.picture'.

Warning Message: '/' is not a value

Warning Message: No entry '.Library'.

Warning Message: No entry '.libTextDesc'.

Warning Message: '/' is not a value

Warning Message: No entry '.model'.

Warning Message: '/' is not a value

Warning Message: No entry '.fireLightDuration'.

Warning Message: '/' is not a value

Warning Message: No entry '.fireLightIntensity'.

Warning Message: '/' is not a value

Warning Message: No entry '.muzzles'.

Warning Message: Size: '/' not an array

Then an invisble object is placed on the ground - looking at it, you see "Take " - or "Take ''" - I can't remember. Picking it up does nothing.

So you can't grab old launchers from people who use your addons - but that error message is a bit annoying - guess I have to download it myself wink_o.gif

Share this post


Link to post
Share on other sites

Yes, the error message is pretty annoying. The upside is that it only shows once for the duration of a whole session, afaik.

I don't think one can get around it without the server having the addon too, since one creates an object with the client, instead of the server creating it.

Share this post


Link to post
Share on other sites
Great Addon thumbs-up.gif

Is it possible to define that it takes no ammoslots? This would be great.

Yes it is.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMagazines {

class CA_LauncherMagazine;

class M136 : CA_LauncherMagazine {

type = 0;

};

};

But then, of course, you need to make sure that the tube gets loaded automatically because the thing above makes M136 ammo invisible for gear dialogs. Only way I could think of is an init eventhandler assigned on soldiers that would check for the M136 from time to time and load it s needed.

Share this post


Link to post
Share on other sites

Yeah, started tinkering with that stuff now. I thought I'd try to squeeze it all into one release. Been busy with writing skin configs and playing the Domination map (fantastic co-op map!wink_o.gif, but I'll sure try to get the thing working properly!

And if I'm in a really creative mood I'll even bring the AT-4 AST (Anti-Structure Tandem). I just have to figure out how to memorize the point of an object's death, or the point just before it. Haven't looked much into that part yet.

(The AT-4 AST is not yet done with testing, so not sold yet, but it rocks at cleaning buildings and bunkers with its ability to penetrate 2m reinforced concrete!wink_o.gif

Share this post


Link to post
Share on other sites
Great Addon thumbs-up.gif

Is it possible to define that it takes no ammoslots? This would be great.

Yes it is.

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class CfgMagazines {

class CA_LauncherMagazine;

class M136 : CA_LauncherMagazine {

type = 0;

};

};

But then, of course, you need to make sure that the tube gets loaded automatically because the thing above makes M136 ammo invisible for gear dialogs. Only way I could think of is an init eventhandler assigned on soldiers that would check for the M136 from time to time and load it s needed.

This is a brilliant idea. The concept of a "magazine" for an AT-4 (it says M136 AT-4 on the field manual but no one in the US Army calls it a M136 in the field) is rubbish.

Instead of worrying about not having an M136 magazine, why not just script the game to "If soldier has AT-4 (unused)" "this addMagazine "M136" "? This way there's exactly no chance of picking up a tube and not having a round for it.

The magazine for the AT-4 should definitely be a "type 0" with no visible presence in the gear screen. It should simply be injected into soldiers that have a working tube and removed from all others. Let the magazine be added and removed "behind the scenes."

On top of this, smoke-reduced rounds, proper bang-pop impulse (The AT-4 is not a rocket damnit!!wink_o.gif, and maybe a fixed up sight picture and the snafu that is BIS's M136 can be sorted out proper.

I'll have a look into this addon and see if I can't undo the error that pops up.

Share this post


Link to post
Share on other sites

I think I've come up with a very good workable solution. Someone should make a script that scours the mission for M136 weapons and magazines and switches them out these new weapon and magazine class names. Besides that and whatever multiplayer script issues already existed, I'd say this is a much better solution than the original.

Features:

*Weapon is named as "AT-4" and "AT-4 (Used)"

*Untested but should work flawlessly with NWD's rocket ballistics

*Weapon and magazines inherit from the stock BI classes, making any and all mod effects inherit seamlessly.

*HEAT round does not take up any space in the inventory since it is in the tube.

*Dispose script is altered to allow complete control over your character during the switch. You are not forced to drop the tube or halted in position at all during any animations. You suddenly are carrying an empty AT-4 tube is all to do with what you wish.

*The "AT-4 (Used)" weapon is completely incapable of firing any rounds ever again.

*It is impossible to disable a functional AT-4 tube by dropping the magazine, which would be nonsensical in real life context.

Existing Issues / Room for Improvement:

*No multiplayer testing done

*May/probably require all users in session to have AddOn

*May wish to script unloading the round whenever put away to simulate the arming sequence for the weapon each time it is brought out with appropriate animations.

*Could use updated, more informative library entry

*Possible to change display name from "AT-4" to "M136 AT-4"

*Possible bugs/ undesirable behavior when this weapon is the ONLY weapon you have (no M16 or other rifle).

*Could use custom fire modes that have the ironsights calibrated for 100m 300m and 500m for example.

=====================

FUTURE WORK NEEDED

Scrounge script to scour through the entire mission and change out M136 weapon and M136 magazines to the AT-4 disposible type. Also the script should make sure and automatically add one magazine to a player that has an AT-4, no matter what, and remove any number of magazines for the AT-4 greater than 1.

The danger of having M136 magazines deleated is moot. With the proper scripts in place the need to worry about a magazine for the AT-4 should go away. All one needs to do is worry about the tube.

========

config.cpp

Quote[/b] ]class CfgPatches {

class Real_M136 {

units[] = {};

weapons[] = {};

requiredVersion = 0.1;

requiredAddons[] = {"CACharacters","CAWeapons"};

};

};

class cfgVehicles {

class Man;

class CAManBase : Man {

class Eventhandlers {

fired = "_this execVM ""\Real_M136\Scripts\realm136.sqf""";

};

};

};

class CfgMagazines {

/*extern*/ class M136;

class M136_Hidden: M136 {

scope = 2;

type = "0";

};

class M136_Hidden_Empty: M136_Hidden {

scope = 2;

count = 0;

};

};

class CfgWeapons {

/*extern*/ class M136;

class AT4: M136 {

scope = 2;

displayName = "AT-4";

magazines[] = {"M136_Hidden"};

};

class AT4_Used: AT4

{

displayName = "AT-4 (Used)";

magazines[] = {"M136_Hidden_Empty"};

};

};

realm136.sqf

Quote[/b] ]_unit = _this select 0;

_weapon = _this select 2;

if ((_weapon in ["AT4"]) && (local _unit)) then {

_used = "AT4_Used";

sleep 0.5;

_unit removeWeapon _weapon;

_unit addWeapon _used;

_unit selectWeapon _used;

};

Thanks to Inkompetent for his existing code and his inspiration.

Share this post


Link to post
Share on other sites
Quote[/b] ]Scrounge script to scour through the entire mission and change out M136 weapon and M136 magazines to the AT-4 disposible type.

This is not possible due to ArmA's (and OFP's) inability to check the contents of ammoboxes/vehicles/weaponholders (for the non-editing types, "weaponholder" is the 'vehicle' that weapons and ammo you drop on the ground are stored in). It is of course possible to exchange all carried AT-4s with such a script, but any launchers not carried by a unit would be unaffected.

smile_o.gif One can only hope for a "queryMagazineCargo" and "queryWeaponCargo" command in the future!

Regards,

Wolfrug

Share this post


Link to post
Share on other sites
Quote[/b] ]Scrounge script to scour through the entire mission and change out M136 weapon and M136 magazines to the AT-4 disposible type.

This is not possible due to ArmA's (and OFP's) inability to check the contents of ammoboxes/vehicles/weaponholders (for the non-editing types, "weaponholder" is the 'vehicle' that weapons and ammo you drop on the ground are stored in). It is of course possible to exchange all carried AT-4s with such a script, but any launchers not carried by a unit would be unaffected.

smile_o.gif One can only hope for a "queryMagazineCargo" and "queryWeaponCargo" command in the future!

Regards,

Wolfrug

Well that's just lame. Personally I don't care too much as I work in a controlled environment (4IB, gaming unit) so I don't have to deal with compatibility with non-specific missions.

A script that simply juggles around your inventory (what eventhandlers would be good for that? Hmmm) would draw less CPU resources and have the exact same effect. It's not like you're able to fire any of these weapons without having them in inventory first.

A few old-stock M136 rounds and magazines sitting off in a crate in the corner of the map unused aren't hurting anybody.

Would anyone venture to make a simple script to run locally?

I'm not sure what is the best event handler to use. Possibly once on mission start and every time on inventory access? Probably on JIP too.

If: Weapon=M136. Then: Swap M136 for AT4, Force 1 M136_Hidden magazine

If Magazine=M136. Then: delete magazine M136.

Share this post


Link to post
Share on other sites

How is the vehicle armour handled in Armed Assault exactly? Is there any tweaking necessary?

I have noticed that I can sometimes disable a T-72 with a side shot but it's not destroyed, only the crew pops out. But I guess it should be penetrated/destroyed if hit to side or rear hull/turret with an AT-4.

I apologize if this question has already been "beaten to death".

Share this post


Link to post
Share on other sites
On top of this, smoke-reduced rounds, proper bang-pop impulse (The AT-4 is not a rocket damnit!!wink_o.gif

Way ahead of you:

http://www.flashpoint1985.com/cgi-bin....t=66195

It doesn't have proper backblast effect, but the ballistics should be pretty close to reality. If you use Chammy's sound mod you'll get decent "BANG----POP" sounds as well.

-------------------------

I'll help with the scripts if you need me, although I would suggest just modifying the default M136 into the unused weapon instead of adding your own class. It will require that all clients in a multiplayer game use the mod either way, but this way would save you the bother of replacing all the stock M136 weapons and ammo with your own versions.

You could start a loop on each player that checks for the presence of the M136 every five seconds or so and adds ammo as needed. You could also script it to watch for player animation changes, and "unload" the weapon whenever the animation changes from a launcher animation to a rifle or pistol animation (the current load animation is fine for prepping the tube, you just need to get rid of the reload sound). If the player is in a launcher animation, you could add a "change range" action or you could capture keypresses to change range as in the sightAdjustment mod.

The used AT4 probably just needs "magazines[] = {};" in the config to work right. I don't think you need to add a dummy magazine to it.

Share this post


Link to post
Share on other sites
On top of this, smoke-reduced rounds, proper bang-pop impulse (The AT-4 is not a rocket damnit!!wink_o.gif

Way ahead of you:

http://www.flashpoint1985.com/cgi-bin....t=66195

It doesn't have proper backblast effect, but the ballistics should be pretty close to reality. If you use Chammy's sound mod you'll get decent "BANG----POP" sounds as well.

Yup, I discovered your wonderful mods not too long ago. All my new addons and such are using the inheritence of classes liberally to make sure that all of your ballistics/scopes/etc effects filter down into my addons when used alongside yours.

Quote[/b] ]I'll help with the scripts if you need me, although I would suggest just modifying the default M136 into the unused weapon instead of adding your own class. It will require that all clients in a multiplayer game use the mod either way, but this way would save you the bother of replacing all the stock M136 weapons and ammo with your own versions.

A little scripting help would be appreciated. There's a definite benefit in not replacing the M136 as opposed to creating new things. Like you said, the addOn is needed on clients in either case. In my method the magazine for the AT-4 (and I love having it called that and not the stupid "M136") takes up no inventory slots which is how it should be.

I work in a "clan"/controlled environment anyway where there's more chance of an idiot member using leaving a M136-replacing AddOn on a public server and screwing up public player experiences. This way any of the "clan" members that join a random game of Evo without disabling this addOn simply has a couple extra weapons defined that never come up during the course of the mission.

In the event of wanting "plain mission" compatibility, I would make a separate addOn that would scour the mission for old M136s and replace with AT-4 setups.

Quote[/b] ]You could start a loop on each player that checks for the presence of the M136 every five seconds or so and adds ammo as needed. You could also script it to watch for player animation changes, and "unload" the weapon whenever the animation changes from a launcher animation to a rifle or pistol animation (the current load animation is fine for prepping the tube, you just need to get rid of the reload sound). If the player is in a launcher animation, you could add a "change range" action or you could capture keypresses to change range as in the sightAdjustment mod.

I prefer to use event handlers over loops generally as a matter of principle. I was also thinking about the "unload" to simulate arm, but honestly a trained US Army soldier can arm an AT-4 in about the same time as the ArmA soldier can get the bugger off his back and in his hands. Having the ArmA soldier go through a reload to simulate all the arming is probably more delay than is due. Still split on the issue, it's more of a luxury feature.

I would LOVE to have your guidance for adding the "AT-4" or any new weapon to one's sight adjustment mod. I haven't used it yet so I don't know exactly how to use it. Is there a manual or a readme somewhere? Also, when I first saw the sight adjustment mod I thought it only worked for 2D sights, does it work for 3D sights as well? If it works for 3D sights then the AT-4 and the M203 would benefit from that A LOT.

Quote[/b] ]The used AT4 probably just needs "magazines[] = {};" in the config to work right. I don't think you need to add a dummy magazine to it.

I thought of that and tried it with no magazines defined. It made an animation error where the AT-4 (Used) would appear on the soldier's back and not in his hands. I defined that used magazine to avoid that animation glitch (it's actually quite simple to test if you wanted to test it yourself) and never actually plan to have that magazine appear in the actual mission.

Share this post


Link to post
Share on other sites

The sightAdjustment mod itself is pretty hardcoded at the moment, and only works for primary weapons. The creator of the mod has abandoned it and offered it to public domain, so I might take it up and try to expand it one of these days (his syntax is hell to understand, which is why I haven't yet). You could duplicate the functionality, but it might be best just to wait until it's updated.

You could add some range actions as a stopgap instead. This will require a loop if you only want the actions to show up when you're aiming the AT4 (which is what you want). I would add a player global AT4_RANGE and make a loop that checks every few seconds whether the player (a) carries an AT4 and (b) is in a launcher animation. If so, it would add a "Range: XXXm" action depending on the value of AT4_RANGE that, when selected, sets the player global to the next range in a list, deletes itself, and re-adds the "Range: XXXm" action with the next range in the name. When the player is no longer in a launcher animation, the range action would be deleted. You could do it without deleting and re-adding actions if you want to use the hint display for current range instead.

Then you'd add a "fired" event handler that would check that you fired an AT4, grab the player range global, look up the range on a list of superelevations (I can generate this for you from my ballistics mod), and change the direction of the shell as soon as it's fired. That's how my tankFCS mod works, and sightAdjustment does the same thing with superelevation directly. It doesn't depend on sights at all. It doesn't even know about sights at all. If you were hoping to animate the sights, I'm afraid that's still not possible.

I'm not sure why you wouldn't be able to make the default M136 AT4 magazines take up no inventory space, but if you're afraid of confusing people, sure.

I'd forgotten about the animation thing, sorry.

Share this post


Link to post
Share on other sites

Since i'm trying to use every availible realisme mod, this is a nice candidate. I haven't tried yet, as i do MP only and the current pop-up error i can't tollerate versus my teammates. So i'm definatly looking forward to the next version(s).

Anyway, we have a discussion running atm (well just started more or less) and your tweak is brought up. My point is that it is an excellent tweak, at least with some improvements to come, but since we play MP with friends i personally find this should be a team addon and not a single user addon. Anyway, nothing for you to care about, just mentioning as i was wondering if the following feature could be added.

I have seen pictures of soldiers running in Iraq with multiple M136s (ATs) on the back, so one or more guys act as supply unit for the group. Since it is a one shot device, there is a need for multiple tubes in RL but also ingame. Meaning where you had in the past 3 rounds per unit, you will need atm three guys with 'your' AT to do the same job. Since BIS decided not to implant other realistic stuff like genade vest and still uses the 199X? single slot grenade system, i personally think this mod will damage much missions due to low ammo/tubes or will require complete other tactics (ammo in cars) but missions not always allow that or have cars.

Hope you more or less understand WHY this extra feature, user is able to carry as much tubes if inventory allows (ofcourse visually this isn't possible, maybe it can be done), could be worth looking into. In the end, it only makes it more realisticly imho.

It might be considered as a 0-0 operation, but i personally don't think it will.

Just sharing what i think at the moment and would could convince my friend to use it and others aswell.

Keep it up! It are these tweaks that makes a game better then it is (and puts it in BIS face, hopefully they pick stuff up wink_o.gif).

Share this post


Link to post
Share on other sites

I kind of noticed that the sight adjustment mod only handles the primary weapons, no sub-muzzles while reading. A shame. I didn't realize that the sight adjustment mod kicked bullets around instead of messing with the sight picture. The correction for a 500m AT-4 shot would be severe and noticeably weird as the shot bent its trajectory out of the tube. Animated sights are soooo needed by BIS or some talented modder.

I've tested this in multiplayer as it is shown in my code quotes. There was no pop-up error when both of us had the addOn. So "MP compat if all parties have the addOn" for now.

I totally hear you about the multiple tubes thing. I would venture that the best way around it is:

1. Number of magazines = number of tubes

2. Animate the soldier going from AT-4--Rifle--AT-4 between tubes or have an addAction "Get another tube" which burns a hidden "Fresh tube" mag.

3. Only switch the AT-4 to AT-4(Used) permanently when all hidden Magazines are gone.

A lot of these hidden magazine and scripting solutions make it very troublesome to code a convincing and effective resupply system. What if you want to go up to an ammo box and get 3 tubes? Each tube should check "does this person have an AT-4 already?" if so "convert tube to hidden spare tube magazine." What about giving one of your three tubes to a buddy? All of these problems have solutions but take time and brainpower to work out.

4IB tries to avoid the "Infantry squad against company of tanks" scenarios but they come up a lot in missions other people make and it becomes impossible without a few AT-4s on your back.

I will consider updating the Real M136 for multiple-tube support sometime in the future. Right now getting the helper mission scripts and the thing out the door would be nice. I'm currently creating or adapting about 15 other modifications simultaneously.

The several ranged versions of the M136 (I don't really have too much of a prob with firemodes personally) works except that it requires I be able to code in new models with new model selections for new optics directions and it's not something I've tackled. The BIS models are locked from all I can tell, despite the few example models floating around without anims.

Share this post


Link to post
Share on other sites

Well I had a weird multiplayer issue with the AT-4 addOn. Apperently putting this addMagazine "M136_Hidden" in some units doesn't "stick" and you start the round without the invisible magazine for the AT-4.

I believe this has to do with being the HOST of the multiplayer game and with the magazine being of "type = 0;" My memory from earlier is that while hosting a round in which a host and a client were playing a map with init-kitted AT4 gunners and both had the addon. The client saw everything as it should be but I (the host) had my magazine missing.

One issue I envision is that all non-client characters local to the host (dedicated or not) will not get magazines for their AT-4s, including any hordes of AI.

It works in single player and preview just fine. It only breaks when I try a multiplayer game. I have access to a dedicated server so I can test with it being the host and me being client. There is a simple fix however, adding the magazine AFTER the round began with a RadioAlpha trigger allowed me to receive a magazine no problem and fire it as normal.

So it's clear that the best course of action is to issue the tube's "unarmed" to both AI and humans (without any magazine at all) and simply give the magazines out via script as needed to "arm" the tubes.

The arming sequence could be done several ways and I'd like to get people's opinion on which would be the best:

#1. Automatic arming on weapon pullout. Basically pulling out the AT-4 arms it via script making it immediately ready to fire.

#2. Manual arming on weapon reload. Pulling out the weapon injects a magazine into the inventory but requires the player to manually reload the weapon prior to firing it.

#3. Dual-button trigger. Using key capture techniques, the AT-4 is only armed when the "breathe" key is depressed. Holding down whatever key is bound to "breathe" (via script) injects magazine and loads the weapon and releasing the "breathe" key unloads the magazine. This simulates the real life firing sequence for the AT-4 which requires that you press two buttons simultaneously.

#4 Something else. Maybe a combination of elements above. Perhaps arming via a simple addAction. Heck there are three-four safeties on the AT4. Simulating all of them is not beyond some people's idea of fun.

Share this post


Link to post
Share on other sites
#3. Dual-button trigger. Using key capture techniques, the AT-4 is only armed when the "breathe" key is depressed. Holding down whatever key is bound to "breathe" (via script) injects magazine and loads the weapon and releasing the "breathe" key unloads the magazine. This simulates the real life firing sequence for the AT-4 which requires that you press two buttons simultaneously.

That might be very difficult. It's supposed to be possible, but <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"><unit> action ["LOADMAGAZINE", <target>, <magazine creator>, <magazine id>, <weapon name>, <muzzle name>];doesn't work.

That's what's in the Biki, but it's wrong. Action LOADMAGAZINE expects a 7-unit array of <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">["LOADMAGAZINE",<object>,<object>,<number>,<number>,<string>,<string>]

No matter what I put in those slots, I can't get anything to work.

I was able to do what you describe for the laser designator, though, so there might be some kind of loophole. I didn't really think very hard about it at the time, but right now I really have no idea how or why my GLTD II script works. All I did was add and remove the magazine, without even bothering to load or unload it.

Share this post


Link to post
Share on other sites

There's a way around loading a magazine. Have you ever noticed the behavior of weapons when you get the magazine for it before or after picking up the weapon?

Try this:

**No M16 mags, pick up an M16 from a crate with ONLY the M16 in it. Then pick up a stanag mag.

Result: Weapon not loaded.

**No M16 mags, pick up the magazine first, then pick up the M16.

Result Weapon is loaded immediately.

**Pick up the M16 from a crate with magazines in it that "force supply" automatically when you pick up the weapon.

Result: Weapon is loaded immediately.

======

Conclusion: Picking up the weapon after having the magazine means you have to load/reload the weapon. Picking up the magazine before means you don't. So to have a loaded AT-4 the script simply has to: remove the AT-4, add magazine, re-add the AT-4. It happens in a blink of the eye.

=======

Recently I've been trying to have the model for the AT4 be different than AT4 (Used). I wanted the textures of the seals on the ends to be broken and see-through for the Used launcher. But no matter how I alpha the textures on the ends, I can't get them to be see though.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0;

_anim = _this select 1;

if ((_anim in ["LauncherReloadKneel"]) && (local _unit) && (_unit hasWeapon "AT4") && !("M136_Hidden" in magazines _unit) )

then {

_unit addMagazine "M136_Hidden";

sleep 0.5;

};

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">class cfgVehicles {

class Man;

class CAManBase : Man {

class Eventhandlers {

fired = "_this execVM ""\Real_M136\Scripts\realm136.sqf""";

AnimChanged = " _this execVM ""\Real_M136\Scripts\arm136.sqf""";

};

};

};

The first try of mine to have a script auto-add a M136_Hidden magazine. It doesn't work yet. I've tried putting a simple code in the .sqf like hint "The script ran!" but no luck so far with even getting the script to launch.

EDIT: Yup. Utilizing the known, working fired eventhandler the simplistic "arming" script worked without a hitch. I could probably do something cute to load it automatically too like remove the AT-4 weapon, add the magazine, then give the AT-4 weapon back. Might mess with the animations to pull the weapon out briefly on the guy. The funny thing is that using the fired eventhandler keeps giving me AT-4 shots (and since I disabled the AT4 (Used) swapper for this test) I had infinite ammo, lol.

Now I just need a reliable and efficient mechanism for launching this AT4-arming script right before one is ready to fire it. AnimChanged just isn't working for some reason.

Share this post


Link to post
Share on other sites

Made a 5-second loop that arms the M136 perfectly. No reloading required.

As for multiple tubes, probably the best way is non-type-0 magazines called "Spare tubes" and have the arming script give you an AT-4 and magazine if you have one of these mags or remove your AT-4 Used, give you an AT-4 magazine if you have one of these mags and also an AT-4 Used.

Updated displayName to M136 AT-4 and M136 AT-4 (Used) respectively.

Share this post


Link to post
Share on other sites

For some reason this isn't allowing the backblast flash anymore for matt's updated affects addon. If you could please look into an update or something, I'd really appreciate it. smile_o.gif

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  

×