OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: GrimMonkey on 22 Aug 2003, 04:04:48

Title: On Roof
Post 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?
Title: Re:On Roof
Post by: Siber Fox on 22 Aug 2003, 04:33:42
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.
Title: Re:On Roof
Post by: Captain Winters on 22 Aug 2003, 05:02:56
If you have Resisatnce, I do believe it does it automatically!  :)

Tanks!  8)
Title: Re:On Roof
Post by: Captain Winters on 22 Aug 2003, 05:03:28
btw that code Fox gave you goes into the units init

Tanks!  8)
Title: Re:On Roof
Post by: GrimMonkey on 22 Aug 2003, 05:39:09
Thank you, I'll put it to great use. :)
Title: Re:On Roof
Post by: SheepOnMintSauce on 22 Aug 2003, 20:38:01
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
Title: Re:On Roof
Post by: GrimMonkey on 22 Aug 2003, 20:54:43
Thanks, I just tried the script way, it works, but I'll have a go at 'flying' :).
Title: Re:On Roof
Post by: GrimMonkey on 22 Aug 2003, 21:02:52
What do ya know, they both work ;D.
Title: Re:On Roof
Post by: SheepOnMintSauce on 22 Aug 2003, 23:52:02
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.  ::)
Title: Re:On Roof
Post by: GrimMonkey on 23 Aug 2003, 01:56:59
So we really do need both kinds to effectvely get objects and humanoids on top of rooftops. Thanks for all your assistance :).