OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: marcus3 on 12 Mar 2005, 22:43:20
-
is there a way to put a gun on a table or something?
i saw this in some screen shot but cant find it now.
-
dammit i put 2
-
http://www.ofpec.com/editors/browse.php?browseon=&browsewhat=2&category=2_8&subcategory=2_8&numreturn=25&displayformat=0&ofpv=1&searchstring=weapon+vehiclecreate&searchwhat=2&searchlevel=1&searchopts=
;)
-
dammit i put 2
sprout yer posts? eh ??? :o ;D try the delete button m8 :)
as for the Q :
create the weapon with a wp holder ("invisible crate")
;) W1="WeaponHolder" createVehicle Getpos G1; W1 addMagazineCargo ["M16",4]; W1 addWeaponCargo ["M16",1] :-*
then: simply use some object or trigger named "G1", and then you can setPos the W1 upwards.
W1 setpos [getpos G1 select 0, getpos G1 select 2, 7] ...where 7 is 7 meters up 8)
-
In the intialization field of gun use this set/GetPos script
here ya go
this setpos[getpos this select 0, get pos this select 1,(getpos this select 2) +0.7]
Unfornately you have to mess around with the last number{+0.7} a bit to have the gun look right on table.
My advice copy this snippet down some where cause one always comes back to it eventually. It's good for putting gaurds in towers, big sandbag Fortress,..ect.
-
just adding
w1 setpos[(getpos this select 0),(getpos this select 1), X]
change the X for any number, it is in meters, the distance from the ground (I guess :P)