OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GrimMonkey on 22 Aug 2003, 04:04:48
-
How would one make it so that soldiers started out on a roof or on top of an object or building?
-
Well, Mr. Monkey, that can be solved with this:
this setpos [getpos this select 0, getpos this select 1, x]
x = the height of the object/building, you really need to use trial and error to get it right.
EX:
this setpos [getpos this select 0, getpos this select 1, 24.5]
is the height for the 2 tall towers in Petrovice on Nogovo
hope that helps.
-
If you have Resisatnce, I do believe it does it automatically! :)
Tanks! 8)
-
btw that code Fox gave you goes into the units init
Tanks! 8)
-
Thank you, I'll put it to great use. :)
-
What I usually do to make a unit start on the roof of a building, like those blocks of flats in Petrovice, I just set the units 'special' option to "flying", and the unit automatically starts on the roof of the building. ;D
-
Thanks, I just tried the script way, it works, but I'll have a go at 'flying' :).
-
What do ya know, they both work ;D.
-
I used the 'flying' method once for putting snipers on the rooftops in Petrovice. Worked a treat too. ;D
Ah, almost forgot. It doesn't like working with vehicals for some reason. I'm not quite sure why that is though. Tried putting a bike on top of the roof to drive it off, but alas it didn't work. ::)
-
So we really do need both kinds to effectvely get objects and humanoids on top of rooftops. Thanks for all your assistance :).