Jump to content
Sign in to follow this  
jpinard

How to place a person on top of an object (ex. on a tower)

Recommended Posts

I cannot figure this out and have searched everywhere. I just want to place an individual unit on top of an object or building - ex. Deer Stand, Illimunant Tower, House etc.

Thanks for helping :)

Share this post


Link to post
Share on other sites

Well you have to do it with setPos.

In the initialize field of the unit write:

this setPos [ (getPos this select 0), (getPos this select 1), (getPos this select 2) + 10];

The +10 is the high in meters. So this code will set the unit 10 meters higher.

You have to figure out which high is needed to get the position you like.

Share this post


Link to post
Share on other sites

I have a problem with the Illimunant Towers by the way. Just a warning for you. Whenever I seem to place men up there no matter what elevation I give them they always die or even if I don't give them an elevation. I can't figure out why. I don't really care that much because they aren't good positions anyway but I just thought I would warn you.

Share this post


Link to post
Share on other sites
Well you have to do it with setPos.

In the initialize field of the unit write:

this setPos [ (getPos this select 0), (getPos this select 1), (getPos this select 2) + 10];

The +10 is the high in meters. So this code will set the unit 10 meters higher.

You have to figure out which high is needed to get the position you like.

I'd suggest you use the new setPosATL (above terrain level) instead. The regular setPos can be a bit dodgy at times.

this setPosATL [getPosATL this select 0, getPosATL this select 1, 15];

...where 15 is the height.

Share this post


Link to post
Share on other sites

Wow, who would have thought it would be so complicated?

there are also some very good 3d editors out there.

Do you have a suggestion? I'm a bit overwhelmed.

Thanks! :)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×