Jump to content
Sign in to follow this  
1in1class

Plzzz Help on this

Recommended Posts

Plz some one help me on this, how do i put an unit inside an building in the mission editor when makeing an mission? Plz this iv been trying so many times, i just dont know how to put them in an building or like if there in an 3rd level building how do i put them in an room? PLLLLZ

Share this post


Link to post
Share on other sites

Try adjusting the units height with the setpos command

init line:

this setpos [getpos this select 0, getpos this select 1, (getpos this select 2) + x]

x = adjusted height above ground.

Share this post


Link to post
Share on other sites

Harnu, instead of choosing the lazy way, please edit your post wink_o.gif

(Placebo-style, just reversed this time tounge2.gif )

Aaaanyhow, a unit will always be placed on the highest available "roadway" platform, setpossing can be a bit annoying, when you use Harnu's script, the unit might be setpossed relatively to the ground, OR to is't current roadway lod, if you move it an inch... confused_o.gif .

Share this post


Link to post
Share on other sites

Hi,

Using the command Buildingpos works quite well, although you have to pick from the pre-defined positions in the building, if they have been defined.

Something like:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Unit01 SetPos (BuildingPos [Object 37,1])

Oh..The Object command uses the index displayed when you select the show object index option in the editor.

If you click on the links, you can read more about each command at OFPEC.

Share this post


Link to post
Share on other sites

You could also place the unit outside the house.  Place a MOVE waypoint ON THE HOUSE and you will see the option "Position in house" and you can pick where you want them to go.

Now you have to worry about keeping them standing when shooting. confused_o.gif

Doolittle

Share this post


Link to post
Share on other sites

Once you have identified the building position that you would like to use, you could try GB's "Simple Cover" script available here.

The script allows you to keep your units grouped without them wandering around, and if placed correctly, a unit on the south side of town/buliding will inform his team mate on the north side of an enemy's position.

I have made a script that will randomly place units in different buildings and positions when the appropriate information is entered into an array (original concept/script by Daddl and modified by me). If interested, let me know and I will dig it up from my HD and post it.

Wadmann

Share this post


Link to post
Share on other sites
Quote[/b] ]You could also place the unit outside the house.  Place a MOVE waypoint ON THE HOUSE and you will see the option "Position in house" and you can pick where you want them to go.

   Wow, I've had Flashpoint point for years now and I never knew that. Thanks for sharing that.

Share this post


Link to post
Share on other sites

In one trigger, activated by radio alpha, on avtivation field :

hint format["Cur pos\nX : %1\nY:%2\nZ:%3",getpos player select 0, getpos player select 1,getpos player select 2]

Oh, change it to "Activated : Repeatadly"

Then, you walk to the door, so your just standing in it, press the radio thing (0-0-1)

Then, write down those numbers, then, move to the next main point (in line-of-sight, like waypoints), write number down

Then... Once you have all your waypoints..

make a new script up

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit=_this select 0

_unit move [the x value, the y value, the z value]

~3

_unit move [the x next value, the next y value, the next z value]

Basicly, your accuratly telling the AI to move the points you wrote down.. So walking to the door, though it, up the stairs etc..

It's wont be the more reliably thing, and if theres enemys about, expect suicidal-ghost AI..

- Ben

Share this post


Link to post
Share on other sites

Yeah, AI have a tendancy to walk through walls sometimes, and other times to get hung up on door frames.  Remember OFP is just one big terrain engine with a whole bunch of objects/models placed on it.  This is unlike a Quake or HalfLife map where each house is constructed as part of the map.  It is interesting to see HalfLife2 also putting objects/models all over their maps to save processing time (like rubble and window frames on buildings are just repeated models).

Armed Assault will have "better close quarter combat" and I am assuming/hoping this means AI movement within buildings (models).

Doolittle

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  

×