Search Unity

AI Behaviors Made Easy! (Walker Boys)

Discussion in 'Assets and Asset Store' started by profcwalker, Apr 22, 2012.

  1. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi Nuverian, we will be uploading some videos showcasing the new features probably within a few days from now. It'll be much easier and more exciting to show than to explain. Good to know about SimplePath, thanks :)
     
  2. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    Thanks for the info

    Sweet. In that case I'll get it. :)

    Nice work
     
  3. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    I've made my purchase :)

    ok I have PlayMaker plugin coz Iam not a programmer, so from what I see you have to attach attack/gothit/playerStats scripts in order to function properly, so my question how I can integrate a FSM into it? For example I want the meleeAttack state of my avatar to recognize my attached FSM.

    Thanks
     
    Last edited: Jul 19, 2012
  4. drewradley

    drewradley

    Joined:
    Sep 22, 2010
    Posts:
    3,063
    Have you seen this page: https://hutonggames.fogbugz.com/default.asp?W329

    It gives instructions on controlling a Playmaker FSM with a script. It's pretty easy to set up but you'll need to get into the code to make it work so it can be daunting to a non-programmer.
     
  5. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Thanks for the purchase Zozo, we're really confident you're going to enjoy our package and even more so when the next release hits the store.

    As far as PlayMaker, if you haven't already, you'll definitely want to check the link that Drew posted since I couldn't tell you much about PlayMaker and how it integrates with our system because I don't personally use it.

    Thanks again,
    Nathan
     
  6. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Yes I checked it I think I can implement AI Behaviors with playmaker so I can use FSM variables and events easily :)

    BTW I hope in next releases to add more features for non-programmers like me :D by example why not our AI avatar has its health parameter to set in the inspector instead of calling GetHealthValue.....ect I mean somethings like that :)

    Also I have a small question: to assign animations to AI you have to write the name of the animation, but by example if there are multiple animation files in the project with the same name how it will recognize the right one? I mean why not make animation assigning like as we know: pick up an animation from the project window ( if you understand what I mean) like when you add the Animation component to a gameObject.

    Thanks
     
    Last edited: Jul 20, 2012
  7. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi Zozo,

    The animation question definitely deserves an answer. The reason why we implemented it that way is because it has been designed to work with animation systems other than just the internal Unity animation system. For instance, it can be integrated with 2D sprite animations and from what I've seen, will work with Unity's new Mecanim animation system. Using the default builtin animations won't work with these systems unless you either bloat or confuse how you set your project up. Unfortunately, this does mean in order to use animations that have the same name is impossible and you'll need to rename them to be unique.

    Thanks Zozo,
    I hope this helps clarify a little bit,
    Nathan
     
  8. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    I don't understand is there a problem with the update? it is not yet shown at the Asset Store!!! Why? Generally the plugins are validated very fast
     
  9. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    +1
    Allthough I didnt had the intention to ask myself, but since you did.
     
  10. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi Zozo,

    The person who usually gets the emails is Eric, and he and Chad had an emergency this weekend, so I may get an update if there were some issues found with it today or tomorrow.
     
  11. SevenBits

    SevenBits

    Joined:
    Dec 26, 2011
    Posts:
    1,953
    Same for me. Also, what sort of path finding algorithms are used, and how efficient are they? I mean, what's the performance penalty of about 25 active units?
     
  12. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi SevenBits,

    The default pathfinding being used is Unity's internal system and we try and call out to it only when it's needed. If you want to use an external pathfinding system, such as the Astar Pathfinding Project (which has a nice free version), you can. So the truth is that I can't answer that question as we don't actually implement pathfinding ourselves. As for Unity's internal pathfinding the biggest performance hit that I've seen is in the obstacle avoidance system which limits me on a 2.7 GHz AMD to about 300 active units if I want to maintain 60 FPS, or 600 active units if I want to maintain 30 FPS.
     
  13. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I am interested in this but mainly to use it on mobile/ios and read that it should work there too.
    My question is, will it work also for 2d games like a top down or sidescroller?
     
  14. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    So the update gonna be released today or not :(?
     
  15. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    I start to feel weird..sorry
     
  16. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hey all, just a quick update. Somehow, we had included one of our development files into our submission package, so we may need to resubmit it. Sorry about the delay.
     
  17. dreadt9

    dreadt9

    Joined:
    Jan 13, 2012
    Posts:
    143
    Hey,
    I am using the Default Setup but when I try and use the Patrol AI it never makes it to the waypoint, it always loses track and goes for another waypoint 1/10 of the way between one... Is there way too fix this

    Yes I have the navigational grid thing setup, Please help


    Edit:
    Ok I fixed that problem, there is still one thing though, my ai runs really fast and when he makes turns he slides,
    how do I prevent the sliding?
     
    Last edited: Jul 29, 2012
  18. Wisit-Nik

    Wisit-Nik

    Joined:
    Jul 28, 2012
    Posts:
    12
    I think this AI cover all behavior for basically AI need but on Attack behavior like Melee and Range. User( me ) need more feature like Melee1, Melee2 then user can add percent chance to do which Melee, 1, 2. For this your AI will handle for The challenge Boss.

    Thank you and sorry for my poor English.
     
  19. Wisit-Nik

    Wisit-Nik

    Joined:
    Jul 28, 2012
    Posts:
    12
    you only need very increase turn speed.
     
  20. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi Wisit, with the upcoming release (which hopefully will be sooner than later) you'll be able to have as many of each state that you need along with a trigger that lets you go to other states randomly using weighted values. For example, 0.5 chance it'll go to attack 1 and 0.3 chance it'll go to attack 2 and 0.2 chance it will go to attack 3. Eric told me this weekend he was going to resubmit it this weekend, so hopefully it should be resubmitted already. :)
     
  21. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
  22. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Great info man hope to see the update online today evening . But please we need videos for the new features, are they under production or not yet?
     
  23. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Yes It is just online and looking great the advanced mode :) please when we can get a video of the new features?

    Thanks
     
  24. dabrow

    dabrow

    Joined:
    Nov 15, 2010
    Posts:
    22
    It looks great but please update docs, but first just tell us in short how to start.
    After importing all functionality to old setup is gone just getting "BaseTrigger could not be found". I don't have enough time now to look at it or look at scripts in folders.
    Should I just hook up scripts manually, or just start from scratch with AI Menu , oh AI in Component is gone ...
    (Have updated to Mountain Lion but this happened before too) will check folder structure later ..

    Cheers
     
  25. dabrow

    dabrow

    Joined:
    Nov 15, 2010
    Posts:
    22
    Ok , I had some time : I just delated old folders with AI, reimported again and old setup is working, AI menu in Components is back
    Can now easy find code in maps . I love it Walker-Boys !!
    Cheers
     
  26. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi Zozo,

    We're really excited that it's finally up. I'm not sure when we'll have the videos with the new features, but it shouldn't be more than a few days.
     
  27. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi dabrow, glad to hear you got it up and running again! :)
     
  28. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    I bought it this morning and loving it (great videos) two quick questions

    is their an easy way to have 2 launch points for ranged attack (I have a character with a rocket launcher on each shoulder), also I'm using Javascript (and FTP constructor kit) I'm trying get it the damage (from melee) I presume I need to edit exampleAttackComponetJS but dont understand the instructions

    // move the plugins folder to the asset folder then uncomment

    and get errors when I uncomment it
     
  29. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    I was using this to damage the player with FPS constructor , and want to us it from a melee attack

    var sendArray : Object[] = new Object[2];
    sendArray[0] = AttackingDamage;
    sendArray[1] = true;

    target.SendMessageUpwards("ApplyDamage", sendArray, SendMessageOptions.DontRequireReceiver);
     
  30. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi pinchmass,

    For your first question, you'll need to create an attack script based on our sample attack script we've provided in order to do the double rocket shot.

    For the second question, that may be a bug on our end we'll need to fix to get the Javascript working again. I'll try and get some time to check tonight.
     
  31. dreadt9

    dreadt9

    Joined:
    Jan 13, 2012
    Posts:
    143
    Still looking for help
     
  32. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    Cheers for info, regarding javascript can you confirm its a bug or am I doing something wrong
     
  33. Chuckalicious

    Chuckalicious

    Joined:
    Jul 28, 2012
    Posts:
    51
    Mr. Walker

    I like all you have offered the community over the years and this is no exception I'm sure. I do have a question though. I recently started messing around with Aron Granberg's AStar pathfinding project see: http://forum.unity3d.com/threads/14...lementation-Examples?highlight=AI+pathfinding

    His is a very nice project, configurable, extendable and it's free! Have you done a comparison between what you offer and what can be acquired for no cost? Aron does offer a pro version for about $100 too. I would be curious to learn the Pros/Cons for each of these possible solutions.
     
  34. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    This is not a pathfinding solution. It's an AI FSM solution that uses pathfinding.
     
  35. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    is anyone else using Javascript I'm having problems with exampleAttackComponetJS and not sure if its a bug (trying to send a damage message and receive a hit).

    any help ?
     
  36. Chuckalicious

    Chuckalicious

    Joined:
    Jul 28, 2012
    Posts:
    51
    Ah ok, that is a huge difference then. Thank you for clarifying. I know Aron incorporates some FSM patterns into the project to get and manage certain AI behaviors. It will be nice to check this system out and compare. I must say it looks clean, well documented and simple enough to implement. I'm not really surprised though considering the source. Thanks!
     
  37. Vermz

    Vermz

    Joined:
    Jun 5, 2012
    Posts:
    7
    Speaking of FSM's. Will this ever be integrated or have action / event nodes created for Playmaker or uScript? Just curious :)
     
  38. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
  39. NathanWarden_old

    NathanWarden_old

    Joined:
    Oct 4, 2005
    Posts:
    37
    Hi Xander, those errors mean that you have the old version still in there. We rearranged the file and folder structure a little bit this version. So, you'll need to delete the old files... namely, you probably have two AIBehaviors files and maybe some other duplicates as well.
     
  40. Xander-Davis

    Xander-Davis

    Joined:
    Apr 23, 2011
    Posts:
    441
    That did the trick! Thanks! :D
     
  41. kcirdnehnosaj

    kcirdnehnosaj

    Joined:
    Jul 30, 2012
    Posts:
    5
    Hi, I Setup my Character with the free Astar pathfinding, and I set up waypoints in the level at runtime; all works good. The AI rotates and follows the waypoints like it should. The problem I'm having is getting the AI to rotate toward my player. I have the AI start in patrol state and then within a distance he changes to a Attack State, that works, but does not rotate to my player. I followed the 2 videos for implementing the free A* pathfinding. Hope someone can help.
     
  42. kcirdnehnosaj

    kcirdnehnosaj

    Joined:
    Jul 30, 2012
    Posts:
    5
    I fixed it. In AIBehaviors script, In the RotateAgent method, I just had to disable the check for isNaveAgent, since I'm using the character controller. So simple ;) Now everything works great!
     
  43. PabloXl5

    PabloXl5

    Joined:
    Feb 16, 2012
    Posts:
    4
    I just recently purchased this and I seem to be having a problem getting my Navigation tab to show. It appears in the window pull down menu but it's greyed out. I'm unable to make a NavMesh which is causing a problem with roaming enemies and patrol points. Any idea why this is happening? I have the free version of Unity, do I need pro to be able to use this? Any help is greatly appreciated.
     
  44. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you likely don't own Unity Pro
    Unity navigation is a pro only feature.

    Check earlier in the thread on how to integrate Aron Granbergs A* path finding for example if you are a non-Pro user
     
  45. PabloXl5

    PabloXl5

    Joined:
    Feb 16, 2012
    Posts:
    4
    Shoot, that's what I was worried about, I'll check out the path finding examples. Thanks for the help!
     
  46. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    Should the animation crossfade I'm getting a bit of a glitch when my character is hit and changes back to a different state, also I have set movement to 0 for the get hit state, (presuming it would stop moving (from seeking) while playing the hit animation) but it keeps on moving (while the animation plays).

    Also is it possible using the weighting to pick just the animation, I'v used it to change to a different state to play a different animation

    few requests it would be nice to have a Destroy object tick box for the dead state (and maybe a timer before destroyed) and be able to add multiple sound in an array and play one at random (rather than just the one for that state.

    Fantastic pack though given me some many more option well worth the money
     
  47. dreadt9

    dreadt9

    Joined:
    Jan 13, 2012
    Posts:
    143
    Can you also make a trigger for when it isn't been seen by the player view? Or is there some way alreadyI can do this, Thanks
     
  48. nuverian

    nuverian

    Joined:
    Oct 3, 2011
    Posts:
    2,087
    so it there any documentation and howto for the new features before I decide to commit?
     
  49. zappapa

    zappapa

    Joined:
    Dec 12, 2010
    Posts:
    57
    +1
     
  50. mohydineName

    mohydineName

    Joined:
    Aug 30, 2009
    Posts:
    301
    Hi,

    I am looking for an AI solution and would like to evaluate your packages vesus the features I need. Can you answer what is possible, not possible, hard to do with your package?
    Basically, I d like the same behavior as the tanks in Tank Hero.
    I'd summarize as follows:
    -Enemies are long range shooters primarily
    -Some enemies are close range attackers
    -NPC are able to patrol along multiple waypoints,
    -NPC Avoid obstacles
    -NPC Avoid shoots from players/enemies (would be awesome!)
    -Enemies follow players until player is out of reach/sight then come back to waypoints
    -Priority based attacks (eg some units are more important to kill than others)

    No need to be deterministic, I love the random AIs
    No need to handle Unity's Animation system, I prefer to make my own.
    No need to handle non moving units, I do them on my own

    I am probably missing a few points but that is the idea.

    Thanks

    Stephane