|
Post by magique on May 28, 2019 13:08:35 GMT
OK, so this doesn't work completely. I get about the same results as I was getting with the way I was doing it already. For some very strange reason, when the AI re-spawn, they navigate very oddly. They just start walking off straight ahead without stopping. And as soon as the NavMeshAgent gets to a point where it can't pass, it stops, but the character keeps on going through the obstacle. See image. Also, you also have to add the void ResetFSM() function definition to the vIFSMBehaviourController interface for your solution to compile. Here works fine, are you sure you're AI is spawning on a area with NavMesh? otherwise the design behavior is to turn off the agent and look for a navmesh area. The method goes to the vFSMBehaviourController as I mentioned, you probably added in the wrong script since we have 2 in project, open the one with the Icon. Yes, I put it in the correct script and the area has a navmesh. The AI work fine in the area until they are reset and respawned. If you can tell me where in the code it does the turning off the agent and looking for a navmesh area then I could debug it and see if and why it is going there.
|
|
|
Post by Invector on May 28, 2019 17:03:23 GMT
Just search for "navMeshAgent.enabled = false;", there are several occasions that we use this
|
|
|
Post by shadex on May 28, 2019 17:55:22 GMT
So why is this [URGENT] ? Because it is a blocking issue and my game is far along and I need it to compete the game. That is awesome! What game? whats your release date?
|
|
|
Post by magique on May 28, 2019 18:09:10 GMT
Because it is a blocking issue and my game is far along and I need it to compete the game. That is awesome! What game? whats your release date? This is the game: www.indiedb.com/games/scions-of-chaos-prologueBut note that screenshots are all from very early prototypes and don't represent the current state of the game. In fact, the story has been altered somewhat from what is written there. I plan to update the page when we are closer to release. A release date is not set yet.
|
|
|
Post by darthfarter on May 28, 2019 19:58:23 GMT
Magique could you reply later if you have succeded with the ai bug. I havent tried the recommended tips here yet.
|
|
|
Post by magique on May 28, 2019 20:04:15 GMT
Magique could you reply later if you have succeded with the ai bug. I havent tried the recommended tips here yet. Definitely. I can't work on it any more until later tonight, but so far it hasn't worked out. I will be debugging it to see where it might be going wrong.
|
|
|
Post by magique on May 29, 2019 15:09:40 GMT
I have to stop debugging this. It's taking way too much time for something that I believe the devs can fix quickly. No matter what AI variables I reset, the AI still won't behave correctly after dying and respawning. I'm having to move back to Emerald AI to complete my game. If the devs ever get this fixed then I'll consider it as an option again.
|
|
|
Post by Invector on May 29, 2019 20:51:34 GMT
We post a solution that works just fine here, I'm not sure what you're doing on your project that could be getting a different result. If you want I can take a look, just send us only the necessary files to reproduce the bug at inv3ctor@gmail.com
|
|
|
Post by magique on May 29, 2019 21:07:10 GMT
We post a solution that works just fine here, I'm not sure what you're doing on your project that could be getting a different result. If you want I can take a look, just send us only the necessary files to reproduce the bug at inv3ctor@gmail.com How much have you tested your solution? Do you have a pooling system that spawns already dead AI's and then resets them? If so, are you verifying that the Invector player can fight them and they fight back and that they correctly patrol the area? That's one thing I did a little different. I took the basic Melee AI FSM and changed one node to Patrol so that it would patrol around instead of just standing there. Can you verify it works with that change? Because if they are just standing there then it might appear that it is all working correctly.
|
|
|
Post by darthfarter on May 31, 2019 7:49:48 GMT
I have recreated a project that shows the bug and posted it to Invector. Will se if he has some time to take a look at it.
|
|
|
Post by magique on May 31, 2019 13:27:21 GMT
I have recreated a project that shows the bug and posted it to Invector. Will se if he has some time to take a look at it. I'm not holding my breath. They didn't even answer my last response.
|
|
|
Post by Invector on May 31, 2019 17:05:03 GMT
I have recreated a project that shows the bug and posted it to Invector. Will se if he has some time to take a look at it. I'm not holding my breath. They didn't even answer my last response. You need to have more faith in us Anyways, thanks darthfarter for sending us a project with the issue it helped a lot for us to understand better what the problem was. It's a simple adjustment of 1 line for 3 scripts, so I can post here for you guys but it will be on the next hotfix update. - vFSMBehaviourController public virtual void ResetFSM() { if (currentState) // before reseting the current state, we need to Exit the current on to reset all the variables currentState.OnStateExit(this); // by set the currentState to null, the Update will automatically set the current state to Entry currentState = null; } - vAnimatorStateInfo public void RemoveListener() { // this Clear call was missing and it was not resetting the parameters of the Animator, so when the characters die with the lockMovement true for example, it was still true when turning on again statesRunning.Clear();
if(animator) { var bhv = animator.GetBehaviours<vAnimatorTag>(); for (int i = 0; i < bhv.Length; i++) { bhv[i].RemoveStateInfoListener(this); } } } And a bonus fix for the v_SpriteHealth to keep it working after the pooling public void Damage(vDamage damage) { try { this.damage += damage.damageValue; _damageCounter.text = this.damage.ToString("00") + ((_showDamageType && !string.IsNullOrEmpty(damage.damageType)) ? (" : by " + damage.damageType) : ""); _healthSlider.value -= damage.damageValue;
// it needs to verify if there is a healthControl and if it's active if (!inDelay && healthControl && healthControl.gameObject.activeInHierarchy) StartCoroutine(DamageDelay()); } catch { Destroy(this); } } Another thing we you could do is call the ClearTarget Action on your FSM first state to clear the target (if you want to) when the AI is reset.
|
|
|
Post by magique on May 31, 2019 17:18:17 GMT
Sorry, Invector. I really love your assets and have received stellar support in the past. It just seemed like this wasn't going anywhere. I'll take a look at these potential fixes and see if they help.
|
|
|
Post by Invector on May 31, 2019 17:38:05 GMT
Sorry, Invector. I really love your assets and have received stellar support in the past. It just seemed like this wasn't going anywhere. I'll take a look at these potential fixes and see if they help. Sorry about that, this month has being a little crazy since I moved to another house and also we had a great sales, so lot's of new customers with questions and somehow still have to find the time to work on new features. This type of issue we have to focus a little more to find the cause, so getting a scene ready to debug was really helpful. But hopefully this issue is solved now.
|
|
|
Post by magique on Jun 1, 2019 15:56:56 GMT
The changes seem to help somewhat, but it's still not working 100%. I no longer have AI that are wandering off through obstacles, but when the player gets near the AI, the AI start running in place without going anywhere.
|
|