Jump to content
Sign in to follow this  
chris330

Reloading via the Action command

Recommended Posts

Dear All,

I did a search on this and was surprised to find no-one had really asked the question so directly before. I want a unit to reload his weapon for a flare script I am making. I have no problem getting the flares to fire and the unit reloads his weapon automatically when I add a magazine via his init line.

BUT...

After he has fired one flare I use a radio command to add another flare to him but he doesn't reload the flare therefore cannot fire anymore flares crazy_o.gif Is it possible to get him to reload his flares via the action command? Or is there another way to get a unit to reload his weapon after the mission has begun?

Share this post


Link to post
Share on other sites

I don't understand your problem...

Quote[/b] ]

I have no problem getting the flares to fire and the unit reloads his weapon automatically when I add a magazine via his init line.

Quote[/b] ]

After he has fired one flare I use a radio command to add another flare to him but he doesn't reload the flare therefore cannot fire anymore flares

Anyway, There must exist an action to make a unit reload his weapon, but nobody has found it yet.

There's a list on this page with all the available actions in the engine. But most of them need arguments and It's hard to find the correct syntax.

I already tried :

unitname action ["load magazine"]

unitname action ["loadmagazine"]  

unitname action ["load magazine", (magazines unitname (select 0))]

unitname action ["load magazine", primaryweapon unitname]

...and a lot more...

None of these work.

And executing the switchmove reload-animations doesn't make him reload either  sad_o.gif

Share this post


Link to post
Share on other sites

Hi Blanco wink_o.gif

The problem is the unit reloads his weapon when I add a magazine via his init line but not when I add a magazine later through a script or radio trigger crazy_o.gif I will try again tonight and se if it works wink_o.gif

Share this post


Link to post
Share on other sites

ah, OK

I couldn't see the difference between putting the code in an init and a radiotrigger. tounge_o.gif

Euh.. Sure you don't use this in the radiotrigger?

Share this post


Link to post
Share on other sites

Why not add a bunch of magazines and setting autoReload to false in the CfgWeapons? Each magazine should contain count=1 so only one flare is fired (or how many you want), then you'll have to reload. Of course AI will do that automaticly, but that's no problem is 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
Sign in to follow this  

×