Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[UPDATED] ICECreatureControl v1.4.0 - creature AI for enemies, animals, monsters, zombies ...

Discussion in 'Assets and Asset Store' started by icetec, Aug 11, 2015.

  1. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    When you set the walls to be static, and you are using a Navmesh, then they will be avoided when you bake your nav mesh, but if not static, then you could always use Nav Mesh Obstacle component.
     
  2. farooq-gill

    farooq-gill

    Joined:
    Oct 8, 2016
    Posts:
    13
    1. I am using UFPS with ICE and want to implement the score system. Want to give the points when creature dies. I don't know how to do it. Somebody please help me. I mean tell me which script He is using the health in ice? or where is the ondie method? forgive my bad english. thanks in advance.

    2. Also I have a problem, My creatures don't follow my terrain. I mean they follow me on the ground but when there is some height then they go below the terrain. Can someone tell me what could be the issue? is this because i am not using Navmesh?
     
  3. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    1. Give the player points when the creature dies? I can't remember exactly where I added some code, but I believe it was under ice_Creature.cs, where you see void FixedUpdate() - in there you will see if (Status.IsDead), is where I think I added some code to give the player points, but you'll need to figure that part out yourself as you may have a GUI setup for this, in which case you'd assign how many kill points to that with a calculation and increment it.

    2. It could be down to you not using a Navmesh, but what you could do is set the following under Motion and Pathfinding (within Essentials) to do a Ray Cast ground check for the layers so the AI knows where it is, in there you have a few other settings like Base Offset.

    I'm having issues with AI walking on static meshes ok, and their feet tough the ground, but when they go on the terrain they are underneath it. I'm sure its probably a user error. If not an ICE bug..
     
    farooq-gill likes this.
  4. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Hi,
    does it work with Apex Path ?
     
  5. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Thanks for your help but the navmesh won;t work for me with this system because it just goes right through the obstacles. And also when i have used the navmesh obstacle my character still goes through every single thing and it way too fast aswell. For this reason i am only using the character controller but sometimes the zombies get stuck and just don't avoid the obstacles. I have tried internal but that goes through everything as well so the only thing that has worked is the character controller.
     
  6. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    not if you set them as static, then bake, it will avoid them.
     
  7. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I've set my fences as static, so they do not go near them. Of course you need to set your AI to use Navmesh, bake your navmesh, put anything set as static first and it will build the navmesh around them.

    fences.jpg

    The only other way without navmesh, is create a raycast/collision detection for items by tag or name and make them go a different way, or enable them to react to the walls or fences, like stumble over, climb over etc.

    You'll need to add a Nav Agent to your model first also, and set the Navigation option in ICE as Navmesh.
     
    Last edited: Oct 10, 2016
  8. Daui

    Daui

    Joined:
    Jan 28, 2016
    Posts:
    4
    UPDATE fixed line to:

    if( Event.current.type.Equals(EventType.Repaint) )

    and my error clears. Hoping to help in case anyone else experiences the error in Unity 5.4.1p3 or later versions.
     
    julianr likes this.
  9. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    It was mentioned that further 3rd party asset support would be added after the next release, which Pit is working hard on. Hopefully he'll add it to the list, but at the moment it doesnt support it, unless you are experienced in this to make the changes yourself.
     
    antoripa likes this.
  10. antoripa

    antoripa

    Joined:
    Oct 19, 2015
    Posts:
    1,163
    Fine.... any idea about ETA ?
     
  11. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Pit contacted me recently and said that the next BIG update was close. Hopefully not too long now.
     
    antoripa likes this.
  12. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Navmesh is working now i must not have set things to static but i still get the same thing where the zombie still running but its trying to go through the wall. Is there a way to fix this.
     

    Attached Files:

  13. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    create a screenshot for me of the inspector on the wall. I take it that the wall is set to static before the navmesh has been baked?

    Did you also set the zombie on ICE to use Navmesh and not the controller, else it'll still not use the navmesh.
     
  14. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Yeah i changed the ICE to use navmesh. The picture is all that may be causing it. They are all static but i have noticed that alot of these models are grouped where the modeler may have used a empty game object to group them so was wondering would that have made a difference. collisions.JPG
     
  15. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Hi was just wondering if there is a way to getting enemy footsteps. With UFPS it has a great footstep manager which would have been good if somethink like this could be implemented into ICE.
     
  16. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I think it must be down to the way you are baking your meshes, as it doesn't appear to be excluding them. Looking at my example does it show a non baked part around the wall? As the AI wouldn't be able to walk through it if it does, they would find a route around it. When you bake are you selecting ALL on the scene filter within the Navigation gui?
     
  17. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Agree with you, a footstep manager would be pretty cool, so you could hear footsteps from a distance getting louder.. giving a good atmosphere.

    You could try this asset pack - it should work
    https://www.assetstore.unity3d.com/en/#!/content/63066

    But I don't know if it would work on AI, as you would need some sort of distance between the player on the camera, as long as there is a fade out distance.

    edit: I just asked them in their forums - it may be a viable solution especially if you can add the footstep decals based on texture, showing mud trails.
     
    Last edited: Oct 11, 2016
    farooq-gill likes this.
  18. farooq-gill

    farooq-gill

    Joined:
    Oct 8, 2016
    Posts:
    13
    Thanks Julianr
     
    julianr likes this.
  19. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Yeah it did bake ok and have noticed there is parts that don't have navmesh around fences. When the zombie does chase me it avoids the obstacles really good its only when it just wonders. It may have somethink to do with the models maybe. These zombies are only called runners because they don't have walk animations. And i am using legacy animations too. But this still is the best AI system for doing zombies. I haven't tried normal animals with this.
     
    julianr likes this.
  20. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Yeah i wonder if that will work. It may be good considering it uses texture base aswell. My zombies sound a bit light with no footsteps. I have tried a lot of AI systems out there but have never tried sound with them because i have been further with this AI system which is great. I hope the next update is absolutly amazing. Maybe Pit can implement creature footsteps.
     
    julianr likes this.
  21. farooq-gill

    farooq-gill

    Joined:
    Oct 8, 2016
    Posts:
    13
    Hi Julianr, I put the code under void FixedUpdate() in ice_creature.cs. And the score system worked but there is a problem. It starts giving me points after the creature dies and keep giving me points as long as the creature is there in the scene. After some seconds when the died creatures disappears it then stop counting the scores. It is because the
    "(Status.IsDead)" condition stays true in this whole time thats why it keeps adding the score. But i want to add the score only once. How would i do this. The screenshot of the code is attached.
     

    Attached Files:

  22. farooq-gill

    farooq-gill

    Joined:
    Oct 8, 2016
    Posts:
    13
    @julianr
    "2. It could be down to you not using a Navmesh, but what you could do is set the following under Motion and Pathfinding (within Essentials) to do a Ray Cast ground check for the layers so the AI knows where it is, in there you have a few other settings like Base Offset. "

    It worked perfectly for me. Thanks.
     
    julianr likes this.
  23. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    There probably is a better place for this code as the update seems to check if the AI is dead several times, but what you could do is create a variable (boolean or string) at the top of the code; such as a true or false;

    Then do;

    Declare your variable (global or private); score_added = true

    if (score_added==true)
    {
    // add score
    }
    score_added = false;

    This should then only add your score once even though it will check it several times. I'll take a look at ICE in more detail to see if there is a better place for it, but in the meantime this example should work.
     
    Last edited: Oct 12, 2016
    farooq-gill likes this.
  24. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Can anyone confirm that the Third Person Controller (opsive) adaptor for ICE only does damage on the 2nd attack or more, never the first? Just trying to clarify if its something I've changed.

    edit: fixed this... it was down to the attack animation being slower than it should so the timing of the damage was out.
     
    Last edited: Oct 15, 2016
  25. zhuchun

    zhuchun

    Joined:
    Aug 11, 2012
    Posts:
    433
    Hi, I'm curious about how this asset control characters, rigidbody or character controller?

    Since there's a PUN adapter, I'm assuming it supports Bolt as well, which doesn't fully support rigidbody style controller in server auth games.
     
  26. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    Anyone knows about compatibility between this and Dungen?
     
  27. TeamofLightMedia

    TeamofLightMedia

    Joined:
    Jul 19, 2016
    Posts:
    4
    Looking through the manual and it says gravity should be around 9.8. Our game uses a different number for gravity. Would that make ICE not perform correctly?
     
  28. Stanchion

    Stanchion

    Joined:
    Sep 30, 2014
    Posts:
    269
    Bolt works fine for rigidbody NPCs in auth and non auth games.
     
    julianr likes this.
  29. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Hi i was wondering to get an animal to kill a zombie. I have worked out how it will kill ufps but i can't figure out how it will kill a zombie or the zombie kill the animal.
     
  30. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Sorry i have worked it out now
     
  31. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    I thought i had worked it out but now while attacking there life goes down. Is Pit still around because have noticed he hasn't answered any post for awhile i would hate to think he has abandoned this because it is still really cool.
     
  32. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    I now know it is a bug because i decided to see the ufps ice creature control demo and it does the same thing where it would be attacking and without you killing the creature it will just die. Have anyone else noticed this.
     
  33. Harald_Heide

    Harald_Heide

    Joined:
    Jul 22, 2015
    Posts:
    81
    What would be really beautiful is if you kind of teamed up with GIM and made a tutorial of how to use this tool together with mecanim and navmesh as a unity project telling the story of A day in Robert the Deers life. Maybe even more of GIM's animals interacting with each other. Together with GIM's beautiful but advanced animations this would present an unbeatable combination presenting a value addon for both you and GIM, and giving developers access to a fully automated beautifully animated forest population of NPC animals. Just an idea...
     
  34. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I have used a dog in my game to attack zombies, it will kill each one before moving onto the next target in range, then when all zombies are killed it will sit. It does work, but it takes interactors on both zombie and the dog to get it to work.
     
  35. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I'd imagine as long as you can generate a navmesh on Dungeon it should work fine. Although you'd need to make sure they can walk up steps, so you may need to tweak the heights a bit.
     
  36. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    They both do attack each other but will not kill each other. On the ufps demo for ice it has the influence on the attack state so therefore every time it is attacking the player or another creature it loses life. I have found if i just put the influence just impacts it won't kill each other but the problem is on the attack they are dying but they are actually killing themselves. Might be worth looking at it closer. The impact are actually having no effect whats so ever. I worked this out by letting the zombie keep on killing me and just watched and then suddenly the zombie died without me killing it then i looked closer i had my zombie set up exactly the same way as that demo and i took that attack influence off then it didn't kill it self.
     
    julianr likes this.
  37. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    Hi another problem i have when i use ufps shotgun with ice creature control i get a error message saying the adaptor has been destroyed and you are still trying to access it. My guess is it may be because the shotgun is powerful and can kill creature straight away this is why i am getting this error. How would i fix this. I know @julianr has been helping but where is the creator of ice creature control.


    I fixed it by putting if (m_InstaKill != null) on the ufps adaptor.
     

    Attached Files:

    Last edited: Oct 15, 2016
    julianr likes this.
  38. farooq-gill

    farooq-gill

    Joined:
    Oct 8, 2016
    Posts:
    13
    @julianr
    The score system works but with a little problem. I only get points when i kill creatures that are present at the start. The clones that creature register generates didn't give me any scores/starts. I put the code exactly in the same place in ice_creature.cs where you told. Any Idea I am totally stuck.
     
  39. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    I have a Game Ranking System that I developed for another engine, but will be converting it to Unity next week to work with ICE, so I'll help you out then to find the correct place for the code.
     
    farooq-gill likes this.
  40. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    239
    Thank you Julianr, I wish the dev would be as responsive as you.
     
  41. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    I have actually been using the legacy animation with creature control and decided to try the mixamo zombie mecanim with it but it doesn't do any animations. The zombie does move to destination but it doesn't do the run or walk or any other animation. The zombie characters are free on the mixamo store so has anyone else have tried this and if so can you tell me how to go about this thanks in advance.
     
  42. wendymorrison

    wendymorrison

    Joined:
    Jan 6, 2014
    Posts:
    246
    It was only because i had transitions on the animator
     
  43. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Thanks Setmaster. I can understand how Pit develops especially on this major update, if you are working on something big you often get sidetracked when having to support such a huge project, and you sometimes have to lock yourself down to get the release out. Pit has provided me with a copy of the next release and I'll be testing it out, it still needs documentation and may need 3rd party adaptor updates - he'll be back on the forums in no time.
     
  44. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    Dear customers,

    I’m sorry for my silence during the last weeks. I'm absolutely aware, how important it is to provide you an excellent support. It’s bad manners and a no-go to leave you alone and that’s definitely not the way I like to go but I’m also focussed to provide you an excellent product and I have spent the last month to improve and upgrade the current asset. Unfortunately there were so many open tasks which has been done and so less time to do it and so I had no other choice and have taken some time to finish the update.

    Now, it’s nearly done! I have to finish the documentation and the inspector help-files within the next days before publish the official version, but apart from that, if you can’t wait anymore, please contact me via pm and if you have a valid invoice number I’ll send you the update directly. But I have to mention also a small disappointment, I can’t provide you the announced version 1.2, because there was too many conflicts with future features and therefore I have discontinued this branch and will provide you instead directly version 1.3.

    I would like to apologise for the inconvenience caused and I hope, the result will compensate the trouble and you will enjoy the work with the new version.

    Finally I have to thank Julian for its unselfish and excellent support but also all the other ones who answers questions, shares their experience and keep the community alive – thanks so much for this. You are great!

    Btw. I’ll answer all open questions step-by-step within the next days and in urgent cases you can contact me as usual also via skype.

    Have a great day!

    Sincerely yours,

    Pit
     
  45. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Thanks Pit. Looking forward to testing 1.3, my project wouldn't be the same without ICE. Its so flexible, so looking forward to what 1.3 brings. A recent screenshot from my game; grouphug.jpg
     
    Tethys likes this.
  46. icetec

    icetec

    Joined:
    Mar 11, 2015
    Posts:
    592
    I think the most important features will be the collection of entity scripts (weapons, object and tools etc.) to create objects your creature can collect and use. Also interesting will be the ICECreatureBodyPart script which you could add your creatures body parts to handle the different damage impacts and influences ... also you will find now several event methods (within the target and behaviour sections) which allows your creature to call methods on its target or on ints own child objects (e.g. OpenDoor on a door target or LightOn on a flashlight your creature is using or Fire on a ranged weapon while your creature is running an aiming behaviour etc. ) ... also you'll find an complete turret component which can attack your player and your creature ... play with the wizard after importing the package ...
     
    arnesso, julianr and farooq-gill like this.
  47. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Sounds Awesome! Quite a few things to look at :) I like the ICECreatureBodyPart script for damage on each part of the body, as I've been using collisions for that previously, and I may be able to tie that in with removable limbs, especially on the zombies. Not sure how that will work out with the TPC adapter yet, but will no doubt need updating to support that functionality in due course?

    Interactions with objects looks like a good feature. Nothing like trying to hide from a zombie in a room, for it to open the door and attack. I'll post some updates as soon as I've had a good look.
     
    arnesso likes this.
  48. farooq-gill

    farooq-gill

    Joined:
    Oct 8, 2016
    Posts:
    13
    @julianr
    thanks and waiting bro.
     
    julianr likes this.
  49. julianr

    julianr

    Joined:
    Jun 5, 2014
    Posts:
    1,212
    Love the Aging feature of 1.3, decreasing the age of the creature over time in a natural life/death cycle and also the additional conditions (one of them is to check if your target is destroyed (I was waiting for that one!)) - good job :)
     
    arnesso likes this.
  50. ebizcraftsman

    ebizcraftsman

    Joined:
    Dec 10, 2015
    Posts:
    20
    Help :)

    I have installed version 1.3, Might I add looks AMAZING so far, but I am having problems with the UFPS adapter add on. Everything works great, but as soon as I install the adapter, I get this:

    Assets/ICE/ICECreatureControl/Scripts/Adapter/UFPS/ICECreatureUFPSAdapter.cs(306,111): error CS1061: Type `ICE.Creatures.Objects.BehaviourObject' does not contain a definition for `BehaviourModeKey' and no extension method `BehaviourModeKey' of type `ICE.Creatures.Objects.BehaviourObject' could be found. Are you missing an assembly reference?

    Its probably something small, but for some reason the answer is not popping in my head.. Can anyone help?

    Thanks :)