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 'Works In Progress' started by squared55, Mar 2, 2015.
can u point me somewhere where i could start looking to implement rain navmesh?
Hey, @squared55 ... in the demos the AI backs arch and they look up when idle, why is this? Is this something to do with the import process and under your note 2, that the animations do not show up as expected?
That's probably the issue, as I don't seem to have that problem on my end.
Im trying out the demo maps, but my guys dont seem to be able to hurt each other with guns, only grenades. So they all end up huddled together until one grenade goes off.. lol.. any thoughts?
Also, I have it working with UFPS, works well apart from my bullets dont hurt him and his bullets dont hurt me. I followed the guide. Very impressed so far!
When I shoot the guy I see
MissingMethodException: The best match for method Damage has some invalid parameter.
System.MonoType.InvokeMember (System.String name, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object target, System.Object args, System.Reflection.ParameterModifier modifiers, System.Globalization.CultureInfo culture, System.String namedParameters) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System/MonoType.cs:520)
UnityEngine.SetupCoroutine.InvokeMember (System.Object behaviour, System.String name, System.Object variable) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:18)
UnityEngine.Component:SendMessageUpwards(String, Object, SendMessageOptions)
vp_HitscanBulletoHit() (at Assets/UFPS/Base/Scripts/Gameplay/Combat/vp_HitscanBullet.cs:166)
vp_HitscanBullet:Start() (at Assets/UFPS/Base/Scripts/Gameplay/Combat/vp_HitscanBullet.cs:68)
His grenades can kill me.
Are you using the most recent version of UFPS? It will only work with 1.5.1 and higher. You also need to make sure that the Layer Mask variable on the bullet prefab includes the layer that your hitboxes are on.
Also, make sure the health of the agents is something low like 10 so you don't mix up doing no damage with doing too little damage to make a difference.
Thanks, actually I cant tell what UFPS im using, I think its 1.5.0 actually, I will upgrade and try again
EDIT: Yes i was on 1.5.0 upgrading..
public struct UFPSInfo
public static string Version = "1.5.0";
OK so I upgraded and changed the things you suggested, they can now kill each other well, but they still cant hurt me and I cant hurt them.
Double check to make sure you've done everything in the UFPS integration section in the manual.
If the problem persists, do the bullets hit the target and do no damage, or do they pass right through?
Also, if you could post pictures of your inspectors for your player, ufps bullets, paragon bullets and paragon hitboxes, it would help me in identifying the problem.
If you are a Shooter AI customer who would like to receive the discounted upgrade price, shoot me a message or email with your invoice number! I'll then temporarily put the upgrade price up, and then take it down again so it gets rid of the old reviews.
How difficult would it be for a newbie at all this to integrate your ai system with https://www.assetstore.unity3d.com/en/#!/content/28860 (Advanced Shooter Kit)? Not sure how similar it is to UFPS because I haven't tried that, but I assume it's not too different. Great work by the way, definitely has peaked my interest.
Great work, You maybe has saved my game. The only problem that I have is that generated controller don't play some animations that comes with the model, so I have to find other animations. Why? Only in base layer
The only thing stopping you from just dropping Paragon in is the damage system. Worst case scenario, you just change the name of whatever method used for damage to Damage(float here with the amount of damage) (A method is something like Update() or Start()).
So, it should be easy, and if you have questions, feel free to ask!
I can think of several possible issues:
1). You need to make a mask for your character model (more on this in the manual).
2). You need to set the blending mode on the upper body layer to "Override" and the weight to 1 (click the gear to access the settings in the animation controller).
3). The bone structures of the models are different, so the animations wont work. (If this controller is for a different model.)
4.). The wrong animations were used in the wizard.
I'm curious on how the audio system works, as no matter how high or different the odds to play are, the sounds still all play at the same time. Any help? (Btw, great asset! It's the best darn ai script I've ever seen!)
Thanks for your quick response. 1 and 2 are done as un manual. I have no problems with upper layer, the problems are with base layer animations legs moving (run, walk) and crouch.
With respect to 3, the animations that i have problems with it is precisely that come with my model. If i create a controller with only one state and put the animation in that model, it moved without issues.
With respect to 4, i have revised the state animations un controller and are correctly animated.
Thanks anyway, I will try to find free animations that works with your controller and with my mess.
I HAVE FIND SOLUTION: Edit animation an mark Loop Time and Loop Pose
I have a little problems with the searching system of the agents and the granade damage.
I'm using the advanced player of the UFPS. (UFPS & Paragon with last releases)
1)The agents' search problem: I have the advanced player behind a wall, when the scene starts the agents can't see me so they search the map moving to my position. For now it's all good. But when they find me behind the wall, instead of walk away from me instantly searching for a cover, they continue to walk towards me and when at least one them literally touch me, only then they start to find covers. It's really strange behaviour.
I'm using the DEMOMAP of Paragon. I don't have touched any of the covers yet nor agents' cover component.
Increasing the "Radius to call off search" value in the "Base Script" doesn't do the job.
NOTE: if I move my Advanced Player before they find me behind the wall, they see me from afar and the search system immediately stops as it should be.
2)The granade damage problem: changing the layer mask of the Paragon bullet prefabs in the inspector allowed me to delete the frendly fire between agents so now their bullets can damage only me BUT changing the layer mask of the explosion/granade/missile prefabs doesn't do the job. A granade can kill other agents like the explosions. How can I fix this?
I have created a simple scene of a Paragon AI prefab and a UFPS prefab. I can get the Paragon AI soldier to fire on the UFPS player as an enemy.
What I tried to do was set the team of the UFPS player to be the same as the Paragon AI, so the Paragon AI would not shoot at the player. But I can't get it working.
Here's my setup:
Is this configured correctly? If so, what else might I be missing to get them to be on the same side?
for example you have the UFPS Player (controlled by you), a soldier 1 you want to use in your team and soldier 2 it's a enemy.
1)Your UFPS player is setup correctly;
2)Your ALLIED soldier (soldier 1) must have MY TEAM ID 1 (like the ufps player) and ALLIED TEAM IDs SIZE 1
3)Your ENEMY soldier (soldier 2) must have MY TEAM ID 2 (id of the opposite team) and ENEMY TEAM IDs SIZE 2 (how many enemy he must shoot)
I tried and it works for me.
Thanks for the reply.
This is what I have and the soldier is shooting at my UFPS player.
That is not correct. It is not the numbers of enemies that he must shoot. That is the number of sides that are his enemy.
I tried to create another allied soldier. If I leave the Enemy Team id with the default value it doesn't work (I have 3, 1, 0, 3, you have 3, 0, 2, 3).
I tried to change them to 2, 2, 2 and it works.
Well, I still don't know what I did wrong, but I started again from scratch and now things are working. So it shall remain a mystery.
The OddsToPlay___Audio is the odds that any sound will be played at all. The Odds To Play lets you make some sounds be played more often than others.
I believe your first issue is due to the animations that the BootCamp soldier comes with. You'll notice that they actually look to the side, not forwards. As a result, they can be moving towards the player while never actually looking at them. If you rotate the "eye" gameObject, so that it always faces forwards (and out the side of their head!), it should work better. You could also increase their field of view in the TargetScript>LineOfSightParameters.
It is also possible that there is some invisible object that is blocking the LoS check, most likely attached to your player.
Unfortunately, there is no out of the box way to avoid grenades and friendly fire at the moment. That said, you could create your own explosion script that discriminates between teams. You could even use the UFPS explosion script, except making sure that "RequireDamageHandler" is checked. That would only affect your UFPS player.
That's weird. The first thing I would do is check to make sure that there isn't another targetScript lying around that's messing things up. The easiest way to do that would be just to delete the player's targetScript. Also, you don't need to specify allied teams on a non-agent, as it won't do anything (you'll need to make ParagonAI.Sounds to get their attention). Furthermore, you could just put the player on a separate team all together.
Also, it may be a glitch with the custom inspectors. I'll look into that.
Right. Each element is for a different enemy team.
Thanks for the quick reply! Sooner or later I'll be getting this - way too many assets on the store to choose from and not enough money to choose them all lol. Any chance it'll be put up on sale any day in the near future?
Thank you for the reply.
1)I'll use different soldier models so this problem I hope will not exists in the future. Knowing that depends on the model and not to the system it's a good news.
2)I will use the UFPS explosion. Thanks for the advice.
QUESTION: I created a very little map with only cubes to try the agent soldiers on a different NavMesh and they works very well avoiding obstacles and choosing the right path. But I have a PROBLEM: they can see me through the walls I created and they shoot at me like there is nothing between me and them.
They can't walk through the walls because of the NavMesh but they can see me and shoot me.
I setup wrong the NavMesh or the Agent Soldier must setup properly to not see through walls?
OK. I have my UFPS player, one Ally AI, and one enemy AI. My Ally AI kills the enemy AI and then proceeds to run (seek, presumably) to location 0,0,0
You can watch the video here.
Check the layermask settings on the Controller Script. Make sure it includes the layer that the level parts are on.
That's prpbably because there are no targets left, and the agent never got the chance to mark a position of the enemy agent as a target vector when not engaged. Stick a wall between them or even just make them face away from each other at the start, and when one doesn't they should move to the last position they saw them when idle.
Or, you could just change the Idle behaviour.
It works! Thank you very much for the fast reply and the immense support you give to us!
I tried what you suggested and set both of them to wander on idle. The winner still ran to the corner.
I just set them to face away from each other. Enemy AI found my UFPS first and started shooting at it. Then Friendly AI spotted Enemy AI and started shooting at him. He killed the Enemy AI and then ran to the corner.
Hmm. I've recreated your scene (open field, 2 agents, allied target), except when my agent dies, the other one runs to the body of the first. Maybe try making the scene from scratch? Remove and then add the targetScripts? Re-importing? I'm honestly at a loss here. Any other info you can give me?
Thank you for your help. I will do as you say and try to create things from scratch.
I thought it might be helpful, so I cut my scene down to the bare minimum and it is still doing it. I have hung it at [link removed — don't post assets publicly] (FYI - I didn't post anybody's asset. Just my own files. There was no need to remove the link. -Tinjaw)
Let me know if I left anything out. There is a scene, a terrain, and a navmesh.
There is no camera, so you will need to watch it in the scene view. I ran it three times. The first time they killed each other. The next two times the winner ran to the corner.
I found something strange. Watch this video. First I build the scene with a plane and all works fine. Second I build the same scene using a flat terrain, and the winner runs to the corner.
Sending you a PM, to unclutter the thread.
Okay, well, I put one sound at 0, and another at like 5, and they both play, so no matter what, the sounds will eventually play at the same time right? (say 5 sounds and the odds to play are 3,2,4,5,6)
Turns out there is a glitch that's making it do that. If you add
on a new line inserted after line 90 (just before the closing bracket of the if statement), it should work properly.
Has anyone integrated this with Third Person Controller?
I haven't, but the only issue should be the damage systems. I looked at the docs for TPC, and it looks like that their damage methods take 3 parameters (damage, force, direction) (someone correct me if I'm wrong), while Paragon only takes one (damage), with any physics interactions being a result of the script sending the damage, not the one receiving. So, you may need to fiddle with the scripts of one or both.
I have the following issue with my agents:
If I enable dynamic cover, fps slows down (3 fps) every time i move my ufps player. It is like covers have to be calculated and it is very performance expensive.
If i put manually the short covers, my agents don't cover, come to attack muy player.
Any way to solve this? Thanks
Make sure the ControllerScript's layer mask includes the layers your level parts are on (also, I'm not at my computer so I can't double check, but you may have to do the same for your manually placed cover nodes). Also, double check to make sure your UFPS player isn't carving the navmesh if you put an obstical on it.
I did mention this over in the thread for TPC. Justin said he would add Paragon AI to his integrations list. No idea on a timeline for that, though.
Ok, stablishing short covers layers to everything except Enemy and LocalPlayer solves the problem with manual covers.. Still remains performance problem if I select dynamic cover, so I have to set this disabled.
Thank you very much for this excelent asset!!
Justin had some questions related to the Paragon AI movement. Also pointed me to a way of integrating to the Paragon damage method using the Hitscan Event. This is great, and exactly the kind of thing I'm looking for.
Any thoughts? Maybe you could add a subscription/translation to methods like the damage in order to take inputs from other controllers or products? I'll look into this myself but posting here for posterity or in case anyone else has this specific question.
How big and complex is your map? Although, I'm not sure why there are only issues when you are moving.
Really enjoying Paragon! I have some convincingly good dudes working, super pleased!!
A few issues ive noticed:
- After he kills you by melee, he stops recognising that youre there when you come back to life. Edit, in fact all you need to do is turn on melee run up to him and away and he forgets you exist..here anyway . Also when he melees you what animation does he do? does he hit you with the gun, goes so fast I cant see.
-Also how do I set it up so I can melee him, like stab him with the ufps knife?
-When my guy dies he has a weird thing sticking out of his ragdoll, any thoughts? https://dl.dropboxusercontent.com/u/4194619/Snap 2015-11-07 at 23.40.45.png
- up close the guys dont seem to behave too well, they stand shooting past me, not at me, I can see "min aim distance" but it doesnt seem to solve the problem (its like when he enters that distance he keeps coming but aims about 30 degrees off) - is there a way to have it so when he gets to close he backs off to maintain a distance so you dont notice this? It would be ok possibly if the melee worked better for me, or if he just maintained a proper aim on you when youre very close (he seems to aim beside you when up close).
- I also see "investigate sound" mentioned in the docs but I cant find it anywhere.
- min distance to aim doesnt seem to be in the docs
- guys going up stairs or ramps slowly glide up without legs moving properly on my game, any ideas?
- and finally, sometimes he appears to be seeing me through walls.. how could this happen?
Overall I'm extremely happy with this package, just hoping some fine tuning can make it perfect, best AI so far. Will probably mix with Sentio characters later too.
Thanks for one of the best assets!..
PS. would be very cool if AI had option to have health above their heads, in a little bar.
I know this isn't the place to get schooled on animation, models, and rigging. However, I don't know where to ask or even what to ask.
The issue is that I grabbed this zombie asset in order to make it an agent, but it seems the animations don't work on it. I don't have a clue why they don't. What questions do I need to ask and where to get help with this?
You set up the animation controller, right? Check the import settings and make sure that the animations are set to loop.
Crap. Looks like there's a glitch there. I'll put out a fix soon.
Also, the default guys just kinda raise their gun as I don't have a melee animation.
UFPS melee attacks are just bullets with limit range. As such, it's set up the exact same way as the rest of your bullets.
You may have either set up your ragdoll wrong (the root spine bone doesn't have a collider ot anything on it, so it just stays in place as the top and bottom topple off), or it's a third-party issue as I don't recognize that blue wire gizmo.
Fiddle with the various rotation settings, as well as the minFiringAngle variable on the gunscript.
Not without more information.
Check your layermask settings on your scene's ControllerScript.
Yes, but you can see that it won't work even before that. I Just drag the model(FBX) of my zombie into the preview window for the included animations and they don't work.
You are using the animations that come with the Zombie and not the soldier, right?