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.
My latest with EAI (scale has changed)...
Ok, for some reason my AI doesn't move... Unsure why. Nav mesh is baked and everything.
Good day. I have one more question. Is there support for old animations ?? or just an animator?
EAI doesnt support Legacy animations, use Generic or Humanoid.
@o0neza0o could be a few reasons:
Nav Mesh needs to be baked, and Nav Mesh Agent component added to the character
Animations for like Idle, Walk, Run, etc. need to be Looped (or they will only play once).
Wrong animation format (EAI doesnt support Legacy animations).
Make sure in EAI that you set up EVERYTHING, (blank animation fields can cause probs).
Make sure a you have a Avatar set up (a correct one, a few times i didnt have the correct avatar, and animations didnt work).
BHS is pretty busy this weekend, maybe he will chime in and help
Hi! Loving the asset but having an issue at the moment with my companion. It doesn't seem to want to fight passive enemy faction targets. Is this supposed to be the case? It'll fight aggressive and brave cautious (territorial) AI, but not if they're passive. I was thinking that as long as they were an enemy faction, it would see it as a valid target and attack. Am I correct?
Thats the way it should be, as Passives will not fight, they either dont fight or flee. I dont think it matters if its an enemy faction. (at least in my experience, so far)
Thanks for the reply! I'm not looking for passives to instigate fights, I'm trying to get my companion to engage them. As it stands, he won't touch them unless they're already mad at him.
I feel ya, ive been working on EAI/animations for the last 6 hours, with great results. Yea, the system is set up that way, anything set as passive will act accordingly (per the tool tip just below the setting).
Even though you set "Factions" i think the system ignores that for passives,. Unless you want to write a script with the "SetTarget" function (for companion), best way is to set it as Cautious, with a setting of Brave or higher.
Thanks for reply!
I am using malberns dragon package. Archers have to attack dragons. It has collider on its spine. Logs doesn't work properly like some time it shows some times not. If I apply same settings on a cube and take into detection it works fine they attack it but not for dragon.
It was fixed by adding collider on parent.
is it possible to increase the detection radius when AI searches for enemies ?
All of this is setup correctly as it works in my test scene just not on my terrain :/
@BHS After you submit 2.3, can you give us a rough outline of what you are thinking 2.4 will consist of? I know this can be subject to change, but it is nice to see what you are thinking for future releases.
Companion AI will only fight AI that are in their active combat state. Passive AI need to be damaged in order for them to transition to their combat state, which is why the Companion AI won't engage them in combat. This was to prevent a companion AI from going on a murderous rampage if they entered something like a city and most of the AI were of the opposing faction. I can look into improving this with the next update though. I will be redoing the faction system with the 2.4 update which will make things more flexible.
Can you confirm that your NavMesh has been baked properly? Your terrain must be marked as static in order for it to be included in the baking process. Double check that you can see the blue mesh that is generated when in the Navigation tab.
Please see this guide for an example: https://docs.unity3d.com/Manual/nav-BuildingNavMesh.html
Thank you for taking the time to respond! The rampage was actually what I was hoping for (At least against any faction it hated). Specifically because it allows for predatory behavior.
Are you looking to increase the detection radius (via the editor) or actually increase the detection radius overtime as the AI is searching for enemies?
Yeah, when I get the chance,I'll put together an outline of my plans for 2.4.
I'm having trouble with my AI character being able to push my player around. I'm thinking this is a physics issue but I'm not sure.
Also, I added a hit effect as a test. Now I want to get rid of it. After selecting no to Use Hit Effect I'm not getting a message the the object wasn't spawned from a pool deleting it instead. I can't get rid of it.
Hello again! Could you please offer a little bit of insight as to how faction relations currently effect decisions? I have a companion that won't fight back unless it has the attacker set to Enemy. I initially tried setting it as Neutral expecting that any aggressive action would cause it to fight back, but it just kinda stood there and died. Is it supposed to do this? If so, What's the difference between Neutral and Friendly? Thanks!
Also, my companion doesn't seem to want to switch targets after the (set to 3) hits it should need to acquire a new attacker. Have I set up their relations improperly?
am looking to increase the radius at the start in general bhs
Look at the Rigidbody "Mass" setting in both the EAI and your player. For example, I have a 200 kg stag and a 50kg player, (with Invector controller). The stag can push my player, but if I walk back at the stag we come to a standstill. I can push the stag a little bit. Adjust them to your liking.
If an object has little or no Mass everything can push it around.
1. When I first play my scene, if an EAI is close by, the health bar and name are large out of scale, until the EAI and my player separate a few meters. Then the health bar and name adjust (shrink) to their settings.
2. I have an AI animal roaming around. It seems to be creating target coordinates and moving toward them. It is creating target coordinates that cannot be reached, and is walking infinitely against a collider in its attempt to reach the target.
If it's happening during wandering, you can enable Use Object Avoidance and add your player as one of the avoidance layers. This will allow your AI to steer away from the player instead of push them. If it's happening during combat, increase your AI's Attack Distance.
This is most likely because you have the prefab object somewhere in your scene. When Emerald AI creates hit effects, it applies a Timeout component that disables it after a couple of seconds. If your prefab is still present somewhere in the scene (not during runtime), it will through this message after you start the scene, if that all makes sense.
This is fixed with version 2.3 as all effect components are added during runtime and not to the actual prefab.
Hey there! A Companion AI will only fight an Enemy faction that is in its active combat state. The Neutral setting's purpose was to stop AI from fighting each other, even if they were of the opposing faction. Friendly's purpose was to allow the use of custom functionality such as only allowing an AI to become a companion, but only if their faction level was Friendly.
Since I originally designed the faction system, I've found many ways I can improve it to offer more functionality and make it easier for users to use. With version 2.4, I plan on having an external faction system that users will apply to an AI. This will allow unlimited amounts of factions and offer many other improvements. I'll discussing the specifics regarding this after 2.3 is a finished.
If you want your AI to be able to freely attack other AI, you will need to set the other AI to Aggressive as this will allow them to enter their combat state and attack your companion, which will allow the companion to see them as active targets.
You just need to go to Detection & Tags>Detection Options and adjust the Detection Distance
Thanks for elaborating! I think I'll hold off on some of the more complex faction stuff I was playing around with for now then, in anticipation for the new update. Are there any plans in the future for supporting more idle animations for the companion? It currently doesn't support the idle animation list. I'd also really love multiple combat idle animations, so I can add fidgets to break up their down time.
ah right have done that but is their a way i can change the max radius setting ?
Hi, I am having a weird issue where enemies hit the player for double or triple damage the first time the scene is loaded. Only does it once and I can't seem to figure out why. I am using the Ultimate Character Controller, but I don't think that's a issue. I thought at first the player damage script was somehow getting added twice but I only see one. I can't seem to find anything that would cause that, not sure if it happened to anyone else or if you have any ideas. I do change the attack damage which is not random at the start of the level.
If you are talking about increasing the cap value within the Emerald AI editor, you need to open the EmeraldAIEditor script and fine the line below. The 100 value is controls the maximum cap. If you want it larger, increase the value and save the script.
CustomEditorProperties.CustomIntSlider(new Rect(), new GUIContent(), DetectionRadiusProp, "Detection Distance", 1, 100);
Hey there. Interesting, how are the AI applying the damage to the player, with melee or ranged damage? Both should only happen once and I've never encountered it happening multiple times. If you are using melee damage, are you using the SendEmeraldDamage animation event for applying the damage?
Also, have you watched this Emerald AI Attack Animation Events tutorial?
Thanks, sorry I just figured it out, was my error in one of my scripts. It wasn't properly updating the player health to take in to account level increases, totally my fault. Great tutorial, I watched that before to help set up originally. Thanks again for fast response.
So I haven't set up ranged combat yet in EAI, and so I gave it a try today. I'm seeing a strange error though.
I followed the tutorial video and section in the documentation, but must be missing something.
I'm using a gun with a bullet projectile. I've populated both the 'Ranged Attack Transform' field and Projectile Object field.
However, when my AI initiates the gun fire animation, I see the error below in console: "
KeyNotFoundException: The given key was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <7d97106330684add86d080ecf65bfe69>:0)
EmeraldAI.Utility.EmeraldAIObjectPool.Spawn (UnityEngine.GameObject prefab, UnityEngine.Vector3 pos, UnityEngine.Quaternion rot) (at Assets/Emerald AI/Scripts/Components/EmeraldAIObjectPool.cs:167)
EmeraldAI.EmeraldAISystem.CreateEmeraldProjectile () (at Assets/Emerald AI/Scripts/System/EmeraldAISystem.cs:1516)"
Any idea what I may be missing?
is 2.3 version completed sir ?
It's actually happening after the first attack. Once the player has been detected the enemy runs towards the player, attacks, pauses then continues to run forward pushing my player until the enemy decides to attack again. I tried increasing the attack distance, the behavior remains the same.
Great to hear you got it all figured out and you're welcome.
It looks like you're missing an attack animation, most likely Attack Animation 1. Ensure that you have an animation applied and that there are no blank animations within your AI's Attack Animation list.
Hi BHS, would you please list anything we should do for upgrading to 2.3 other than backup?
Hi All - Have a very slow walking hurt AI using Root Motion / Final IK. Works like a champ but he's moving "bit" faster then his legs are walking (Slide effect). Animation Play looks perfect. Ideas?
There shouldn't be anything you have to do before updating other than creating a back up. The only things I can think of for now after updating that you or others may find useful are:
Updating/regenerating the AI's Animator Controllers (This will update them to the 2.3 version)
Reapplying all Ranged animations as they are now separate variables than they were with version 2.2.
You will need to reassign all Emerald AI projectiles and use the new Modular Ability system (There will be a guide on the updated Documentation regarding this). The only thing you really have to do is remove all of the old scripts and create the projectile through an Damage Ability Object.
You will need to reassign all Emerald AI Hit Effects. (There will be a guide on the updated Documentation regarding this). The only thing you have to do is remove all of the old scripts, as the components are now added on start, and reapply the hit effects to the AI's Hit Effect List.
Waiting for it to launch!!
The current Root Motion calculations work really well for consistent movement animations, but animations that move really slow, or have a lot of slow speed variation like limping, may have some slight sliding. The sliding you are seeing is the minimum allowed speed with the NavMesh component to still allow it to be updating. However, I plan on improving this soon so there's no minimum speed limitation.
me too! No doubt it's taking a bit longer to get everything put together ... waiting patiently
Is there any way to fix this without adding collider to parent. because controller breaks when I add collider to the root parent. any help please?
Is it possible to setup herds/packs /flocks with Emerald AI?
Glad you guys are hyped for 2.3.
I had to do a few quick improvements, but I'm certain it will be submitted by tomorrow. I'm looking forward to seeing what everyone creates with 2.3!