Home   Help Search Login Register  

Author Topic: New member with a question....  (Read 1079 times)

0 Members and 1 Guest are viewing this topic.

DeAtHhAwK

  • Guest
New member with a question....
« on: 14 Aug 2006, 19:52:01 »
First of all, hello! First time poster here, so go easy on me.

Am currently making a mission, in which I have a tent that I wish to place an ammo crate and a few weapons just lying on the floor inside, kinda like a mini armoury.

No problem with ammo crate, or actually creating the weapons in question, however there is one problem that I don't know how to address: I'd like certain weapons to be lying a certain way, e.g an AA Launcher laid down on it side, a machine gun resting upright on it's stock and cartridge. However, when these weapons are created they seem to be at an odd angle, and I don't know how to change it! For example, the AA Launcher sticks straight up in the air! Not very realistic to say the least....

Any idea how I get the weapons sitting just how I want them?

Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: New member with a question....
« Reply #1 on: 14 Aug 2006, 20:16:35 »
Welcome to the forums. I hope you will find that this is a quite friendly place. This problem has been discussed numerous times. I will see if I can find a link for you *sneaks off and searches*

EDIT:

*returns*
I couldn't find it right now. But this is what I was looking for. There was a script made by a former staff member named stonedSoldier. It ws a general script that made it quite easy to create different weapons, and as far as i can remember he also made it possible to tilt the weapons in different angles, so they could be displayed standing up (like your MG) or hanging from a wall. I cannot seem to find it right now. I will be back again later today and try again, unless you manage to solve your problem first.
« Last Edit: 14 Aug 2006, 20:23:47 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re: New member with a question....
« Reply #2 on: 14 Aug 2006, 21:26:50 »
Well without doing anything fancy like StonedSoldier's script you could try creating a weapon holder and then adding a weapon to it.  A weapon holder is like an invisible ammo crate.  Here is the code I used for one of my missions:

Code: [Select]
_whx = 7146
_why = 6050.5
_whz = 0.1
wH1 = "weaponHolder" createVehicle [_whx,_why,_whz]
wH1 addMagazineCargo ["M16", 2]
wH1 addWeaponCargo ["M16", 1]
wH1 setPos [_whx,_why,_whz]
wH1 setDir 240
wH2 = "weaponHolder" createVehicle [_whx,_why,_whz]
wH2 addMagazineCargo ["HandGrenade", 2]
wH2 setPos [_whx+1.7,_why+1.4,_whz]
wH2 setDir 45

It creates two weapon holders and puts an M16 + 2 mags in one and 2 handgrenades in the other.

Bye the way a weapon holder that just has ammo - or grenades looks like quite a neat satchel, a weapon holder with a weapon in is invisible and you just see the weapon.  The weapons should be lying down.  You can alter the vertical height by changing whz.  I have it set to 0.1 beacuse they are to be placed inside a building.  You can put them on top of tables by setting whz = 1 (ish)  you need to experiment.  To get them to be at different angles you would need StonedSoldier's script - and I don't have it.
« Last Edit: 14 Aug 2006, 21:38:01 by THobson »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: New member with a question....
« Reply #3 on: 14 Aug 2006, 21:37:26 »
you should also make use of "secondaryweaponHolder" which will create the vertical effect for weapons.

and welcome to OFPEC! :)

DeAtHhAwK

  • Guest
Re: New member with a question....
« Reply #4 on: 15 Aug 2006, 22:10:38 »
Thanks for the help guys. I already knew about 'weaponholders', but didn't know about 'secondaryweaponholder'. This appears to have done the trick well enough. The stuff I want is now inside the tent and looks like it's nicely laid on the floor. Shame I couldn't get hold of StonedSoldiers script though, could have been useful! Nevermind....
« Last Edit: 15 Aug 2006, 22:14:37 by Ian Webster »