View Full Version : How can I get infinite ammo?
when I play as a AA specialist there is only one ammo
how can I set the amount of ammo please?
Manzilla
Jun 9 2009, 14:12
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.
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.
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
The easy way :
Make a radio alpha, in repeatable, and, in the init : nameofyourunit addmagazine "blablabl".
Isn't player setvehicleammo 1 enough?
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.
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:
trini scourge
Jun 10 2009, 18:58
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}]
A better method
its much better
:rthumb:
yyccccc
Jun 11 2009, 03:41
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?
dale0404
Jun 11 2009, 13:17
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.
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.
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.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.