Jump to content
ikerdo

force reload and ammo shell

Recommended Posts

I am trying to do a pump shotgun, but I don´t know how to make it reload after every shot, like bolt sniper rifles.

And another problem is how to add the ammo cartidges fall after shooting.

Share this post


Link to post
Share on other sites

AFAIK the bolt action is part of the fire animation, make the rate of fire appropriate for the animation finish

Share this post


Link to post
Share on other sites

There's some work on dev branch to add fired EH to guns.  (look in the changelog in the past few days).

Share this post


Link to post
Share on other sites

There's some work on dev branch to add fired EH to guns.  (look in the changelog in the past few days).

 

Can it be done without mod, just do it with script.

Share this post


Link to post
Share on other sites

Little snippet to force fire "single-mode"

player addEventHandler [
    "fired", 
    {
        params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"];

        _bullets = _unit ammo _weapon;
        if(_bullets > 0) then 
        {
            _unit setAmmo [_weapon, 0];
        };
        [_unit, _weapon, _bullets] spawn 
        {
            params ["_unit", "_weapon", "_bullets"];
            waitUntil { reloadEnabled _unit };
           _unit setAmmo [_weapon, _bullets];
        };
    }
];

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

×