OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: LordTedrick on 16 Jun 2006, 22:09:42

Title: How to create Lasers radio on a table?
Post by: LordTedrick on 16 Jun 2006, 22:09:42
Please help me ;D
Title: Re: How to create Lasers radio on a table?
Post by: Gogs on 17 Jun 2006, 04:12:05
I'm not quite sure what you mean by the question. Can you be more specific?
Title: Re: How to create Lasers radio on a table?
Post by: LooseKannon on 17 Jun 2006, 06:47:47
Do you mean as in place a object onto a table, adam vaughan? If so, quite easy to do.

Just place a table, place the radio in the same place, and put

Code: [Select]
this setpos [getpos this select 0, getpos this select 1, x] (x) is the height (in metres, try 0.8)  into the Init line of the Radio. You might have to move it around a bit to get it in the right place.
Hope this helps!
Title: Re: How to create Lasers radio on a table?
Post by: LordTedrick on 17 Jun 2006, 13:21:47
I can place items on a table, but I need to start a mission with Lasers radio (LSR_prc117new) on a table so the objective is to recover the radio.  I have tried radio = "LSR_prc117new" camCreate  [(getpos targ1 select 0), (getpos targ1 select 1),1] but it never appears.

Title: Re: How to create Lasers radio on a table?
Post by: myke13021 on 18 Jun 2006, 16:04:47
try to put the radio in the editor and the just setpos it. I don't see any reason why you try to camcreate it since it has to be there from beginning.
Title: Re: How to create Lasers radio on a table?
Post by: LordTedrick on 19 Jun 2006, 15:03:55
I did not think that the Radio is an in editor item, but is classed as a weapon from Laser's Weapon pack.
Title: Re: How to create Lasers radio on a table?
Post by: The-Architect on 19 Jun 2006, 15:27:57
Code: [Select]
;Gun Table Script By Killerbob [GST] (for one weapon only)

~0.1
_table = _this select 0
_gun = _this select 1
_ammo = _this select 2
_height = _this select 3
_vertical = _this select 4
_type = "weaponholder"
?_vertical:_type = "secondaryweaponholder"

_kb_testman = "SoldierWB" camcreate [0,0,0]
removeallweapons _kb_testman
_kb_testman addweapon _gun
?(secondaryweapon _kb_testman)==_gun:_type = "secondaryweaponholder"
?((secondaryweapon _kb_testman)==_gun)&&_vertical:_type = "weaponholder"
deletevehicle _kb_testman


_weapon = _type createVehicle [0,0,0]
_weapon addmagazinecargo [_ammo,10 ]
_weapon addweaponCargo [_gun,1]
_weapon setpos getpos _table
_weapon setdir (getdir _table)

_table setdir (getdir _table) + 1
_weapon setpos [(getPos _table select 0) + 0.1 * sin (getdir _table),(getPos _table select 1) + 0.1 * cos (getdir _table),(_height)]
player reveal _weapon

exit

In your trigger.

Code: [Select]
[tablename,"radioname","radioname",0.955] exec "table.sqs"
It's something like that I'm sure of it.
Title: Re: How to create Lasers radio on a table?
Post by: LordTedrick on 20 Jun 2006, 12:46:10
Thank you, I will try this out tonight.