Jump to content
johnnyboy

Use Prairie Fire Healed/Help audio in a script

Recommended Posts

I dug these commands out of the functions viewer.  You can  call these for player or an AI.  Each action (heal, healed, ,etc.) will randomly play one of many recordings for that type of action.  And the voice will have a Vietnamese accent if that unit has a Asian face (pretty cool).  You can try these one at a time via the debug console to see what is said.  This could be used for custom AI heal scripts, cutscenes, etc.  For example, you could call the "help" one via onHit eventHandler, and "heal" and "healed" via a HandleHeal eventHandler

[player, "help"] call VN_fnc_revive_conversation;
[player, "heal"] call VN_fnc_revive_conversation;
[player, "drag_player"] call VN_fnc_revive_conversation;
[player, "undrag_player"] call VN_fnc_revive_conversation;
[player, "pickup_player"] call VN_fnc_revive_conversation;
[player, "movement"] call VN_fnc_revive_conversation;
[player, "dragged"] call VN_fnc_revive_conversation;
[player, "carried"] call VN_fnc_revive_conversation;
[player, "healed"] call VN_fnc_revive_conversation;
[player, "general"] call VN_fnc_revive_conversation;

In Single Player, if you want units in player group to use this chatter during healing or when hit, do the following in your init.sqf (or execute this via debug console):

JBOY_ambientHealTalk =
{
	params["_units"];
	{
		_x addEventHandler ["Hit", 
		{
			_this spawn 
			{
				params ["_unit", "_source", "_damage", "_instigator"];
				if (damage _unit > .5 and _unit getVariable ["JBOY_firstHit",true]) then
				{
					_unit setVariable ["JBOY_firstHit",false,true];
					[_unit, "help"] call VN_fnc_revive_conversation;
				};
			};
		}];
        _x addEventHandler ["HandleHeal", 
		{
			_this spawn 
			{
				params ["_injured", "_healer"];
				private _damage = damage _injured;
				if (_injured == _healer) then 
				{
					waitUntil {damage _injured != _damage or !alive _injured};
					if (damage _injured < _damage) then 
					{
						[_injured, "healed"] call VN_fnc_revive_conversation;
					};
				} else
				{
					[_healer, "heal"] call VN_fnc_revive_conversation;
					sleep 3;
					[_injured, "healed"] call VN_fnc_revive_conversation;
				};
			};
		}];
	} forEach _units;
};
[units group player] spawn JBOY_ambientHealTalk;

 

  • Like 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

×