Search Unity

Malbers Animals-Creatures

Discussion in 'Assets and Asset Store' started by Malbers, Nov 12, 2016.

  1. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    also uploaded this one to show he's still moving forward when I press space bar and can't handle that little hill next to the ramps :( he can handle all 4 ramps tho which is nice.




    p.s. that horse is awesome and my mom really liked the crocodile
     
    Last edited: Apr 12, 2020
  2. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    More Animation Updates: :)

     
    Rowlan, ftejada and BackwoodsGaming like this.
  3. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    can you send me a Lite project only with you bird and Dragon to see the settings for the AC (No networking) as Simple as possible :)
     
  4. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    where should I send it?
     
  5. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
  6. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,275
    I was accidentally listening to the Lion King opening theme when I clicked on your forum thread and saw this video. Now I think I must have all of those animals in the opening scene. Where should I send my money to? :D

    Most awesome, can't wait! :)

    Btw will there be a little one as well?
     
    Malbers likes this.
  7. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thank you rowlan!!!

    I will do my best to work my magic and convert this mesh via Bone scaling and blendshapes to a little one ... maybe a little Dumbo too haha
     
    Rowlan likes this.
  8. cidolfas2015

    cidolfas2015

    Joined:
    Sep 27, 2015
    Posts:
    87
    ok I sent you the prefabs
     
  9. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    @Malbers or advanced users, I am trying to work out how I can activate the eat mode when I pick up an item. Could you give brief idea how this could be achieved. I'd love the ability to add different amounts to the hunger stat depending on the id of the item too.
     
  10. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You can use several Eat Zones instead...
    You can make the Zones Act as Items since they Play the Eat animation and modify the Stats ("Hunger") when they are active.

    Inside the zone (add your mesh for your food item :) ) and remove all the unnecessary stuff you don't need on the zone :)
     
  11. KeithBrown

    KeithBrown

    Joined:
    Apr 1, 2017
    Posts:
    191
    Definitely going to pick those up. I think that this will look good on the horse.

     
  12. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @Malbers, that sounds great for static food items but my player has the ability to pickup and carry the food too. They can also drop the food in another location. I'm playing around with adding the eat zone to the food prefab which also has pickup on it but at the moment the player just picks up the food and doesn't eat it.

    I also need the ability for the player to drop the food so AI can pick it up and eat it which is one of the main reason I have to be able to move the food item to give it to the ai.


    EDIT: I would love some more detail in the manual on zones too, for some reason my own animal is not responding to the zones and I can't find any info in the manual as to why. My animal seems set up but when i enter eat zone nothing happens. When I look at the included wolf it works so it must be something with my setup.

    EDIT 2: Maybe it would be better to add another ability to Pickup/Drop so you can Eat the item too?

    EDIT 3: I tried to adding two pickup scripts to the player to see if I could hold one item in each hand but that didn't work. Is there any reason you can't have two pickup area's and two pickup scripts on one player character?

    The controller is absolutely fantastic and the more I work with it the more features seem to fit my needs but the lack of a manual of these features is causing a few problems. I can't seem to find any info on the zones and how they work.
     
    Last edited: Apr 17, 2020
  13. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    @Malbers Have you got a timeframe for when the documentation will be finished? Especially the AI docs they are all empty and maybe more explanation on the zones.
     
  14. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
  15. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Oh that's a little more complicated
    Are you using the same button for eating and carrying it?
    because you can use can add to a gameObject both components (Zone and Pickabe) but you should not use the same button for Eat and Pick.
    Again ... make it zone and Pickable :) pickable for you .. and for the AI it can be recognize as a zone
    Done :)

    Please check here on the zone if you have this set correct in the Zone Script:
     
    Last edited: Apr 19, 2020
    AndyNeoman likes this.
  16. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    That's great I will check out the docs. I have just changed the eat to be on a separate button to see if I can solve that. One final thing is i'm trying to vary the amount of decrease in the hunger stat depending on the food eaten. In the events you can pin a stat and then modify it but I cant seem to replicate in script. What I have is a switch statement based on the item name and a reference to the stats script but can't see the method to modify the value. Are they not accessible?


    On the AI side how do I set a target for the AI to move to? Example when my AI hunger stat is below 50 I want the AI to target the player to ask to be fed, so Target player, move them then play there animation request food. then if still no action has happened and hunger goes below 30 I want the AI to change target to any food item and the move to it and pickup and then eat itself.

    All that is set up with your events except the ability to target either the player or the food item.
     
    Last edited: Apr 19, 2020
  17. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,275
    I abused the Animal Controller, it's not just for animals anymore :D

     
    Vog and rrahim like this.
  18. Boig

    Boig

    Joined:
    Jul 10, 2019
    Posts:
    5
    Hello Malbers,
    I just got the Animal Controller in the Unity Spring Sale and I'm playing around with it. I did your tutorial video and got the controls working but I have no idea how the AI Controller works.
    Is there any tutorial about setting up the animal AI? Just something about which scripts to add, how to configure them and creating a simple idle to patrol to idle routine.
    Thanks a lot in advance!

    EDIT: Nevermind. My Navmesh was set up wrong.
     
    Last edited: Apr 20, 2020
    Malbers likes this.
  19. WelchCompositions

    WelchCompositions

    Joined:
    Sep 30, 2013
    Posts:
    29
    Hello!

    Ive been enjoying working with this pack! Im having some trouble with my AI deer doing a little spin when they hit their destination. I've tried increasing the stoping zone radius which helps but doesn't always remove it and has the added downside of I don't actually want the stop radius larger. I just want these guys to not do their little twirl. Gif attached of what Im seeing.

    It only seems to happen when the deer is coming from a fast run to a stop (might be sprint not sure how to tell). Its intertia doesn't seem to overshoot the target zone as its green. Is there maybe some animation sequence being triggered going from a full run to a stop?
     

    Attached Files:

  20. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Hi @Malbers there seems to be a bug with the zone script. There are no fields or anything displayed on the script in the hierarchy (You can just make the detail out but not clickable) This explains a bit of the reason for me struggling but until I saw you docs I didn't realise what is missing.

    EDIT: Partial solution if you can mange to click the three dots and change the mode from action to any of the others the script unfolds and you can then access the fields so the bug seems to only effect the mode "action".

    As I solution to my problem wanting variable stat changes to hunger based on the food item I am looking at setting up a EAT mode separate from action and then having varying amounts on each Eat zone depending on the food contain in the zone. I am then playing doing the same by having a sleep mode so again depending on the nest my player/ai is in the amount of tiredness that goes down.

    So finally if you can help out on the AI question I had above regarding how to target an object or zone etc for the AI to move to that would be fantastic. Hopefully you will love what I am planning with the controller it is a fantastic asset. :)
     
    Last edited: Apr 20, 2020
  21. Boig

    Boig

    Joined:
    Jul 10, 2019
    Posts:
    5
    Hi @Malbers I am trying to work with the trigger zones and got the wolf to go to the "Zone Eat" when his hunger stat is below a certain threshold. He arrives at the zone and the "eat animation" is played correctly, however the hunger stat doesn't change. What am I doing wrong?The wolf stats are set up like this:
    Wolf.png
    And the zone like this:
    Zone.png


    EDIT: Had to add a collider to the animal. Works now. However scaling the animal breaks it again....
     
    Last edited: Apr 21, 2020
    KaoticBrew, Malbers and AndyNeoman like this.
  22. tgamorris76

    tgamorris76

    Joined:
    Apr 24, 2013
    Posts:
    292
    Hello, got HAP in the sale and have been playing with it, i also use game creator and there seems to be section on your doc site under integrations and seemingly under construction. But when will there be game creator integration?
     
  23. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    How did you get the wolf to go to the eat zone when hungry? That's is what I am trying to do at the moment.
     
  24. Boig

    Boig

    Joined:
    Jul 10, 2019
    Posts:
    5
    Like this:
    On the stats script -> Events -> OnHungerBelow X -> MAnimalAiControl.SetTarget(ZoneEat)
    Screenshot 2020-04-21 10.08.17.png
     
    AndyNeoman likes this.
  25. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Screenshot (135).png
    That's great, I wonder if that works on spawned Zones too? i'm loading up my project now and I will go through how I got my hunger to reduce on eating.

    EDIT See image, there are plenty of ways to do it but this is how I did originally and it works fine if you only want the same value of reduction in hunger but I need to alter mine as I want different amounts depending on the food item eaten.
     
    Last edited: Apr 21, 2020
  26. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey guys I'm back! apologies for the late reply.


    On the Scripts is done this way:
    First you find the Stat you are looking for:

    Code (CSharp):
    1. var myStat  =  Stats.Stat_Get(string name)
    2. OR
    3. var myStat  =  Stats.Stat_Get(Int ID)
    and once you have the Stat
    you can use the Stat methods (not the Stats methods) Stats is the Component with the array of Stat

    for modifying a stat use:

    Code (CSharp):
    1. Stat.Modify(float value) // this one adds to the current value
    2. or
    3. Stat.SetValue(float value)// this one set a new value
     
  27. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That is due to the inertia of the animal when he arrives to the target... that can be easily solved if you increase the walk distance on the AI Control
    upload_2020-4-21_22-38-33.png
    that makes the Deer slow before stopping on the Target
     
  28. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thanks for this... I have fixed it on the latest update :) it was a variable that should be Upper Case instead of Lower case
    The problem was here:
    upload_2020-4-21_22-49-33.png

    That is actually a very clever Idea.

    About your AI request I'm working on a video on how to do it .... please stay tuned.
     
  29. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    In order for the Zones to work Both Colliders (Animal and Zone must interact) if you scale the animal and the animal's collider does not touch the zone.. it wont work... try scaling on the Y axis the Zone collider too
     
  30. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    The Integration is on the to do list.. so far the next integration in line is Opsive UCC (which is scheduled for May ) after that one is Game Creator
     
    tgamorris76 likes this.
  31. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    So here's a quick video of one of your questions: How to make different food affect the Hunger in different values
     
    AndyNeoman likes this.
  32. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    Fantastic support - thanks @Malbers.
     
    Malbers likes this.
  33. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    I am having an issue with AI.
    Player attacks an enemy but enemy does not get damage on other hand other enemies in the scene get damage and die! kindly check this out!
    If you say so i will post video to show.
     
    Malbers likes this.
  34. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I know you are still busy writing the manual @Malbers but if you could help give some info on the MWayPoint script that would be really useful. I was about to write my own spawner to get the ai to roam around but looking at patrol and the MWayPoint script you might already have it covered.

    How do I access this in code to get my ai to look at the list of targets. My plan was to have a list of targets and then sort by tag and then get the ai to choose the closest one. I have the code choosing the closest one but cant seem to access the target list you have.
     
  35. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    In order for any animal attack to another animal here are the requirements:
    • Both Animals/Character need to Have colliders anywhere.
    • The Animal Controller Sets which layers the Attack triggers will interact with:
    upload_2020-4-22_14-38-45.png

    So your animals need to have the other animal included on the Hit Layer.

    Check then which Layers are your Enemy Layers (Including Children) and which layers can your character Attack

     
  36. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I'm writing it right now :D
    MWayPoint has an Static value you can access everywhere that hold the list of all the MWaypoint on a scene.

    Use
    MWaypoint.WayPoints


    Now on the Brain you can check the closest waypoint on the Look Decision:
    upload_2020-4-22_15-5-3.png

    Which basically what it does is to search on that list the closest one from the AI Animal
     
  37. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Somebody have same issue?
    I tried to delete all standart assets scripts, but still got this errors
     

    Attached Files:

  38. AndyNeoman

    AndyNeoman

    Joined:
    Sep 28, 2014
    Posts:
    938
    I'm not sure if im having a slow day but this code seems exactly the same as mine but i'm still getting the error on action. ModeIndex is capitalised on mine.
     
  39. wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    Joined:
    Apr 23, 2020
    Posts:
    5
    Hey Dear Malbers,my animation dont have RootMotion, I know those speed sets and I adjusted those but the character is STILL not moving and the animation goes well . I've checked possible causes but still confused.any idea? upload_2020-4-23_20-52-6.png
    upload_2020-4-23_20-57-54.png
     
  40. wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    Joined:
    Apr 23, 2020
    Posts:
    5
    @Malbers
     
  41. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Actually take a look to the Locomotion and Idle States:
    you should have enable this modifiers on the General Category:
    upload_2020-4-23_12-18-12.png
    upload_2020-4-23_12-18-32.png

    the important one is the +Pos Speed (Additional position Speed) which allows the Animal to use the Speeds on the Speeds set

    also I see that your pivots are not adjusted... always try to have the this way:
     
  42. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    That standard assets have cause enough trouble. I'm officialing removing the Integration with Standard assets
    since they are no longer supported on latest version of unity..

    here's the fix:
     

    Attached Files:

    BATTLEKOT likes this.
  43. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Somebody asked me how to make an AI companion for Ellen and I did this small video in case you want to know how to do it:
     
    AndyNeoman and Rowlan like this.
  44. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,275
    That's an awesome idea!
     
    Malbers likes this.
  45. wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    Joined:
    Apr 23, 2020
    Posts:
    5


    thanks for your timely help! but I checked those modifiers and turns out still not moving...

    upload_2020-4-24_2-0-7.png
     

    Attached Files:

  46. Andr3w

    Andr3w

    Joined:
    May 24, 2012
    Posts:
    18
    So I downloaded Animal Controller when it was free. I see that I can download it now when its priced, but Im downloading the free version or is it the newest version? Im asking because after I downloaded the asset and run sample scene for example forest or playground, most of the interactions dont work. Those light-red circles with text "Lie", "Sit" etc. dont activate in game. And "Sleep" and "Eat" interactions are making wolf character to eat.
    I also have no warnings in the console.
     
  47. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You have the latest version like everyone else :) no worries.. when it was free was because it was on beta ;)

    That should work as expected.. if the problem continues is because this little guy right here:
    https://forum.unity.com/threads/malbers-animals.440812/page-24#post-5746678

    Updating to the latest version should solve the problem
     
  48. wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    wechat_os_Qy0x-jyFx9cdVcKsEMWYw3eXU

    Joined:
    Apr 23, 2020
    Posts:
    5
    @Malbers
     
  49. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Can you make a small video with the Debug Tab enable to see if something is off?
    upload_2020-4-23_21-12-34.png

    or if you don't mind can you share a unity package of you're cat (Model, Prefab, and Animal States assets)
     
  50. tahir_ali

    tahir_ali

    Joined:
    Jan 6, 2018
    Posts:
    119
    I tried the things you mentioned but issue is still there,
    Here some is little sample for understanding the issue!
    AI issue.gif

    Issue is with health states or may be Damaged Mod!