Invector Waypoint

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Amine33
Posts: 22
Joined: Mon May 21, 2018 4:48 pm

Invector Waypoint

Post by Amine33 »

Hi ...
I use DIalogue system With Invector ....And it works great, But yesterday I had a problem that I couldn't solve..
I hope to help if possible




When Npc moves between Waypoints(Invector Waypoint) And Click to talk to him...'''Npc does not rotate And face the player ...
But he looks at waypoint where he is going


https://ibb.co/5j3Z4ZX



https://ibb.co/F62ZZ84



Animator Play Sequence Work Fine but Look At does not work..
https://ibb.co/8mTvBjm
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Waypoint

Post by Tony Li »

Hi,

Add a Dialogue System Events component to the NPC. In OnConversationStart(), disable the Invector AI component that makes the NPC use waypoints. In OnConversationEnd(), re-enable the component.
Amine33
Posts: 22
Joined: Mon May 21, 2018 4:48 pm

Re: Invector Waypoint

Post by Amine33 »

After I Disable V_AI Controller
1-NPC Look at the player but continue to waypoint ...
With the animation that was given to him in Sequence ( Idle Animation )
https://ibb.co/t8PtZhB


And when Converstion End And I unable V_AI Controller the Npc stops moving ...
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Waypoint

Post by Tony Li »

I'm not familiar with the Invector AI asset. Does V_AIController have methods to stop and start the AI? If so, then configure the OnConversationStart() and OnConversationEnd() events to call those methods instead of disabling the component.
Amine33
Posts: 22
Joined: Mon May 21, 2018 4:48 pm

Re: Invector Waypoint

Post by Amine33 »

INVECTOR Ai Does not have a sTOP - sTRAT method ..But have Somting else can help

Patrol Speed ...
Image



When i set Patrol Speed at 0 The NPC stop moving And Turns to the player..Just like I want ...

My question now is how do I change Patrol Speed from 0.5 to 0 when Converstion Start .... :?:


I'm sorry to bother you with so many questions....And thank you For everthing....
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Waypoint

Post by Tony Li »

Add a Dialogue System Events component to your NPC. (This NPC must have the Dialogue System Trigger or be assigned to the Dialogue System Trigger's Conversation Conversant.)

Then try to configure the OnConversationStart() event to set the Patrol Speed variable to 0.

If that works, configure OnConversationEnd() to set the Patrol Speed back to 1.

If the AI script doesn't let you set Patrol Speed using UnityEvents, you will need to write a script with OnConversationStart and OnConversationEnd methods. It will look something like the script below:

Code: Select all

using UnityEngine;
using PixelCrushers.DialogueSystem;

public class StopPatrolDuringConversations : MonoBehaviour
{
    void OnConversationStart(Transform actor)
    {
        GetComponent<YourAIComponent>().patrolSpeed = 0; // Change this to work with Invector AI.
    }
    
    void OnConversationEnd(Transform actor)
    {
        GetComponent<YourAIComponent>().patrolSpeed = 1; // Change this to work with Invector AI.
    }
}
Amine33
Posts: 22
Joined: Mon May 21, 2018 4:48 pm

Re: Invector Waypoint

Post by Amine33 »

Thank you Very Much ....
User avatar
Tony Li
Posts: 22163
Joined: Thu Jul 18, 2013 1:27 pm

Re: Invector Waypoint

Post by Tony Li »

Did it work?
Amine33
Posts: 22
Joined: Mon May 21, 2018 4:48 pm

Re: Invector Waypoint

Post by Amine33 »

I did not try because Many other problems face me...
My game depends entirely on the NPcs And their actions

And the Ai( That I use) who comes With Invector shooter Template Unable to do what I want ( turn And talk With the player not the only problem )
I'll buy FSM AI Template ..He is Powerful As I saw..I suspect that problems will be solved..

thank you again ....
Post Reply