OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Martin Kuka on 11 Aug 2006, 15:36:59

Title: A simple task
Post by: Martin Kuka on 11 Aug 2006, 15:36:59
I know it was displayed somewhere around here already, but I don`t have enough time to search for it.
So I have to ask...I need to put a radio up on the table.
I do remember that a command for that was "setpos" or something like that.
But only thing I have, is that I have a table and a radio under...
Thanx ;D
Title: Re: A simple task
Post by: rado1265 on 11 Aug 2006, 16:06:43
In Init field of your radio put

Code: [Select]
this setPos [getPos this select 0, getPos this select 1, (getPos this select 2) + 0.965]
The last number (0.965) is the height of the object, and it's already set on the 'table height', but if not, then adjust it yourself a bit.
Title: Re: A simple task
Post by: macguba on 11 Aug 2006, 16:07:15
radio1 setPos [(getPos table1 select 0) + a, (getPos table1 select 1) + b, x]

where x is the height you need.   Experiment.   Syntax not guaranteed.    a and b are offsets so the radio is in the right place relative to the table.    Use setDir to rotate the radio if required.   a,b and x are numbers in metres.

Edit:  rats, too slow ...
Title: Re: A simple task
Post by: Martin Kuka on 11 Aug 2006, 16:23:29
Got it ;D Thanx guys