Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New option #342

Open
markanlb opened this issue Oct 21, 2024 · 0 comments
Open

New option #342

markanlb opened this issue Oct 21, 2024 · 0 comments
Labels
backlog Might be done at some point

Comments

@markanlb
Copy link

markanlb commented Oct 21, 2024

Hi, I was thinking about a new function for "3den-Enhanced".
An option in the attributes to spawn the unit as an "Agent".

I made a little code that could allow it.
Thanks for your work. Keep it up 👍

private _unitAgent = this;

private _position = getPosATL _unitAgent;
private _direction = getDir _unitAgent;
private _type = typeOf _unitAgent;
private _animationState = animationState _unitAgent;
private _unitAgentLoadout = getUnitLoadout _unitAgent;
private _unitAgentVariables = allVariables _unitAgent;
private _localVariables = [];

{ _localVariables pushBack [_x, _unitAgent getVariable _x]; } forEach _unitAgentVariables;

deleteVehicle _unitAgent;

private _agent = createAgent [_type, _position, [], 0, "CAN_COLLIDE"];
_agent setDir _direction;
_agent setVariable ["BIS_fnc_animalBehaviour_disable", true];
_agent switchMove _animationState;
_agent setUnitLoadout _unitAgentLoadout;
{ _agent setVariable [_x select 0, _x select 1]; } forEach _localVariables;
@R3voA3 R3voA3 added the backlog Might be done at some point label Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Might be done at some point
Projects
None yet
Development

No branches or pull requests

2 participants