Jump to content
Sign in to follow this  
BAD ASS JACK

Weapons on ground

Recommended Posts

Can any1 help me with placing weapons on the ground, i have seen lots of instructions how to do so, but i cant still get it to work crazy.gifsad.gif

can any1 help/guide me, im useless wen it comes to scripting n that confused.gif

i keep hearing talk about weapon holders, invisable boxes and so on, i have tryied countless times! sad.gif

Im trying it with game logic...

Could any1 tell me wot else i would need to use, triggers and so on...

if possible could u give me it step by step?

like...

1: create something

2: name something ect

i know its a lot to ask, but any help would be so apreaseted

biggrin.gif

Share this post


Link to post
Share on other sites

I created a script for this a while ago:

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

;__

;::::::::::::::::::::::::

;--Init vars

_table = _this select 0

_weapon = _this select 1

_ammo = _this select 2

_height = _this select 3

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]

<span id='postcolor'>

You use this script by:

1. Save the script into a text file in notepad, give it the name and extension 'weapon.sqs', put the script into the missions folder.

2. Create a gamelogic (anyname you want) place this gamelogic at the place you want the weapon to be.

3. In the gamelogics init field put:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">[nameofgamlogic, weaponname, ammoname, heightoffground] exec "weapon.sqs"<span id='postcolor'>

Replace 'nameofgamelogic' with the name you used with your gamelogic.

Replace 'weaponname' with the name of the weapon you want to use, for example "Glocks"

Replace 'ammoname' with the name of the ammo for the weapon you want to use, for example "Glocksmag"

Replace 'heightoffground' with the height off the ground you want it to be in meters, keep this at 0 unless you want to put the weapon on a table.

That should work.

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  

×