Jump to content
Quebec26

Get dialogue from AI after interacting with it (Leaflet intel alike)

Recommended Posts

Hey so I'm trying to make a DayZ like scenario where you have to speak to AI to get a quest. Yes, I can just put a trigger with 2x2 size in front of the AI unit and it will start the dialogue but I'm trying to get it working with the animation which you get from reading a leaflet holding space ( call BIS_fnc_initLeaflet function ). I want to get a simple dialogue with aiguard sideChat "text"; but i don't know where to get started. This is the animation from leaflet reading:unknown.png

Share this post


Link to post
Share on other sites

 

Hi @Quebec26, welcome to the forums!

A few things here-

I understand you want to set up a basic dialogue interaction with an AI character. Indeed it is a good idea to use existing functions for that. 

The one used to make the interaction in the picture, however, is BIS_fnc_initInspectable (see link). You can just use the examples in the page, and paste that into an AI character with variable name MyLeaflet. It will work fine, but will be buggy in multiplayer, and have this odd "Read" button in the bottom right of the screen.

A more complete solution can be made with BIS_fnc_holdActionAdd. But that will take a bit of trial and error, and some more puzzling for multiplayer use. 

You're probably better off using one of several dialogue scripts already made in the forums. Try those first and see which one you like :).

Share this post


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

A more complete solution can be made with BIS_fnc_holdActionAdd. But that will take a bit of trial and error, and some more puzzling for multiplayer use.

 

This is The solution if you want to apply an hold action (like in picture) on a character to get a quest.

The BIS_fnc_holdActionAdd works fine in MP. You need to remote exec it if you spawn the object on which you want to apply it, but it's not necessary if the unit is already edited. Just put it in init field on this AI. So, all players will run it at start and be ready to use it.

On the other hand, as for addAction, the inner codes (code start, code progress, code completed, aborted...) are running locally. So, you'll need to remote exec (or not) some of your commands, along with their Arguments and Effects.

But perhaps, the scenario is for single player only... so no problem like that.

 

 

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

×