Jump to content
Sign in to follow this  
Storm-dk

Laying weapon

Recommended Posts

hmm.. I was worndering if you can make a weapons lay on the ground.. FX. a AK-47 laying on the ground or on a table .. What can i do to make it do that..?

Storm out..

Share this post


Link to post
Share on other sites

I was trying to do the same thing earlier. i was curious if ther was way to camcreate a weapon (I.E. an AK47) and then I could setpos or change it's azimut to put it on a table.

Share this post


Link to post
Share on other sites

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

_Dragunov = "WeaponHolder" createVehicle [_x,_y,_z];

_Dragunov AddMagazineCargo ["SVDDragunov", 1]; _Dragunov AddWeaponCargo ["SVDDragunov",1]

This will create a SVDDragunov on the _x,_y,_z coordinates.

Share this post


Link to post
Share on other sites

Sweet, I'll give that a shot in a little while. That has to be script executed right? Or can I do it through triggers?

Share this post


Link to post
Share on other sites
well.. it didnt .. sorry

Did you mean this didn't work?

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

_table = _this select 0

_weapon = _this select 1

_ammo = _this select 2

_height = _this select 3

_dir = _this select 4

weapon = "WeaponHolder" createVehicle [getpos _table select 0,getpos _table select 1,(getpos _table select 2) + _height]

weapon addweaponCargo [_weapon,1]

weapon addMagazineCargo [_ammo,4]

weapon setpos [getpos _table select 0,getpos _table select 1,_height]

weapon setdir _dir

Exec the script with:

Code Sample  

[nameofgamlogic, weaponname, ammoname, heightoffground, range from 0 - 360] exec "weapon.sqs"  

If I remember right you have to add "s for the weaponname, like "m16" to make it work. It worked for me.

Share this post


Link to post
Share on other sites

What is the problem? If you give no details/error messages you are getting it will be impossible to help you.

RED

Share this post


Link to post
Share on other sites

Uhhh theres a script in OFPEC editing section that has a little example missions and everything and yes you can use triggers to execut it

/CympatheeY

Share this post


Link to post
Share on other sites
Quote[/b] ]If I remember right you have to add "s for the weaponname, like "m16" to make it work. It worked for me.

Also add quotation marks where ammoname is. Unless of course, you want the weapon to act like a prop.

*EDIT*

How would you remove the option to pick up the weapon?

Share this post


Link to post
Share on other sites

If you dropped the weapon model you wouldn't be able to pick it up (by dropped I mean use the drop command)

RED

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  

×