Jump to content
Sign in to follow this  
yyccccc

How can I get infinite ammo?

Recommended Posts

when I play as a AA specialist there is only one ammo

how can I set the amount of ammo please?

Share this post


Link to post
Share on other sites

Well that depends what load out you want. If you want to have 2 Stinger missiles you will not be able to hold any other primary weapon ammo, Stinger ammo takes up 6 primary ammo slots each.

If you want to set it up like this just put this into that units init line:

removeAllWeapons this; this addWeapon "Stinger"; this addMagazine "Stinger"; this addMagazine "Stinger";

Infinite ammo, I'm not sure. Never used it before. It can probably be scripted though.

Edited by Manzilla

Share this post


Link to post
Share on other sites

for infinte ammo add an eventhandler to the unit that is firing the aalauncher. add a "fired" EH and make it add one stinger or strella to the unit. there u go, infinite ammo.

Share this post


Link to post
Share on other sites

Hi all

For realism the correct method is to place an Ammo box next to the AA player so they can rearm.

If you are creating a mission then you can you use any of the above methods. Any of the listed methods should be inserted in the mission by the mission designer. If the mission designer does not want you to have more than one missile, they can do so for a game reason. It is realy up to you as the creator of the mission.

Kind Regards walker

Edited by walker

Share this post


Link to post
Share on other sites

The easy way :

Make a radio alpha, in repeatable, and, in the init : nameofyourunit addmagazine "blablabl".

Share this post


Link to post
Share on other sites

yes setvehicleammo 1 should be enough. but you still have to trigger it. Again it depends on what the mission designer wants to archive. if its an AI controlled AA Infantrist and he should always have full ammo, using the addeventhandler noted by me above would be the best trick.

an alternative would be to place a trigger with its condition checking if the unit has ammo for a specific weapon. Of course it should be repeatable if its supposed to refill more than once. in its activation the trigger calls the setvehicleammo command.

if the player should be able to control when a unit gets full ammo again a radio trigger will do the trick.

Share this post


Link to post
Share on other sites

true unlimited weapons...

place in the init of the unit:

this exec "UAmmo.sqs";

UAmmo.sqs

hint "Uber Weapons -- unlimited ammo for all weapons";

#start
(vehicle player) setvehicleammo 1;
~0.01
goto "start"

shooting 2000 stingers in 60 seconds isn't realism... but i really don't care. :j:

Share this post


Link to post
Share on other sites

A better method is to use an addeventhandler in combination with setvehicleammo. Put this in the unit's init field:

this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]

Edited by trini scourge

Share this post


Link to post
Share on other sites
A better method

its much better

:rthumb:

Edited by Loki

Share this post


Link to post
Share on other sites
A better method is to use an addeventhandler in combination with setvehicleammo. Put this in the unit's init field:

this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]

I try it does not work. what is wrong?

Share this post


Link to post
Share on other sites

Its strange that yycccc is asking for things that 'maybe' can help him cheat in game. He has asked for infinate ammo and also unable to get damaged when shot...

I hope I am wrong.

Share this post


Link to post
Share on other sites
Its strange that yycccc is asking for things that 'maybe' can help him cheat in game. He has asked for infinate ammo and also unable to get damaged when shot...

I hope I am wrong.

I have used all those in my multiplayer mission scripts for added entertainment value. Imagine having to reload every time you fire in a rocket launcher deathmatch.

Share this post


Link to post
Share on other sites
A better method is to use an addeventhandler in combination with setvehicleammo. Put this in the unit's init field:

this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]

Does this not work anymore? I have a goof-off "mission" for myself and a friend, where we would like to use this on a stinger / m14 loadout, but for some reason I can't get it to work.

removeallweapons this;

this addmagazine "20Rnd_762x51_DMR";

this addmagazine "20Rnd_762x51_DMR";

this addmagazine "20Rnd_762x51_DMR";

this addweapon "DMR";

this addmagazine "15Rnd_9x19_M9";

this addmagazine "15Rnd_9x19_M9";

this addmagazine "15Rnd_9x19_M9";

this addweapon "M9";

this addMagazine "Stinger";

this addWeapon "Stinger";

this addeventhandler ["fired", {(_this select 0) setvehicleammo 1}];

The method Loki mentioned in this thread did work for me, but then we don't even have to reload. I know it's silly, but I would prefer at least a couple seconds required for reload time, even though we're already leaving "realism" way behind.

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  

×