Jump to content
Sign in to follow this  
oblisk

Editor question

Recommended Posts

How do I change the elevation of unit/static/etc placements?

I want to place some static machine gun placements on houses, but I can't seem to find out how.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">This setPos [ getPos this select 0, getPos this select 1, (getPos this select 2) +10

You have to use the setPos command. The +10 at the end is what you adjust to fit the height you need. Put that in the object's init line.

Share this post


Link to post
Share on other sites
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">This setPos [ getPos this select 0, getPos this select 1, (getPos this select 2) +10

You have to use the setPos command. The +10 at the end is what you adjust to fit the height you need. Put that in the object's init line.

Does it have to be exactly as high as the houses? Or can I make higher then the actual building, and it'll set itself on the rooftop?

If not, how do I find out the height of a building to place it on?

Share this post


Link to post
Share on other sites

For the static guns, objects like sandbags you have to give the precise height. For other vehicle's and units you can just have it a little bit heigher but not to high other wise they could get hurt from the falling down.

On a side note did you take a look at the mission editor forum that is on the bottom of the main forum page?

Missionediting forum

Share this post


Link to post
Share on other sites

Please look around before posting to ensure you're posting in the correct place smile_o.gif

Moving to ME&S.

Share this post


Link to post
Share on other sites
For the static guns, objects like sandbags you have to give the precise height. For other vehicle's and units you can just have it a little bit heigher but not to high other wise they could get hurt from the falling down.

On a side note did you take a look at the mission editor forum that is on the bottom of the main forum page?

Missionediting forum

How would I find out the exact height (rooftop) of a house?

Is it trial and error?

Share this post


Link to post
Share on other sites
Is it trial and error?

Yes definately,

As thats the case with a fair few mission editing routines.

You can be very precise ie- 1.1 or 1.2 etc....etc........

You will have it in no time at all -

this setpos [getpos this select 0,getpos this select 1,1.5 etc]

Hope it all goes well for you.Altho just remember if your going to be puttin a static gun in a house on say the 2nd floor an that house gets destroyed,the static weapon will still be floating when\if tht house gets destroyed so you may have to look about for detecting when the building has been level'd so you can either delete or re setpos the static weapon or objects.

All the best

dan

Share this post


Link to post
Share on other sites

In the code;

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

What is "select 0" "this select 1" and "getPos this select 2" do?

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  

×