Jump to content
Sign in to follow this  
AlexRUS

How to get specific position inside the house?

Recommended Posts

I'd like to find simple solution to find central position of the room in the house. 

This code works good.

_building = nearestBuilding _house;
createVehicle ["ACE_medicalSupplyCrate", _building buildingPos 1, [], 0, "NONE"];
createVehicle ["Box_FIA_Support_F", _building buildingPos 3, [], 0, "NONE"];

But the problem is buildingPos 0, 1, ... n positions probably not a center of the room, it can be windows, doors, and other places. Maybe its good to place units, but not good to place crates and boxes.

Maybe you can help me another way to find out how to place crates boxes and crates to the center of the building. And, one more thing - how to find place on the ground floor, 1st, 2nd, etc.?

Thanks.

Share this post


Link to post
Share on other sites

Place a soldier on the map (you).

Place an ammo box in the building. Place it on any floor you wish.

Start the mission. Walk into the building and make sure the box is in the right place.

If it is in the wrong place go back to the editor and move the box around.

Keep doing this till it is in the right place.

Now click on the box and read the X, Y, Z coordinates.

 

You can now use a script to place the box on those coordinates.

 

While you are getting the position correct, you can make minor adjustments to the coordinates to get the box just right, rather than moving it with your mouse.

.

 

.

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites
6 hours ago, Joe98 said:

You can now use a script to place the box on those coordinates.

Thanks, but it's not a solution, because houses are always random.

Share this post


Link to post
Share on other sites

I think you must set the location of each house manually and when script running detect house type and place box.

Share this post


Link to post
Share on other sites
16 hours ago, AlexRUS said:

Thanks, but it's not a solution, because houses are always random.

 

You could place a box in every house and then there will be a box in all houses selected at random.

.

 

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  

×