Page 1 of 1
Invector Waypoint
Posted: Sun Aug 25, 2019 2:26 pm
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
Re: Invector Waypoint
Posted: Sun Aug 25, 2019 3:21 pm
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.
Re: Invector Waypoint
Posted: Sun Aug 25, 2019 5:35 pm
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 ...
Re: Invector Waypoint
Posted: Sun Aug 25, 2019 7:44 pm
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.
Re: Invector Waypoint
Posted: Mon Aug 26, 2019 1:14 am
by Amine33
INVECTOR Ai Does not have a sTOP - sTRAT method ..But have Somting else can help
Patrol Speed ...
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....
Re: Invector Waypoint
Posted: Mon Aug 26, 2019 8:44 am
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.
}
}
Re: Invector Waypoint
Posted: Mon Aug 26, 2019 12:25 pm
by Amine33
Thank you Very Much ....
Re: Invector Waypoint
Posted: Mon Aug 26, 2019 12:50 pm
by Tony Li
Did it work?
Re: Invector Waypoint
Posted: Mon Aug 26, 2019 1:41 pm
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 ....