Search Unity

ICode (AI For Mecanim 2.0)

Discussion in 'Assets and Asset Store' started by DevionGames, Dec 18, 2013.

  1. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    When AI is patrolling, it is moving back and forth between the path. Is it possible to make it stop at the end of the path, wait and then return back ?
     
  2. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Its all up to you, of course its possible : )
     
  3. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Yes, in my example i use a pathIndex you can check this index and make a transtion to a waiting state.
     
  4. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Btw, one thing i think is missing is a vector3 parameter for SendMessage? Since Vector3 is present on all other places it feels strange that you cant use it there?
     
  5. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    You are right, i will add it, a work arround would be to use SetProperty, it supports Vector3, until this is added.
     
  6. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Thanx : D
    Looking forward to that networking tutorial ; )
     
  7. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    yes what's the best way for make random animation for exemple i want hitone to hittwo
     
  8. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Random Animation:
    Create an int parameter in the state machine and randomize it using Random.Range, based on this int paramter transition into a state where you play the animation. For example the random int is 0 -> play hitone, if it is 1-> play hittow...

    Combo:
    If you want a combo, play the first animation and make a transition to a new state with a condition Animator.IsName and Animator.IsInTransition == false, so if the first hitone animation is no longer playing, we transition into the created new state where you play hittwo animation.
     
  9. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624






     
  10. thedreamer

    thedreamer

    Joined:
    May 13, 2013
    Posts:
    226
    Are you planning to make simple RTS battle For example? and Are you planning to Support legacy animation?
     
  11. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Awesome, will help a lot : )
     
  12. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    i don't see the collider who state is playing when i select gameobject in inspector
    edit i think i find i must push the bind gameobject

    any exemple of collider condition please
    http://puu.sh/apcr0/fdd5e85f10.png

    another trouble for understand how is refresh Heal var in ufps sample i don't found any get value

    i have new strange trouble i can't re open state any more (;-
     
    Last edited: Jul 25, 2014
  13. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Please post your question on the forums with and error if there is any.
     
  14. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Added two 2D examples to the package:
    The space example is also 2D, i made a sprite based on the provided unity 3d spaceships.



    Here you can get a few information about the 2D examples:
     
  15. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.4.5 is availible.
    • Behaviour Designer Support
    • Zoom Graph
    • Removed StateMachineTool(Integrated in graph window)
    • Fixed actions running not in order
    • Preferences
    • Improved workflow with descriptions
    • Debug shows correct now
     
  16. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.4.5a
    • Made Preferences global
    • Bug Fixes
    • Removed Examples from the project, they can be downloaded from my website.
    • Removed Ratkin Slave, Ratkin Mage and the animation collection from the project.(Make a backup if you need those)
    Download the examples here!
     
  17. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Added UMA Support. You can change cloth, body barts, customize body parts(height, headSize, headWidth, neckThickness, armLength and all other), change color...using actions.
    If i missed something you would like to change using actions, please let me know and i will add it to the UMA Support package.
     
    hopeful likes this.
  18. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Any video tutorial on How to use with Behavior Designer ?
     
  19. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    Wow, UMA support is an awesome addition! : D
     
  20. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    I have upgraded to 1.4.5b from I guess 1.4.4 (Don't remeber, It should not be from very old build). I am getting into a weird situation. When running half of my state machine states are getting disappeared. Do you think the new build is going to break the previous state machines ?
     
  21. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    No, it should not break any previous created state machines. Do you only see a one line action in the inspector, or what do you mean by disapeared? If you see that one line only action, please import the corresponding supported package.
     
  22. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    This thread popped up in my alerts.

    Zerano was a lot quicker than I was at getting the integration together. I plan on adding behavior tree tasks to talk to AI for Mecanim within the next day or two. After that I will add a documentation topic to the opsive website. I haven't had the chance to play around with AI for Mecanim yet but I am planning on the integration being similar to the Behavior Designer-PlayMaker integration.
     
  23. kotor

    kotor

    Joined:
    Dec 3, 2013
    Posts:
    140
    Did you make changes to waypoints functionality ?
     
  24. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    No there were no changes.
     
  25. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
  26. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
  27. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, bought from your website. It's still showing 1.5.0a instead of 1.5.0b in assetstore. Also, where are the demo scenes?
     
  28. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hey, i am preparing an update to the asset store and will upload it to my store also in a few minutes. You can find the examples here.
     
  29. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Hi Zerano

    A while back I purchased AI For Mecanim, and have only just scratched the surface. In which ways does AI For Mecanim differ from Behavior Designer? They are both for implementing AI right?

    Since I have never tried Behavior Designer and only just played a little with AI For Mecanim, it seems like an AI system supporting another AI system.

    Where do they differ and which system is best for what?

    There must be a good reason for choosing to support Behavior Designer. If a person was using Behavior Designer, what would then be the advantage of intigrating it with AI For Mecanim?

    Likely it is me that is clueless and just does not understand the difference between the assets (though from Behavior Designer's website - it seems a little more "all-round", where AI For Mecanim seems a bit more combat orientated).

    Hope you (or anyone else) can fill me in ;)
    Best Regards!
     
    red2blue likes this.
  30. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Hi, i am not that familiar with Behavior Designer or PlayMaker, but i am sure you can do the same with both system, if you can write your custom actions, tasks and conditions. However most of the users are artists and do not write their own code. Here you need to see what is included in those packages and what you can achive with them. Behavior Designer has an addional "Movement Pack", with AI For Mecanim you can achieve all movement without extra packages. Same with PlayMaker and NGUI support. I am sure Behaviour Designer has also systems/tasks that AI For Mecanim does not have. The support to Behavior Designer or PlayMaker is simple, you can start the behaviour tree or state machine and synchronize variables.

    AI For Mecanim was focused on combat and ai in its early stage, but it turned into a full visual scripting tool over time and is so easy to extend that it becomes every week more and more actions and conditions.

    Maybe someone else can explain it better, who worked with both assets and have more experience.
     
  31. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.1
    • Custom Events
    • Fixed when transition from AnyState to normal state using events.(Event was not resetting)
    • Windows App Store Support
    • Touch actions
    • CoreGameKit Support
    • Global Parameters
    • Presets for creating custom actions/conditions
    • MasterAudio Support
    A few of those updates were made in 1.5.0x. This is just an official release.
     
  32. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,127
    @Ramsdal -

    The difference is essentially state machines or behavior trees. Both AI for Mecanim and Behavior Designer provide AI, it's just the decision making process behind it is different. This is the reason why we are integrating the two assets together - many people like to use behavior trees for the "flow" of their AI and use state machines for the logic.

    In related news, I have almost completed the integration from Behavior Designer to AI For Mecanim. You'll be able to start a state machine, stop a state machine, or use a state machine as a conditional task (useful for conditional aborts). When you start the state machine you'll have an option of synchronizing the local and global variables.
     
  33. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Thanks, can you send email announcement of new versions to those who bought from your store in future? We don't know that a new version is available.
     
  34. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Maybe I missing something. Are there any actions for triggers? Like an on trigger enter/exit/stay? (That's mainly what I am looking for at the moment haha)
     
  35. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Also, I can not open state machine window. When I double click or any other means to open it nothing happens. I do not even recieve an error. Using unity 4.5.2
     
  36. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Yes there are conditions for this. When you make a transition from one state to another there will be a similiar button for conditions where you can choose OnTriggerEnter,OnTriggerExit, OnCustomEvent...

    Could you maybe add me on skype and i would look and show you using teamviewer. My skype is tharon211
     
  37. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I see. I guess because I am used to the other system more like playmaker. This is a new way to do things in some sense.
     
  38. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Also. I know how to load the window normally. It had worked before. Now suddenly no longer loads the window. No errors except something to do with a rigidbody on a surface it shouldn't be on. Not even any warnings. I double click the state and nothing happens.

    =\
     
  39. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Aaaaaand now it's magically working again.
     
  40. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I have a suggestion. Would it be possible to move the sate editing into the state window rather than in the Inspector window?

    Basically self contain all of your tools into your state machine window.
     
  41. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thank you Zerano for adding Master Audio and Core GameKit support in the latest release! For those of you who aren't aware, both of our assets offer maximum features without having to write any code at all!

    Master Audio is the "AAA total sound solution" used by Zynga, KingsIsle and more.
    Core GameKit covers most of your bases with built in pooling, combat system, spawners with tons of options, pickups like coins and variables which can be used for most fields (a la Playmaker). Check them out if you haven't, they're both on huge sales right now!
     
  42. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    I could do that, if more people want this or as an option maybe.
     
  43. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I am ok with "option" hehe. As long as I can just do it somehow. :)
     
  44. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    I have noticed another little thing that might need some attention. Centering on states when opening the state machine. I have opened and found myself far away leaving me to search around for the states.
     
  45. MahaGaming

    MahaGaming

    Joined:
    Feb 25, 2014
    Posts:
    82
    newbie question can this work with animals example tiger , lion non player
     
  46. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Yes it works with anything. In fact this is no loger only ai solution, it can do much more.
     
  47. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Added more documenation. Recording some videos with the "new" interface now.
     
  48. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    Version 1.5.2
    • Legacy animation actions
    • Attributes extension(Handles attributes like health using actions)
    • Simple NavMeshAgent AI actions(Wander, Seek, Flee, Patrol)
    • Updated online documentation
    • SetState(Sets the current state by name) in StateMachineBehaviour
    • SetDefaultState(Sets the current state to the default state) in StateMachineBehaviour
     
  49. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
    New simple video tutorials, more advanced coming soon!







     
  50. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624