Jump to content

Recommended Posts

Here's a super simple script to use when you have speaking AI and want to synchronize them moving their lips.  The parameters are the unit who is talking, and # of seconds to do do the lip animation.

// ***********************************************************************************
// JBOY_Lip.sqf
// Do random lip for X seconds
// Compile in init.sqf:    JBOY_Lip =  compile preprocessFileLineNumbers "Scripts\JBOY_Lip.sqf";
// Call:                   _n = [dude, 3] call JBOY_Lip;
// ***********************************************************************************
params["_speaker","_seconds"];

_n = [_speaker,_seconds] spawn
{
    params["_speaker","_seconds"];
    _speaker setRandomLip true;
    sleep _seconds;
    _speaker setRandomLip false;
};

Sample usage might go like this:

dude1 sideRadio "YouTotallySuckDude";
_n = [dude1, 3] call JBOY_Lip;
sleep 3;

dude2 sideRadio "ThanksDude";
_n = [dude2, 1.5] call JBOY_Lip;
sleep 1.5;

 

  • Thanks 2

Share this post


Link to post
Share on other sites

It is possible to make this into a mod so it affects AI within your visible range? This way it can work with other SP missions.

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

×