Jump to content
He'sCalledTheStig

Lip movement (AI "speaking") (setrandomlip) (solved)

Recommended Posts

So I've tried using the setrandomlip command. It works perfectly well in Singleplayer, but not on a dedicated server. I've looked into the .lip stuff, but honestly it's way too much work for just adding a minor detail in a mission. Is there a way to get setrandomlip working in multiplayer?

Currently what I've done is set up a trigger using the unit's variable name to start randomlip, then another one to end it set to activate several seconds later.


UPDATE: unticked "server only" on trigger. It now works.

Share this post


Link to post
Share on other sites

setrandomlip has local effects, so you need to remoteExec it on all clients.

Share this post


Link to post
Share on other sites
3 hours ago, haleks said:

setrandomlip has local effects, so you need to remoteExec it on all clients.

How would I set that up via trigger? or would I have to reference a .sqf?


for reference, the variable name is "speaker" and the trigger text is "speak"
 

 

Share this post


Link to post
Share on other sites

The easy part about using trigger objects in the 3den editor is that, unless you check the "only on server" box, they are executed both on every client and the server. It's just another game object that activates and then deactivates when finished. 

More to the point, if you wanted a character named "Brian" to say something to nearby players and move his lips, you could put this into a triggers OnActivation field:

Brian say3D ["brianistalking", 70, 1];
Brian setRandomLip true;

Here we assume you have the sound "brianistalking" correctly set up in the CfgSounds part of your description.ext . 

I would use RemoteExec and such things if you wanted to restrict playing the sound and animating the character to certain clients. Or as a method of optimization for code that's run over and over again.

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

×