Jump to content
Sign in to follow this  
icehollow

placing units/objects inside of buildings

Recommended Posts

wanted to create a room clearing training mission for the clan im in , but i don't know how to place units inside of buildings , such as the one you do in that campaign mission to snipe the officer.

help appreaciated notworthy.gif

Share this post


Link to post
Share on other sites

thanks , but im looking to get the steel targets object into a building , do i go about that in the same way displayed in linked thread?

Share this post


Link to post
Share on other sites

I think the way to get non-living objects in buildings are a little different.

Name the object in the name field.

then out something like this in the init field:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unitname setpos [0,0,+5]

You can check the setpos command in the BIS wiki but I think this will work. The array is [x,y,z] (Z is setting the height from ground level).

Hope this helps smile_o.gif

Share this post


Link to post
Share on other sites

guys , i'm really sorry but can someone make me a quick display mission , ive been trying for a while now to get these bloody targets into the building without them all being on the same floor and position but to no avail. sorry once again , but it seems every help thread i make i always seem to need a display mission to show me how to do it.

Share this post


Link to post
Share on other sites

Hi!

Use this syntax:

this setpos (nearestBuilding this buildingPos 1)

Set the Unit direct to the house on the map and change the

number. You´ll see in preview that the soldier will stay

anywhere at or in the building.

this setpos (nearestBuilding this buildingPos 2)

this setpos (nearestBuilding this buildingPos 3)

...

Regards,

Mr-Murray

Share this post


Link to post
Share on other sites

the quickest way is to place the target on the building , then type in the activation field the usual :

<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) + 0]

just tried it ,works perfect.

it also allows to place the object on the level of your choice.

Share this post


Link to post
Share on other sites

well what im trying to do is create a training mission were yor squad starts about 2kms away from target area with a helicopter to transport you to roof then you are to clear all the rooms and floors in hotel....trying again

Share this post


Link to post
Share on other sites

just did it , and yes thank you simba , it worked the best so far , but is there anyway i can like copy and past units? dont want to be up all night retyping the script into each unit. tounge2.gif

Share this post


Link to post
Share on other sites

of course

copy --> CTRL C

paste--> CTRL V

like in windows biggrin_o.gif

Share this post


Link to post
Share on other sites

yeah that was stupid of me , i quickly firgured it out after posting . anway , i managed to get placement of targets better . ill attach the mission , if someone could please improve it so i may learn from it? so far for test purposes ive set up player on roof and all targets are on 2nd floor i think.

http://www.ihud.com/file.ph....mis.rar

Share this post


Link to post
Share on other sites

It might help if you added some objects to represent hostages.

Like a barrel-or real civilians

name them hostage1 - hostage 2 and so on

In a Trigger's condition field:

(damage hostage1) >.9

In Trigger's On Act. field:

Hint "You Shot a Hostage!!!"

Just a thought. Keep working on it.

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  

×