Jump to content
Sign in to follow this  
Solarghost

How do can I get AI to be on roof tops?

Recommended Posts

Is there a script or something I put in the init line of the soldier to make him on top of a roof?

Cheers!

Share this post


Link to post
Share on other sites

Hi Solarghost,

To my knowledge, you need to setPos the AI at the x,y coordinates of a building/house and then set the height value (z) (e.g., 10) so the AI is spawned up in the air at the specified height so then it will free-fall to the top of the building.

I've done this manually since not all the buildings have a flat roof.

If you know the ID of a building then you could use it to get the above coordinates.

I hope this helps. Good luck!

Best, Splicer.

Share this post


Link to post
Share on other sites

Real Time Editor, any I find that whenever I place a unit on top of a building in 2D editor without any setPos he just stands on the roof no problem. The thing is getting the right values for Z when setPosing inside a building otherwise they get hurt :/

Share this post


Link to post
Share on other sites

@ Andy455,

You're right. I forgot about that. Here's where if the 3D editor were available (again) this would be very easy to do.

I've spent so much time fine-tuning manually units to be placed exactly where I want them to be on roofs and other places too. :P

Thanks for the reminder Andy455.

Best, Splicer.

Share this post


Link to post
Share on other sites

I know this is an old thread...

In the soldier's init field, write "this setflyinheight X", where X is a height above the building, such as 100. It must be above the surface you want them to be on. It makes no difference. This automatically places the soldier at 100m, then instantly teleports them to the next highest object, such as the top of a building, without getting hurt.

Share this post


Link to post
Share on other sites

In the soldier's init field, write "this setflyinheight X", where X is a height above the building, such as 100. It must be above the surface you want them to be on. It makes no difference. This automatically places the soldier at 100m, then instantly teleports them to the next highest object, such as the top of a building, without getting hurt.

COOL!!!! Man.... This could've saved me LOTS OF HEADACHES and TIME!

THANKS FOR THE TIP!!!! :yay:

Best, Splicer

Share this post


Link to post
Share on other sites

Haha, I knew you'd love that one. I said it just for you :P

Makes copy-pasting units on to different-height buildings sooo simple!

Bump for simplicity! (As in, people need to see this (: )

Share this post


Link to post
Share on other sites
Haha, I knew you'd love that one. I said it just for you :P

Makes copy-pasting units on to different-height buildings sooo simple!

Bump for simplicity! (As in, people need to see this (: )

You da man! :worship:

:D Splicer.

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  

×