Jump to content
Sign in to follow this  
Outlawz7

Adding the magazine already reloaded (disposable AT script)

Recommended Posts

I'm using this script to have the RPG18/M136 as disposable launchers with no ammo, but before I can fire I have to reload the magazine added by the script. Is there a way to add the magazine already loaded in?

[] spawn
{
while {true} do
{
while {currentWeapon player != "M136"} do {sleep 0.5;};

player addMagazine "M136";
_ehId = player addEventHandler ["fired", {[_this select 0, _this select 1] spawn {player removeMagazines "M136"; while {currentWeapon player == "M136" && isNull (findDisplay 106)} do {sleep 0.5;}; (_this select 0) removeWeapon (_this select 1);};}];

while {currentWeapon player == "M136"} do {sleep 0.5;};

player removeEventHandler ["fired", _ehId];
if ("M136" in magazines player) then {player removeMagazines "M136";};
};
};

Share this post


Link to post
Share on other sites

Yes but why it will allow you to fire a stream of missiles at a target. You put the code into the units initbox but I think you could run it via SQF. When I get home I will post the code for you. AVIBIRD.

Share this post


Link to post
Share on other sites

Try to remove the launcher first, add the magazine and then add the launcher again.

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  

×