OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Salminen on 24 Jan 2004, 22:35:37

Title: How to make unit appear on the roof or a different floor on a building ?
Post by: Salminen on 24 Jan 2004, 22:35:37
I know this has answer in FAQ but somehow the FAQ isn't working for me right now, so could you help me out here ?
Title: Re:How to make unit appear on the roof or a different floor on a building ?
Post by: GrimMonkey on 24 Jan 2004, 23:12:14
There are two ways for the roof and one for a different floor.
The easiest for the roof is to just select 'Flying' under Special.

Or you could use:
Code: [Select]
This SetPos [GetPos This Select 0, GetPos This Select 1, x]for both roof and floors.
x=height (have to experiment to find the height you need).


Beware the GrimMonkey
Title: Re:How to make unit appear on the roof or a different floor on a building ?
Post by: h- on 24 Jan 2004, 23:12:57
never mind...

Im too slow today  ;)

However, does the Flying actually do anything to land vehcicles 'cause I have never seen any different behaviour when using it?

If you set a dude with Special:none, in formation or flying and place him over a apartment building he will be on the roof if not positioned too close to the edge regardless of the Special settings...
Title: Re:How to make unit appear on the roof or a different floor on a building ?
Post by: SilentHunter on 25 Jan 2004, 00:04:53
When you place a unit down, with no special or cmd line - then OFP automaticly puts them on the highest walkable surface.

Setting the special to 'flying' has no effect on land units whatsoever - (as far as i know)

SILENTHUNTER
Title: Re:How to make unit appear on the roof or a different floor on a building ?
Post by: macguba on 25 Jan 2004, 02:15:11
If you attach a waypoint to an enterable building, you get new options in the waypoint allowing you to specify which position in the building the loon will occupy.
Title: Re:How to make unit appear on the roof or a different floor on a building ?
Post by: Dubieman on 25 Jan 2004, 02:56:28
A word of warning though, unoccupieable buildings will have units placed inside of them, and not on the roof.
This really screws with the player controlled unit since you cannot move and the graphics are just weird. :-\

AI won't have a problem, they mysteriously can walk through walls, so they won't get stuck like you. ::)

That script Grim Monkey put up works great for anything except tanks.

Last thing I gotta say is that the building postion option in waypoints works well at times and screws up too. An AI may be facing a wall instead of a window, or might not even go into the building at all.

Okay I'm done now. :cheers:
Title: Re:How to make unit appear on the roof or a different floor on a building ?
Post by: h- on 25 Jan 2004, 12:09:57
If you attach a waypoint to an enterable building, you get new options in the waypoint allowing you to specify which position in the building the loon will occupy.
:o

I never knew that....
Well, every day we learn something new  :)