Jump to content
Sign in to follow this  
Jaypaul9

How do I put someone INSIDE house?

Recommended Posts

How is it done? When I place a person on a house they appear on the roof! Any way I can put them inside the house to have a sort of breach and clear type of thing?

Share this post


Link to post
Share on other sites

Create radio trigger:

copyToClipboard format ["this setPosATL %1;this setDir %2",getPosATL player, getDir player]

Go to what position you want them inside the house, call radio alpha or whatever, go back to the editor, place whatever unit you want, set it's stance to what you want then you actually have to turn the guy the direction you want them to in the editor.

Share this post


Link to post
Share on other sites
How is it done? When I place a person on a house they appear on the roof! Any way I can put them inside the house to have a sort of breach and clear type of thing?

Check this out. It works really well and is simple to use.

Share this post


Link to post
Share on other sites

Thanks for the responses everyone, I'll toy around with it and hopefull figure it out.

Share this post


Link to post
Share on other sites

I found this gem and have been using it.

Create a group and in the group leader's init put

_script = group this execVM "PlaceInBuilding.sqf"

Then copy the below script and name it PlaceInBuilding.sqf

/*
================================================== ========================
Place infantry groups in buildings script
================================================== ========================
Credits:
Original idea is by DaveP.
Improved, reworked into SQF and changed to group positioning by [MB] DiRaven
You can use, rework, change and enjoy this script anyhow you want.
Still credit is appreciated.
================================================== ========================
Description:
This script places desired group of infantry units into the nearest available buildings.
================================================== ========================
HowTo:

Place group leader near building of choice, then:
syntax for scripts:
group execVM "PlaceInBuilding.sqf"

syntax for init field for the leader of the desired group:
_script = group this execVM "PlaceInBuilding.sqf"

Extra info:
- Removes hand grenades, otherwise dumb infantry try and throw a grenade from inside a building and frag themselves
- Will delete group if no building position is found
- Buildings id being searched near group leader's position
- All members of the group are each joined into another newly created groups to prevent them from getting back into formation
- You can change _check_distance variable to change search distance for entrable buildings
================================================== ========================
History:
v0.1 - First version of the script.
================================================== ========================
*/
if (isServer) then
{	
_mode = ["YELLOW", "RED"] call BIS_fnc_selectRandom;
_grp setBehaviour "AWARE";
_grp setCombatMode _mode;

};

_group = _this;

_leader = leader _group;

_check_distance = 100; // Change this to tweak building searching distance

_arr_buildings = nearestObjects [_leader, ["HOUSE"], _check_distance];
_buildingcount = count _buildings;

_arr_positions = [];
{
_i = 0;
_positions_checked = FALSE;
while {not _positions_checked} do {
_position = _x buildingPos _i;
_coord_x = _position select 0;
_coord_y = _position select 1;
_coord_z = _position select 2;
_coord_sum = _coord_x + _coord_y + _coord_z;
if (_coord_sum == 0) then {
_positions_checked = TRUE;
} else {
_arr_positions = _arr_positions + [_position];
_i = _i + 1;
};
};
} foreach _arr_buildings;

{
_newgroup = createGroup side _leader;

[_x] join _newgroup;

if (count _arr_positions == 0) then {
deleteVehicle _x;
};

_position = _arr_positions select random count _arr_positions;

_x setPos _position;
_x setDir random 360;

_x removeWeapon "HandGrenade_East"; _x removeMagazines "HandGrenade_East";
_x removeWeapon "HandGrenade_West"; _x removeMagazines "HandGrenade_West";
_x removeWeapon "HandGrenade"; _x removeMagazines "HandGrenade";
_x setUnitPos "UP";
} foreach units _group;

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  

×