Search Unity

Malbers Dragons (Closed)

Discussion in 'Assets and Asset Store' started by Malbers, Jun 20, 2016.

  1. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    It seems is a problem with the AI prefab for the Little dragon mouse...

    Just hit Apply all overrides
    upload_2019-10-5_13-58-44.png
     
  2. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    That fixed one error, now i get a bunch of new ones:
    NullReferenceException: Object reference not set to an instance of an object
    MalbersAnimations.Controller.MAnimal.Awake () (at Assets/Malbers Animations/Common/Scripts/Animal Controller/MAnimalLogic.cs:52)

    and then it says something about Travelling to Zone Dig and it won't move, with another error

    NullReferenceException: Object reference not set to an instance of an object
    MalbersAnimations.Controller.MAnimal.OnAnimatorBehaviourMessage (System.String message, System.Object value) (at Assets/Malbers Animations/Common/Scripts/Animal Controller/MAnimalCallBacks.cs:115)
    MalbersAnimations.MessagesBehavior.DeliverListener (MalbersAnimations.MesssageItem m, MalbersAnimations.IAnimatorListener listener) (at Assets/Malbers Animations/Common/Scripts/Behaviors/MessagesBehavior.cs:140)
    MalbersAnimations.MessagesBehavior.OnStateEnter (UnityEngine.Animator animator, UnityEngine.AnimatorStateInfo stateInfo, System.Int32 layerIndex) (at Assets/Malbers Animations/Common/Scripts/Behaviors/MessagesBehavior.cs:52)
     
  3. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    I have 2 issues:

    First Issue:

    I'm doing the hatching of the egg using the Toon Mouse. The problem is that while inside the egg, the animal seems invisible but I can still see the eyes. I'm trying to find where is the animation of that dragon hatch but I can't find it.
    Looking at DragonEgg.cs I see:
    animal.Anim.Play("Hatch");

    Then I went for the animations, for the demo, for the regular one... nowhere to be found the Hatch animation. Where is it?

    So far I was able to add the code:
    Transform eyes = animal.transform.Find("Eyes");
    if (eyes!=null) eyes.gameObject.SetActive(false);

    So the eyes are invisible, but I don't see "Hatch" animation anywhere


    Second Issue:
    The "height" from the ground seems to be completely ignored. I searched all the code to find where it's used and it's nowhere to be found. I've tried to set the ground layers to everything, changing the height to crazy numbers, nothing... it stays where it was before. Where is the raycast for this? Also the "hit layer" what's that? The documentation about everything is obsolete.
     
    Last edited: Oct 7, 2019
  4. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    The Hatch animations are on the Actions :) upload_2019-10-7_15-56-49.png

    and here's the fix for the Eyes... on the DragonEgg script I use to only hide the first skinned-mesh I find .
    I fixed so every skinned meshed is hidden. (see attachement)

    About the Height parameter... that is the distance of the Hip and Chest pivots to the ground.. that is used to know if the dragon/animal is grounded or not..

    The hit layer is what the animals/dragons can hit using the Attack Triggers...

    I know I know :(
    I'm updating it all the documentations as I go... I'm trying to finish all the migrations which is the priority at the moment ...so then I can finish the Documentation, integrations and all the remaining things I have to do...

    I have updated the Little dragon mouse... it has some issues with the demo scenes and prefabs...
    also here is that fix:
     

    Attached Files:

  5. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    First: that doesn't fix the eyes because the Toon doesn't use a skinned mesh for the eyes, it uses a regular mesh with animated sprite/material.

    Second: With the new rar file you attached, I still can't get the demo AI scene to work. As soon as I hit play I get these errors:

    On LD Mouse AI Realistic
    NullReferenceException: Object reference not set to an instance of an object
    MalbersAnimations.Controller.MAnimal.Awake () (at Assets/Malbers Animations/Common/Scripts/Animal Controller/MAnimalLogic.cs:52)

    Followed by a thousand of these:
    NullReferenceException: Object reference not set to an instance of an object
    MalbersAnimations.Controller.MAnimal.OnAnimatorBehaviourMessage (System.String message, System.Object value) (at Assets/Malbers Animations/Common/Scripts/Animal Controller/MAnimalCallBacks.cs:115)
    MalbersAnimations.MessagesBehavior.DeliverListener (MalbersAnimations.MesssageItem m, MalbersAnimations.IAnimatorListener listener) (at Assets/Malbers Animations/Common/Scripts/Behaviors/MessagesBehavior.cs:140)
    MalbersAnimations.MessagesBehavior.OnStateEnter (UnityEngine.Animator animator, UnityEngine.AnimatorStateInfo stateInfo, System.Int32 layerIndex) (at Assets/Malbers Animations/Common/Scripts/Behaviors/MessagesBehavior.cs:52)


    Third:
    Is there an easy way to make the dragon follow the main character as if it was a pet?
    Walking, flying if I fly, running if i run...
     
    Last edited: Oct 9, 2019
  6. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I have setup the dragons for the 360 controller and have the folowing configuration for the Attacks.

    Attack 1 - Press Y button
    Attack 2 - Double Tap Y Button

    That works fine.

    But I also want to setup another Attack for just Fire Breath.

    How do I create an attack for a specific button?
    I cant find anything in the documentation so far.

    Help appreciated, thanks
     
  7. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
    Not sure if this question has been asked or not but would this asset be compatible with Emerald AI? I would like to use this controller for the player and then use Emerald AI for the AI creatures.
     
    SteveKouts likes this.
  8. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Is there audio for "roar" ? I can't find it. And it's kinda silly to have "roar" sounding less than a whisper.
    Also, the firebreath doesn't have any sound, shouldn't it have one?
     
    Last edited: Oct 9, 2019
  9. gearedgeek

    gearedgeek

    Joined:
    Jun 19, 2015
    Posts:
    236
  10. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    here are some audios for Roar I found online :) ... Im not a sound designer but I think this should work
     

    Attached Files:

  11. Malbers

    Malbers

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

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    For the Fire Breath .... the way to Activate it is this way:
    All the Dragons have the Attack2 Mode... and Fireball is the Ability 1 and Firebreath is the Ability 2

    So... What you can do is to assign to create a new Input and assign this values: to the Input Down and Input Up

    upload_2019-10-9_20-12-41.png
     
    Hawk0077 likes this.
  13. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    At the moment there's no Integration with Emerald AI
     
    SteveKouts likes this.
  14. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks, I'll take a look in the morning.
     
  15. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Ok so here a couple things that after days playing with this I can't figure out:
    1) Ok, i've got a roar audio. How do I add it to the roar animation?
    2) I like the Attach / Special Attack 1, which is a firebreath on the air (ability 13). The problem is that it goes up in the air and does the firebreath straight, but my enemy can be anywhere. It doesn' seem I can rotate the dragon to aim at my enemy. I've tried the Aim and LookAt but that's just for when it's on the ground. So how can I make it so that it look at the enemy and throws the firebreath to him?
     
  16. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks Malbers, I got the Fire Breath (Ability 2) working but the Fire Ball (Ability 1) looks like the video attached.

    https://1drv.ms/v/s!AqCnWIL3cdjfgvUxLf2v0E_DugWvrA?e=Fnpbaw

    Any idea whats wrong?

    Thanks again. much appreciated.
     
  17. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I think the problem is that the fireball is exploding with any of the front triggers... like the firebreath trigger..

    go to the Fireball prefab and change the Layer Mask on the MAttack trigger component... remove layers like Ignore Raycast, UI, and layers you don't need the Fireball to collide with.
     
    Hawk0077 likes this.
  18. FanatSors

    FanatSors

    Joined:
    Jul 6, 2014
    Posts:
    1
    The web demo for elemental dragons seems to be down!

    Kinda wanted to compare unka to elemental dragons..

    Elemental ones seem to have different "hair" styles included too?
     
  19. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    You can do it in 2 different ways...

    1 . you can add an audio behaviour to the Roar State on the Animator Controller and add the Roar Sound
    upload_2019-10-10_17-49-1.png
    that is the easy one

    2- You can go to the Animation Clip itself and add an Animation Event..
    Name the Animation event PlaySound ... and set to the string Value "Roar"
    upload_2019-10-10_17-52-45.png
    and then go to the Animator Event Sound Component on Unka and Add Roar to the list

    upload_2019-10-10_17-52-31.png
     
  20. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I forgot to double check the animator with the EnableLook At on the Firebreath and fire ball
    upload_2019-10-10_17-58-16.png
     
  21. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Thanks for reporting this! I'm on it!
     
  22. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    The problem with all this is that when you release an update, everything will get overriden. So I try to not having to touch your animations or code and instead extend mine. I can copy the animator but then i'll mix on all your improvements.
     
  23. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    No that didnt fix the issue.

    I searched the project for Fire Ball and found the prefab as well as the Lite Version and Plasma Bolt and did the same for each but that didnt fix the issue.

    Any more ideas?
     
  24. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Hi, I have dragons and horses integrated with an invector melee controller that works fine.

    My question is: Is there a way to choose a specific Camera State for dragon or horse.

    When I set the Camera State up for the dragon the camera on the horse is too far back. So am looking for a way for either the horse or dragon to change to a different Camera State other then "Ride"

    Any ideas, thanks.
     
  25. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hey Hawk!

    Apologies for the late reply

    You can try putting the Fireball Point a bit farther from the mouth so the fireball does not collide with the dragon on exit..
    upload_2019-10-12_18-46-19.png
    Also Check that all the Colliders of the Attack triggers and Attack Trigger Components are disabled..
    upload_2019-10-12_18-45-9.png
     
    Hawk0077 likes this.
  26. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    For that Try creating another State on the CameraState Set ... Try Calling it "Dragon Ride"

    Now the tricky part is to change the Name on the Link Script to "Ride" ...when the rider is near the horse and "Dragon Ride" when the rider is near the dragon...
    upload_2019-10-12_18-55-14.png

    Luckily the Rider has an Event that catches what mounts is nearby... OnFindMount(GameObject)

    You can make a script and subcribe to that event...
    and check :
    if the Mount is a horse => change the name of the State on the Link script to "Ride"
    if the Mount is a Dragon=> change the name of the State on the Link script to "Dragon Ride"
     
    Hawk0077 likes this.
  27. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    No problem at all, its worth waiting for.

    That fixed the fireball by repositioning the FireballPoint.

    Much appreciated, thanks.
     
  28. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks, I am not a coder at all. So will have to get it done by a professional at a later date. Thanks for the response though.
     
  29. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
  30. MagiSoftworks

    MagiSoftworks

    Joined:
    Feb 12, 2019
    Posts:
    124
    Hi Malbers! - Your product is always the best. Have pretty much everything. Added Fox to my collection and dropped him in a working project on new controller with several of your little dragons which were working great (Low Poly Scene) and got a script brick [LookAt.cs], then removed all and actually get a unity crash. Using Unity 2019.2.3f1. Thoughts? Thanks!
     

    Attached Files:

    Last edited: Oct 13, 2019
  31. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Yeap the problem is the fox is still using the old controller... Fortunately I'm finishing migrating all the animals to the new controller... and it should be ready by next week...

    I recommend that you wait for the Fox to be updated... before importing it to your project
     
  32. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Humm... it seems the Dismount animations are failing on the Mount triggers for the dragon... let me check and I'll let you know

    EDIT:
    Yeap they are empty: Thanks for finding this bug :)
    upload_2019-10-13_11-47-5.png

    Just set these animations on that States and it should work again
     
    Hawk0077 likes this.
  33. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks Malbers, that seems to have fixed it.

    Im currently looking for the place to add the wing flap sounds whilst flying straight but cant seem to find them. Can you point me in the right direction?

    Thanks, much appreciated.
     
  34. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    The Flap Sounds on the Dragon are done via Animations Events...
    and they are catch with the Animation Event Sound component..

    So to add more sounds you just simply need to add an Animation event to the animation you want
    with the Name PlaySound... and a String value. "Roar" for example:
    upload_2019-10-13_12-12-37.png

    and then on the Animation Event Sound component add a new listener with the name Roar... and add all the roar sounds you have... ;)

    upload_2019-10-13_12-14-11.png
     
    Hawk0077 likes this.
  35. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Thanks Malbers, much appreciated.

    I will take a look shortly.

    Before I go if you dont mind, I have read that Unka isnt compatible with Emeral AI. I have set it up and the dragon flies but doesnt move towards the waypoints... Random or Set Waypoints.

    Is there a way tog e them moving?

    If not what is the easiest way to get AI type dragons that requires no coding?

    Many thanks again, this dragon is awesome.

    Oh, also in the video you make mention of a Material that changes the color of the dragon. IS that still availble? I think its called substance material or similar to that.

    Many thanks for this awesome asset.
     
  36. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Ah, I don't want to add any other sounds to the wing flap. I want the existing wing-flap sounds to play as currently they don't.

    The events already exist on the Object and Controller:

    fly-1.PNG
    fly-2.PNG
    The sounds just don't play and they never have from the first install.

    Funnily enough the dragons I added to Emerald AI are floating in the air flapping their wings and playing the wing flap sounds but on my main dragon they don't play the flap sound.

    Hope that's clear.

    Thanks again.
     
  37. MrFoxmanGaming

    MrFoxmanGaming

    Joined:
    Sep 2, 2018
    Posts:
    3
    errors.png So I've downloaded the animal controller first and then Unka, however, the Unka prefabs keep showing up with scripts missing. I can hit run by default, but it just loads into idle and stays there. I also have the substance asset downloaded.
     
  38. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    Is it possible to have a minimum height on the follog target script? Unka is too close to the ground :)



    Also when he's too close to the target, he kind of flickers with the head. Is there some way to dampen that effect?
     
  39. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    First of all !! Awesome!!!!

    Second..
    There's an easy way ;)
    you can set the target to be a Empty game object that is child of the car and is a bit higher so Unka follows that instead of the car itself..

    and the hard way would be to create a script that cast a ray to the ground and check the height between Unka and the ground and keep him higher than a minimum height.
     
    Rowlan likes this.
  40. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Any ideas about getting the wing flaps working Malbers?

    Also is there any IA that gets both dragons and horses moving around the terrain?

    Thanks
     
  41. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    I see you have the oldest version with the old Prefabs that use the old Animal Controller... (that is why the missing scripts are there )

    You need to use the Files on the compress file.

    You can check this quick guide:
    https://docs.google.com/document/d/1i40ystGJcOt63q27JIIl_p-MxsxNglWPPVJb5vuPaWM/edit#
     
    Last edited: Oct 16, 2019
  42. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Hawk0077 likes this.
  43. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Can you elaborate a bit more about this?
    What do you want to achieve?
     
    Hawk0077 likes this.
  44. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    I am using Invector, Dragons, Horse and animals with Emerald AI & Crux to spawn animals.

    • I want to have a few dragons flying around randomly. Not ridable.
    • Other dragons wondering around a specific location (home/nest/cave etc) then to be able to ride those dragons. (I most likely wont need an AI system for this/possible a different AI where they put up a fight before riding them, when on them theyre rideable from that point. OWNED if you will).
    • I want to have horses wondering randomly (as other animals using crux and Emerald AI do) but then be able to ride those horses. (if possible).
    Thanks Malbers
     
  45. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
  46. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    When I take off and stay in one place the wings do now make a flap sound.
    But only randomly when in flight and gliding with occasional flaps.

    When I press my A button to fly faster the flaps are gone.

    Il record a quick video.

    I noticed they flap but only on corners too. Not whilst going straight.

    https://1drv.ms/v/s!AqCnWIL3cdjfgvVGZ939j9ACyeISwA?e=fo3TfI
     
  47. Hawk0077

    Hawk0077

    Joined:
    Nov 6, 2017
    Posts:
    788
    Malbers likes this.
  48. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,300
    I think I already expressed my love for combining NatureManufacture and MalberS assets, but here it is again :D

     
    seikida, Malbers and Hawk0077 like this.
  49. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558
    Awesome!!!
     
  50. Malbers

    Malbers

    Joined:
    Aug 7, 2015
    Posts:
    2,558

    Actually you can make some Random Waypoints (Air Type ) just like the AI demo scene and make the dragons wander around ...

    this is without using Emerald... Which I haven't use yet ... so I have no Official integration with it yet.


    On the sample scene from the Horse (Can be called Scene) is the perfect example between AI and Rideable creature..

    the horse is using the AI Animal control when is free... and when the riders mount it... the AI is disabled and you can use the horse as a Mount again.
     
    Hawk0077 likes this.