Jump to content
Sign in to follow this  
Mr Sarkey

man or object inside building?

Recommended Posts

Whenever i put a man or an object above a building such as the enterable barn they appear on the roof. How can you get them inside? i have already tried the setPos script but it didnt work.

Share this post


Link to post
Share on other sites

setPos does work, but only with specific buildings.

To find out which buildings have assignable posistions, either go into the editor, and put a waypoint on top of a building, and you will then see a "position" drop-down menu.

Or walk around with a team member and point at a building. If it has positions defined it will be indicated so on your cursor.

Share this post


Link to post
Share on other sites

What is the exact syntax for placing a unit in a building? I know how to do the getpos player select 0, but how do i reference the building, and then the position # in the building? Could you provide a sample command of putting a unit in a specific location in a specific building?

Thanks,

Jeff

Share this post


Link to post
Share on other sites

random command is not ok for MP soo you should use

int.sqs<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

RandomHouse = compile preprocessfile "randomselect.sqf"

function sqf

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

//RandomSelect 1.1 by Daddldiddl

private ["_list","_ntotal","_random","_result","_target"];

_list=_this;

_ntotal=count _list;

_random=random(_ntotal);

_result=_random - ((_random) mod (1));

if (_result==_ntotal) then {_result=_result-1};

_target=_list select _result;

_target

and script wich calls function

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

_Houses = [4012,4136,4011,4023] call RandomHouse

_house = position unit1 nearestObject _Houses

unit1 Setpos (_house buildingpos 2)

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  

×