Jump to content
Sign in to follow this  
thdman1511

Controlling AI while creating intro.

Recommended Posts

I am wondering whether or not there is a precise way to control AI while creating a intro. I was creating an intro where two csat crew got into a T-100 tank. The waypoint actually was a straight line to the tank, but the AI, did not move directly towards the tank, the AI went behind the camera man, over the guard rails and back towards the tank and finally entered the tank. I selected the tank as the camera target, but it tracked the crew. I even tried maxing out the unit skills but still no luck.

Is there a way to get the AI to follow the waypoints. I just wish the UnitCapture and UnitPlay were functional in Arma 3, that way I could get the intro more precise.

Any help would be much appreciated.

Share this post


Link to post
Share on other sites

This is the kind of stuff that makes working on cutscenes such a pleasant enterprise. With careful placement of your units and some scripting (combatmodes, behaviour's etc) you should be able to achieve what you want.

UnitCapture and UnitPlay are functional in A3. I guess it's main purpose is to be used on aircrafts... You can use it on infantry too (as BIS did in the gunship showcase for example) but that's a whole lot of work and definitly not necessary in this case.

Concerning the other thread you have started, maybe post your camera script so people can see where the problem is.

Share this post


Link to post
Share on other sites

Waypointing units to get in transports makes their path a bit unpredictable. Sometimes they will decide to go straight, sometimes not.

Unitplay may be the best solution.

Another is to directly use animations, like place the unit in the exact spot, use the animation of walking, the anim of entering the vehicle etc..

Share this post


Link to post
Share on other sites

A lot of the problem is to do with timing so how ever much you try, adding another object or units will simply mess everything up.

Share this post


Link to post
Share on other sites
Waypointing units to get in transports makes their path a bit unpredictable. Sometimes they will decide to go straight, sometimes not.

Unitplay may be the best solution.

Another is to directly use animations, like place the unit in the exact spot, use the animation of walking, the anim of entering the vehicle etc..

Although I'm sure using UnitPlay can be avoided, here's how BIS did it:

private ["_unit"];
_unit = BIS_Recon01;

if (alive _unit) then {
private ["_movementData"];
_movementData = <HUGE WALL OF RECORDED DATA>;

// Start sequence
private ["_sequence"];
_sequence = [_unit, _movementData] spawn BIS_fnc_UnitPlay;

// Disable AI entirely
{_unit disableAI _x} forEach ["ANIM", "AUTOTARGET", "FSM", "MOVE", "TARGET"];

// Take off combat mode
_unit setBehaviour "AWARE";
_unit setUnitPos "AUTO";

// Get in the helicopter
_unit assignAsCargo BIS_Mi48;
[_unit] orderGetIn true;

// Start crouched
_unit switchMove "AmovPknlMstpSrasWrflDnon";

sleep 0.25;

if (alive _unit) then {
	// Stand up
	_unit switchMove "AmovPknlMstpSrasWrflDnon_AmovPercMstpSrasWrflDnon";

	sleep 0.5;

	if (alive _unit) then {
		// Start moving
		_unit playMove "AmovPercMrunSrasWrflDf";

		sleep 8;

		if (alive _unit) then {
			// Stop moving
			_unit playMove "AmovPercMstpSrasWrflDnon";

			// Wait for the sequence to end
			waitUntil {scriptDone _sequence};

			if (alive _unit) then {
				// Re-enable AI
				{_unit enableAI _x} forEach ["ANIM", "AUTOTARGET", "FSM", "MOVE", "TARGET"];

				_unit setPos position _unit;
				_unit switchMove "AmovPercMstpSrasWrflDnon";
			};
		};
	};
};
};

So despite the common belief, UnitPlay can be used with infantry, but only looks acceptable if an animation is added. I recently used this, I had a hostage in a fortified building and after he was freed he would never find his way out of the building. No idea why it looks nice in BI's showcase, in my mission it looks extremely quirky, especially since the unit is not moving in a straight line and down some stairs etc.

Anyways, you just have to insert the recorded data and change the name of the vehicle.

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  

×