A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by BHS, Jun 26, 2015.
No, but I can do that tonight.
Okay cool. What if I use Crux to spawn Emerald AI , is it possible when using terrain streaming?
I checked this and saw some very strange things. The Run animations were not assigned in the override controller. So I manually set them, but they somehow got set back to nothing on their own. After a couple of tries I finally got them to stick. However, the issue is still happening where the AI drops through the ground sometimes.
I'm still working on the new clouds for UniStorm. I'm hoping to have them finished by the end of the month.
Yes, there's even a setting within the Emerald AI Editor when spawning with Crux. This will automatically adjust the population amounts when you kill Emerald AI agents. Crux shouldn't spawn on areas with no terrains/mesh so everything should work fine if you are streaming terrains.
What version of Emerald AI are you using? Version 2.2 doesn't use Override Controllers so maybe that's the issue. Did you remove the previous version of Emerald AI before updating to the new version?
There have been many request for switchable Weapon Types (the ability to switch between ranged and melee combat). With Emerald AI version 2.2.2, this will be possible. This will allow an AI to switch weapon types based on distance, health level, or randomly based on customizable odds. Animations and attack distances, for both ranged and melee, can be customized from within the editor. This of course is completely optional and users who do want to have this option enabled, don't have to worry about seeing the additional options. They only become visible when Enable Both Weapon Types is enabled which is located under AI's Settings>Combat>Combat Actions.
Spoiler: Show Screenshot
Also, I've made an integration tutorial for Final IK. This allows an AI's feet and legs to align properly with the angle and slope of the terrain using inverse kinematics while blending with their animations. More tutorials are coming soon.
Weird. I thought I had the latest version. I will remove and do an update and see how that helps.
There have been Asset Store issues with assets not updating correctly. Maybe that's what's happening. Version 2.2 also requires a version of Unity 2017 or higher.
I have 2017.1 so that shouldn't be a problem. I'll let you know how it goes.
I removed EmeraldAI from my project. I also removed it from the local store cache. This forced me to re-download the asset from the store. I did that and imported again. I don't see the falling through the floor issue, but this time I am testing with a different project and different enemy prefabs so maybe that's why. However, this freshly downloaded version still creates an override controller. How can that be?
I have problems with my ranged A.I. Have CreateEmeraldProjectile events, and made time to transition 0. Also, there is no obstruction layers set so it has no reason to not detect player. In fact, when getting withing detection distance, the A.I will target the user, and move closer to within attack range. Once reach this range, it stays stuck in "combat idle" pose doing nothing.
Im very happy to hear this!!
@magique 2.2 is the only version I've ever used and I still see the sinking into floor thing in 2018.3. Maybe it's something to do with having the mirrored turning animations? Not sure.
Also, I can pass through the creature as though it has no collision at all, even though it has that box collider. This is using with Opsive's TPC version 2 by the way.
I didn't use the Mirror option so that's probably not it. I'm currently testing with Invector controller so I can't speak to the collision issue.
@BHS Do you have ideas on why a clean download still uses the override controller? I don't want to continue with this version if something is wrong with it.
@BHS Please verify that 2.2 does NOT use an override controller. If that is the case, I may have an anomalous version as well.
Please enable all of the Debug Log Options located at the bottom of the Docs tab to see which object is being targeted or obstructed. This may give me a better idea as to what's happening.
Can you please provide a screenshot? I would recommend using version 1 of the Asset Store to download and import Emerald AI, if you haven't already done so. There's not much I can do on my end. The old version isn't even on the Asset Store server-side. I removed it for this exact reason so I have no idea how it's still downloading the old version.
@magique record yourself downloading it, installing it and how the override controller is being rendered.
Is there something specific you want a screenshot of that will show which version it is?
You mean download from the old store?
Updated: Alright, so an Animator Controller and an Override Controller both have a file type of .overridecontroller, but they are both different components within Unity. This may be what's causing some of the confusion. If your Animator Controller looks like it does in the second screenshot, you are using the correct version of Emerald AI.
To ensure we are the same page, this is an Override Controller. Emerald AI should not be using this.
The only animator Emerald AI should be using is an Animator Controller like below. Animations are directly assigned to this while in the editor and do not use an Override Controller. An Override Controller was used with version 2.1 and prior.
Yes, the old Asset Store.
The current version's Animation tab should look like this:
I put debug on, have no problems with detection or obstruction. I copied this A.I from another working ranged character but I think something is wrong with either my projectile or the transform of the point where the projectile originates because the original works. Difference exists in the model mesh and colliders, projectile object and transform to shoot from and head transform for raycasts, all other settings are the same. On review though, those are some significant parts that are altered from the basis npc I used.
I'll change those around a bit more and see if I can get it working.
I have had these errors a number of times, thought nothing of it because things seem to work anyway. But heres what I get, when I pressed update projectile to try another one instead:
Assertion failed on expression: '!go.TestHideFlag(Object::kNotEditable)'
EmeraldAI.Utility.EmeraldAIEditor:OnInspectorGUI() (at Assets/Emerald AI/Scripts/Editor/EmeraldAIEditor.cs:1499)
As usual, fix unity bugs by unplugging and turning back on again (closing and restarting Unity)
OK, so it was just a mix up. It says it's an override controller, but it's definitely not the old style override controller as seen in your screenshot. So all should be good as far as that is concerned.
is there is any way to make the AI cant see the player for example if the player throw smoke grenade or in dust storm ??!!
Change the players layer while in the triggered area? Or tag, or set vision distance to like 1 or something on npc?
Haha is it too early to get a timeframe for 2.2.2?
@BHS I see there will be Final IK intergration, I have allready implementented the grounder IK solution, but theres alot more cool stuff that need to be intergrated, like puppetmaster death scenarios (when AI dies the physics takes over) and if theres an explosion the AI flies back of the impact.. And other stuff in the puppetmaster package like, AI trips, if it rum into an object it falls , and that kind of stuff... Basically Emerald AI need to pause all movement descisions and waypoint creation to have the puppetmaster take over and then when the AI gets back up it continues what it was ment doing.. you feel me? I get back to you when I have something cool going on maybe you could help with the final steps
Are there any way to change "Follower Tag"?
I want to change the status that follow or unfollow.
I tried the code below, but I don't know how to use it and got error.
(Does it need "null"?)
Just thought I share a suggestion with you here. When using the stop and start functions for AI behavior, please consider adding a special Turn-To-Face method for AI behavior. I've been working a coding contract on a project that uses EmeraldAI, and I had to do a rather lengthy and evasive behavior to override the default animation behavior being triggered by turning the character to face the player after stopping an AI. I had the team change the animator controller's flow initially so that I didn't have to include such a lengthy method of avoidance, but they found that it broke the animation functionality of the tool afterwards.
Currently upon rotating the character's root object, the EmeraldAI system starts to fallback through various transitions since it fails to reach the idle state as expected. It either falls into a transition for rotate left or rotate right if the AI is stopped during its walk cycle and rotated before it can reach the idle trigger. Note that as long as AI root is not rotated after the abrupt stop, the trigger will signal the transition to idle, but the AI won't be facing the player. To work around this, I dynamically add an override controller to the animator that plays a rotation animations while leaving the AI facing their actual forward vector. So the player is seeing a faked rotation of the AI through animations.
Just something to consider adding since editing the animator controller isn't the best method for maintaining continuity with the tool.
Have found a way to get rid of all my Animation Event problems with some animations using this Animation converter https://assetstore.unity.com/packages/tools/animation/animation-converter-107688 . Converted the problematic anims to legacy and then back to generic. Now all Animation Events working fine.
4) When the AI who has a melee attack only, launches an attack and the player moves away, the damage event is called, even though the player is out of range. He still receives damage. Looks odd. I could compensate for this I guess by speeding up the animation. Is there another way around this?
Having the same problem using RFPS. My player runs some meters away and get still attacked until the the attack animation ends.
And another problem: My Zombie AI is spawning a medikit after death through an event. This works fine, but the medikit is disappearing after some seconds. How can i change this ?
@unicat Does the medikit disappear at the same time your zombie is destroyed? It may be being spawned as a child of the zombie and so is being removed along with it. We also could do with an option for dead Emerald creatures to never disappear.
No, the zombie doesn`t remove, only the medikit.
If you copied the Emerald AI component from another AI, this would most likely be why you're having issues because it's referencing a different transform for the AI's head and the previous AI's ranged transform. If you need a way to copy an AI's component from one AI to another, given that they have the same animations and rigging, I have a tool that can do this. If you're interested, let me know and I'll PM you it.
I'm hoping to have it submitted by the end of them month.
That API is outdated. If you want to update the follower tag, just get a reference to the AI's Emerald AI component and change it with something like this:
GetComponent<EmeraldAI.EmeraldAISystem>().FollowTag = "unfollow";
Thanks for the suggestion and information regarding this. I can certainly improve this and add a function that will rotate towards a designated target. To clarify, this is during non-combat interaction, correct?
Great to hear you found a solution and that everything is working correctly.
@BHS give me a few minutes, I'll revert to my original solution and get you a video.
I have a fix for this ranged detection issue with version 2.2.2.
This is most likely Emerald AI's object pooling. When creating an object with the built-in functions, they use object pooling which means they get disabled after about 3 seconds by default. For a temporary fix, add a EmeraldAIProjectileTimeout script to your medkit and set the timeout seconds to something really high so it doesn't disappear. I can add a non-object pool function with the 2.2.2 update.
@BHS there you go:
This is turning the absolute root while in motion. You can see it falls into the rotate state in the video.
When will 2.3 be done?
I'll try it.
Hey guys, tried messaging you and emailing you but no reply?
I Have used Emerald many times and never had any issues really, absolutely love it!!. Im currently using invector integration all tutorials worked fine and I am on unity 2018 3.8. I have an issue upon using the setup manager where after I click setup AI at the end of the process I am getting prefab instances error, top of the code Is below, ive messaged you the full error, if you could possibly assist It would be appreciated.
ArgumentException: UnpackPrefabInstance must be called with a Prefab instance.
UnityEditor.PrefabUtility.UnpackPrefabInstance (UnityEngine.GameObject instanceRoot, UnityEditor.PrefabUnpackMode unpackMode, UnityEditor.InteractionMode action) (at C:/buildslave/unity/build/Editor/Mono/Prefabs/PrefabUtility.cs:1531)
EmeraldAI.Utility.EmeraldAISetupManager.OnGUI () (at Assets/Emerald AI/Scripts/Editor/EmeraldAISetupManager.cs:155)