Jump to content
Enforcer249

[Help]How can I use loadMagazine script right way?

Recommended Posts

I'm using Franz and Nodeunit's AH-64D Longbow Apache mod, I'm trying to change weapon loadout using by script.

So I made the script:

 

this loadMagazine [[0], "fza_m230", "fza_m230_1200"]; this loadMagazine [[0], "fza_agm114_23_8", "fza_agm114l_23_8"]; this loadMagazine [[0], "fza_m261_14", "fza_m261_m229_14_38"]; this loadMagazine [[0], "fza_atas_2", "fza_atas_2"];

 

And is not working.

Where did I write incorrectly? I couldn't find it my self.

Share this post


Link to post
Share on other sites

I don't know this mod. Check for: The turret has to be manned.

Share this post


Link to post
Share on other sites

Looks like you have some incorrect classnames.

Set up your heli as desired, then while sitting in pilot or gunner seat, run this in debug:

_br = toString [0x0D, 0x0A];
_wep = vehicle player weaponsTurret [0];
_mag = vehicle player magazinesTurret [0]; 
copytoclipboard format ["//Weapon classes:%1%2%3//Magazine classes:%4%5", _br, _wep, _br, _br, _mag];

Paste in a text file or whatever to see classnames. The default Longbow returns this:

//Weapon classes:
["fza_ma_safe","fza_burstlimiter","fza_m230","fza_m261_14_zoneA","fza_m261_14_zoneB","fza_m261_14_zoneE","fza_agm114_2_4","fza_agm114_3_4"]
//Magazine classes:
["fza_safe","fza_m230_1200","fza_m261_m151_14_zoneA","fza_m261_m255_14_zoneB","fza_m261_m261_14_zoneE","fza_agm114l_2_4","fza_agm114k_3_4"]


*EDIT* - fixed
 

 

  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, Harzach said:

Looks like you have some incorrect classnames.

Set up your heli as desired, then while sitting in pilot or gunner seat, run this in debug:


_br = toString [0x0D, 0x0A];
_wep = vehicle player weaponsTurret [0];
_mag = vehicle player magazinesTurret [0]; 
copytoclipboard formatText ["//Weapon classes:%1%2%3//Magazine classes:%4%5", _br, _wep, _br, _br, _mag];

Paste in a text file or whatever to see classnames. The default Longbow returns this:


//Weapon classes:
["fza_ma_safe","fza_burstlimiter","fza_m230","fza_m261_14_zoneA","fza_m261_14_zoneB","fza_m261_14_zoneE","fza_agm114_2_4","fza_agm114_3_4"]
//Magazine classes:
["fza_safe","fza_m230_1200","fza_m261_m151_14_zoneA","fza_m261_m255_14_zoneB","fza_m261_m261_14_zoneE","fza_agm114l_2_4","fza_agm114k_3_4"]



 

 

Is it working on editor?

Share this post


Link to post
Share on other sites
13 hours ago, Enforcer249 said:

Is it working on editor?

Of course, why wouldn't it?

  • Like 2

Share this post


Link to post
Share on other sites
On 4/20/2020 at 3:00 AM, Harzach said:

Of course, why wouldn't it?

It didn't work. I don't know how to use it (actually I just copy and paste it)

can you show me example?

Share this post


Link to post
Share on other sites
17 minutes ago, Enforcer249 said:

It didn't work. I don't know how to use it (actually I just copy and paste it)

can you show me example?

 

It absolutely works. The example is in my previous reply. Just do as I said:

 

Quote

Set up your heli as desired, then while sitting in pilot or gunner seat, run this in debug:


_br = toString [0x0D, 0x0A];
_wep = vehicle player weaponsTurret [0];
_mag = vehicle player magazinesTurret [0]; 
copytoclipboard format ["//Weapon classes:%1%2%3//Magazine classes:%4%5", _br, _wep, _br, _br, _mag];

 

Then paste into a text file or whatever to view the results.

*EDIT* OHH, sorry. It should be "format" instead of "formatText". Not sure how that got in there. Fixed above.

  • Like 2

Share this post


Link to post
Share on other sites
1 hour ago, Harzach said:

 

It absolutely works. The example is in my previous reply. Just do as I said:

 

 

Then paste into a text file or whatever to view the results.

*EDIT* OHH, sorry. It should be "format" instead of "formatText". Not sure how that got in there. Fixed above.

okay, I'll try it.

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

×