Jump to content
Sign in to follow this  
limmy3

unitname action ["drop weapon",unitname,0,0,"weapo

Recommended Posts

Hello there,

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">W_1 action ["drop weapon",W_1,0,0,"SA80"]

A soldier will be threatend by another and will than put down his weapon.

It would be nice if this would work.  banghead.gif

Does someone know how this works?  huh.gif

All he does is knee down and still hold his gun.

Which behaviour is necesary?

All  help.gif  is  welcome.gif . whistle.gif

Regards limmy3

Share this post


Link to post
Share on other sites

Try not using W_1 as the 2nd array entry, you have the solder dropping the weapon to himself. Set it to "" instead to drop the weapon on the ground, or a set it to the name of a container object to drop it to that (no matter what distance the soldier is from the container).

Share this post


Link to post
Share on other sites

Hello,

it seams to work fine with BIS weapons.  sad_o.gif

With the SA80 it does not work and with handguns neither.

The soldier still keeps it in his hand.

What are the two numbers after the second array?  huh.gif

I had the feeling it was the direction the gun was pointing but I'm not sure about that. The other idea could be they are for the magazines.

But anyway thanks for your help.

Regards limmy3  biggrin_o.gif

Share this post


Link to post
Share on other sites

The command works fine with the JAM3 weapons. Are you sure you are using the correct weapon class name? You can find the classname using the weapons command.

As far as I know, no one knows what the 3rd and 4th array entries are. I suspect they are just fillers since the action command requires arrays with either 2 or 5 entrys. You can use any value and the command will still work. The most commonly used values I've seen are 0 and 1. I've just noticed the second entry is similar - you can set it to anything other than a containers name and the game will not complain.

Here's a bad but working example:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

soldier1 action ["drop weapon","JAM_AKS74U","JAM_AKS74U","JAM_AKS74U","JAM_AKS74U"]

The Official BI comref states :

Format of action may be [type, target, param1, param2, param3]. Only type is required, target defaults to unit, param1, param2, param3 are type specific.

Share this post


Link to post
Share on other sites
The command works fine with the JAM3 weapons. Are you sure you are using the correct weapon class name? You can find the classname using the weapons command.

Hello again,

No I was not using the correct weapon classnames. banghead.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">W_3 action ["drop weapon",Barrel,0,0,"UKF_SA80"]

Yes you are right, it works with both rifles and hand guns!

My second question was answered with the two numbers, too. And trying it a few times the direction of the guns change every time you start the mission.

But isn't it a shame your not able to find these information from the hands of BIS themselfs.

I can't remember that there was a reference from BIS in form of a Book or anything on the CDs nor in the BIS COMREF.

I mean a complete explanation of the Mission Editor and its functions.

Or have I just overseen this?  huh.gif

I know on one CD, Version 1.0, is a small html file how to built a mission but it was not very detailed.

Well, it is as it is and I think it is much more nicer to ask in forums and to have contact to other fellows.  welcome.gif

So thank you for your  help.gif .

Regards limmy3

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  

×