Search Unity

RAIN{one}- Artificial Intelligence Engine-RELEASED

Discussion in 'Assets and Asset Store' started by RT_Jester, Jul 23, 2011.

  1. kodagames

    kodagames

    Joined:
    Jul 8, 2009
    Posts:
    495
    My first Bump :) and it's for thelastprogrammer ;)

    I'm seriously interested in Rain{one} it looks promising.
     
  2. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  3. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Everyone,

    We are amazed by all the excellent work being done using RAIN{one}, so we're holding a contest!

    All you have to do is:

    1: Make a short video showing off your project using RAIN{one}'s features.

    Be creative, remember-- this is just a video showing off all the cool stuff you're already doing. :)

    2: Upload the video to Youtube and tweet us the link @RAINai_Dev on Twitter or /RivalTheory on Facebook (don't forget to like us!).

    3: Send the video media@rivaltheory.com with a short description.

    That's it! If we showcase your video we will send you $100 and a cyber high-five! Not bad for less than 30 mins of work, right?!

    **IMPORTANT** The contest deadline is Friday, January 13th. Winners will be announced shortly after.
     
  4. lastprogrammer

    lastprogrammer

    Joined:
    Apr 30, 2011
    Posts:
    153
    So I'm still having trouble understanding how to use the Action Context variables and the behavior tree.

    What would happen is I would create a variable named enemyHealth like this in the Activation Manager script:

    Code (csharp):
    1. actor.actionContext.AddContextItem<int>("Health", anger);
    But then in the behavior tree I would create an Assign Node, and write in this:
    Code (csharp):
    1. Health = 90
    What would happen is Health would turn to zero when I would access the variable with an Action Node:

    Code (csharp):
    1. Debug.Log("Action Context: " + agent.actionContext.GetContextItem<int>("Health"));
    So what am I doing wrong? How does the Assign Node really work and how can I get these variables to show up in the behavior tree?

    Thanks.
     
  5. siflandolly

    siflandolly

    Joined:
    May 17, 2011
    Posts:
    141
    In order to interact with a variable in the Behavior Tree, it has to be float type. And in your BT you would then be able to do

    < assign expression="Health = 90" />

     
    Last edited: Jan 2, 2012
  6. lastprogrammer

    lastprogrammer

    Joined:
    Apr 30, 2011
    Posts:
    153
    Yes, thank you. That works great now. So float numbers are what works. Do you know much about how to use the Goals? Basically it seems that I give the behavior tree certain goals then it seeks to satisfy those goals through the tasks. But I don't see how this actually works.
     
  7. siflandolly

    siflandolly

    Joined:
    May 17, 2011
    Posts:
    141
    Yea it confused me too. You can use types other than float but you have to use float if you want to interact with it in the BT like when you use assign or condition.

    There's a lot of information if you dig through the RAIN forums about goals. And you'll probably get a faster response if you post on RAIN's forums:

    http://support.rivaltheory.com/forums



     
  8. lastprogrammer

    lastprogrammer

    Joined:
    Apr 30, 2011
    Posts:
    153
    Yeah, I dug through the forums again and found the posts by you about the Goal Oriented Behaviors. Those posts clarified the ideas behind insistence and utility, and even about personality traits.

    But I need just one more thing, when I write out an insistence expression, it seems that Rain One is always going to try and raise a variable to it's maximum and do the task that best does this. Is this the right way to see it?

    Rain One sees positive values in variables as the best way, and chooses the task that will best bring the variable to it's maximum. As opposed to trying to bring a value to it's minimum.
     
  9. siflandolly

    siflandolly

    Joined:
    May 17, 2011
    Posts:
    141
  10. lastprogrammer

    lastprogrammer

    Joined:
    Apr 30, 2011
    Posts:
    153
    Does the competition end tonight or tomorrow night? I'm trying to make the AI as fast as I can.
     
  11. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Tomorrow night! Thanks for asking.
     
  12. lastprogrammer

    lastprogrammer

    Joined:
    Apr 30, 2011
    Posts:
    153
  13. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    @thelastprogrammer Thanks for the submission! We are taking a look at your videos today.

    Thanks again!

    Jester
     
  14. Halcyon2518

    Halcyon2518

    Joined:
    Jun 20, 2011
    Posts:
    49
    Hello, folks. I'm highly impressed just after watching the tutorial videos at how extensive and robust this AI solution appears to be. I'm currently using SimplePath, and while I acknowledge the skill of its author, the needs of my project are specific and SimplePath doesn't fulfill all of them. I'm willing to purchase RAIN{one} and restructure my project, depending on one critical issue.

    I understand RAIN{one} provides obstacle avoidance, but what about agent avoidance? I'm building a top-down shooter, and the level can get a little crowded with so many enemies chasing the player. Will agents avoid each other en route to the player? If so, what would happen if the player is surrounded by melee enemies, leaving no room for other agents to maneuver? Would pathfinding be suspended until a path opens?

    I have a demo available on YouTube, and I think this problem is most obvious starting at around the 5:39 mark. The gameplay is outdated, but the basic premise holds - lots of little guys running around trying to gib the player. I need them to be able to spread out and collide with each other, which isn't possible without agent avoidance.
     
  15. milali

    milali

    Joined:
    Nov 1, 2011
    Posts:
    16
    I have contacted you directly for support as having nothing exposed makes it quite difficult to work out how it works.

    also I cannot ascertain how to debug things to work out what my bahavior tree is doing, Behaves trees at least had a nice visual interface so you knew where they were up to.
     
  16. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello everyone!

    One of our users @Siflandoly has created a great code sample resource including a few behavior tree samples. Please thank him for the hard work!

    Videos: http://www.youtube.com/watch?v=8xBXiPNnBv0&feature=player_embedded
    http://www.youtube.com/watch?v=sxcfYdm7Wbs&feature=player_embedded

    Code Samples: https://www.evernote.com/shard/s80/...038b73f7a860/c4c934f070c6f269b5735c76bf7b99b9

    Thanks again Siflandoly, I hope your work gives some users the head-start they need.

    Link to the thread: http://support.rivaltheory.com/forums#/discussion/216/some-ai-code-i-am-working-on

    Jester
     
  17. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello! Quick announcement,

    You have the opportunity to feature your game using RAIN{one} on a broadcasting demo reel at GDC 12! Email me jester@rivaltheory.com to secure your limited spot.

    ASAP spots are filling up quickly!

    -Jester
     
  18. why789

    why789

    Joined:
    Sep 23, 2011
    Posts:
    184
    Hello,

    I have a question, is it possible to only use part of this AI system however implement it manually in others?
    Say for example I want to use the pathfinding of Rain{One} only, but I want to deal with all other AI manually. Example: I tell the AI when it calculates a path and all I would need to do to get that path is call a function that will calculate that path to an object's vector3 or transform based on the Recasted NavMesh. Than I would manually have it move along that path. Is that possible? Or would I have to use the whole AI suite to accomplish this. If it is possible how practical will it be? Will I have to jump through 20 hoops to get to the final path and be able to use it? or is there a simple way to get access to a generated path?

    See, I'm doing this project for mostly experience, so I want to do MOST of the programming by myself. I have no desire to learn Pathfinding Algorithms, which is the reason why I want to know if I can JUST use the Pathfinding in this wonderful Asset Package whilst I program all of the other AI for experience reasons.

    Also, maybe I'm doing something wrong, but while I'm testing this on a friend's copy to make sure it can do what I need before I buy it, I recast a scene and in the span view it shows it all good. However once I set the PathManager to use that Recasted mesh and I set the transform of a destination the Agent just tries to walk through the wall to get there... When I show the span mesh the walls are completely white on the sides so I know it is recasting it properly. I'm also setting the name the same... BTW, All of the above I just did via the GUI.

    Also posted this question on your website, in case this isn't the right place....

    Thank you for your time and I hope there is some way for me to only use certain parts of this and not everything!
    why789
     
  19. duke

    duke

    Joined:
    Jan 10, 2007
    Posts:
    763
    Does this do anything for GTA-style traffic simulation?
     
  20. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    The short answer is yes, you are free to only use those parts of RAIN that you want. Although it works well as an integrated system, it was built as a set of components that can be used somewhat independently.

    Our API docs on our support site are the best way to get started. Most of the publicly available methods are shown there (although I just checked and it needs to be refreshed for the very latest version.)

    Here's an example of how to use pathfinding:

    http://pastebin.com/buZvjKUv


     
  21. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    @Halcyon2518 here are some answers.

    I understand RAIN{one} provides obstacle avoidance, but what about agent avoidance?

    RAIN currently supports obstacle avoidance but not agent avoidance. We do have agent avoidance working in a new version that we'll be publishing to the store soon.

    Will agents avoid each other en route to the player?

    The upcoming agent avoidance support should handle this.

    If so, what would happen if the player is surrounded by melee enemies, leaving no room for other agents to maneuver? Would pathfinding be suspended until a path opens?

    Pathfinding wouldn't be suspended, but you could use agent avoidance to, at least, prevent them from running into each other. Beyond that, you could probably find a way to detect when this situation comes up and react to it differently. Obstacle/agent avoidance isn't designed to handle crowd issues, just to let AI avoid the next thing they're about the run in to.

    Let me know if you have any other questions. I will also send this message to you via DM on the forums.

    Best,

    Nick

     
  22. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    I'm wondering how well this solution would work for chase behaviour in a 2D (effectively 2.5D, I guess) platformer.
    My NPC's are rigidbodies and I want their steering behavior to be simulated button presses (in other words, they have a controller script just like the player, and the steerer just sends variables to the controller script). Is this possible with Rain {One}?

    Also wondering how hard it is to implement accurate jumping. In other words, is it possible to teach the AI how high and far it can jump, so it will only attempt to jump between platforms if it knows it can make it based on its current velocity etc?

    If the goal is several platforms above, will the AI know to jump between several navmeshes to get up there?
     
  23. TianWolf

    TianWolf

    Joined:
    Aug 20, 2011
    Posts:
    161
    We need this information as well.
     
  24. TianWolf

    TianWolf

    Joined:
    Aug 20, 2011
    Posts:
    161
    We need this information as well.
     
  25. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    I bought Rain{One} a few days ago. Here's my experience as a customer so far.

    Had a significant number of show-stopping or nearly-show-stopping bugs in the first day. I have to give them serious props for responding quickly and effectively to these issues via email. They're now all seemingly fixed (they sent me beta builds) and it's very stable. Annoying that I had to go through that (certainly other people would have been having similar issues!) but great response there.

    The product itself I'm still not sure on. It seems designed for a very particular idea in mind and basically nothing else. If you're doing something other than navigating a single-level XZ terrain in a 3D environment, you'll probably run into issues.

    There are also features that just plain seem to not work at the moment (Max Acceleration has seemingly no effect, Obstacle Avoidance also has zero effect at all). I'm hoping these are "operator error" issues on my part, or that they will be addressed quickly as well, but it seems like I've tried everything logical, and it's all adding to the frustration of getting things up and running.

    The ironic thing about Rain{One} is that the design of the product seems *completely* contrary to their design goals. I was reading through Rival's news/blog and found these lovely little nuggets:

    I'm sad to say that Rain{One} is all about tweaking the 'knobs' and will only really do one thing unless you spend significant time delving into their API - and parts of it you can't at all (more on that later).

    The documentation is the main failing of the product for sure. The user manual very briefly describes the built-in settings but not in enough detail that you know if you're setting them up properly or not (and often, things just don't seem to respond the logical way it seems they should). There are no example projects, the tutorial videos are extremely basic and don't even show a working end result. These are all things that, looking through their forums, people have apparently been asking for for the better part of a year or so, with lots of promises in return. Add to that, there are no ideas or instructions on possibilities of usage outside of the "3D FPS enemy AI on terrain" scenario.

    That leads me to my next major gripe. The product is locked down hard and it seems like every decision they make is one predicated on being paranoid of IP theft or something. This is to the serious detriment of the customers. One cannot even access the script code for the movement controllers (or any other part of the product). There are no instructions or API references on how one might use a movement controller other than the supplied ones (for example, it is seemingly impossible right now to cause movement with physical forces, making it rather useless on a large range of game types).


    It's been a very frustrating few days. That said, it *has* only been a few days. I'll give it a couple more and see how things play out, but I'll likely end up not using it. The product promises so much but puts up a wall between you and it. Haven't had an experience where the product is so hostile to the user from anything else in the Asset Store. That said, the support team so far has definitely *not* been hostile - quite helpful, within the means of the product, which seems more limited-yet-complicated all the time.

    Great website design and marketing, made by smart people. Not sure if the product design is all it was intended to be.
     
    Last edited: Mar 11, 2012
  26. Prime

    Prime

    Joined:
    Jul 22, 2011
    Posts:
    39
    Educating our customers on how to use the product effectively has been a significant challenge for us. RAIN is a pretty great system and is capable of supporting some really great projects. One of our jobs going forward is to find a way to better assist our users, especially through improved tutorials and demos. We've got a new version of the bootcamp demo that we can make available - it serves as an example of how to build a pretty complete setup with RAIN. Just email us at support@rivaltheory.com if you want access. For those wondering why we can't just post it publicly - it is because the sample contains the product, and it wouldn't be fair to our paying customers to just post that out for everyone to grab.

    Generally, we're available to help and explain RAIN and how to use it. Anyone having trouble should contact us directly, whether the question is one of problems/support or just "how do I accomplish X?" That's especially helpful if you have questions about the documentation. (Please note we have two pieces of documentation, not one. The beginners guide is a quick walkthrough. The User's Manual goes through every setting. Neither is a "tutorial".)

    As always, we're here to help you make games. We're doing our best to help, and will keep trying to get better at it.

    - prime
     
  27. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hey @duke I just noticed that you didn't get an answer to this. Let me take care of it: RAIN doesn't globally simulate traffic systems, but is more than capable of handling individual vehicle behavior as well as movement control.

    Let me know if you have any other questions.
     
  28. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    There are so many examples of exactly this on your forums, where a customer asks how to do something, and an employee responds with "hmm, good point, let me figure that all out and write something up and I'll post it back here." And that will be the final post in the thread, many months old. Not one example of this, but many. And several of them are issues or questions that I've also had myself and would have really appreciated if the answer was there as promised.

    I was referring the to manual. It does go through every setting, but only gives a very, very general idea of what the setting does, not details on how the setting reacts to others etc.

    I was referring to your tutorial videos.

    I don't mean at all to be rude. You seem like intelligent, good guys and I appreciate the support so far. I'm just frustrated trying to work with RAIN, and would very much like to be (and am open to being) not frustrated any more.

    I don't necessarily think that it is currently all it's advertised as being, that's all.

    I haven't asked for a refund yet because I'm still hopeful that I can learn it better and your team can help fix the software issues, as well as guide me through my own issues with understanding it. That's something! And I really appreciated the response of being open to refunds if it doesn't work out for me.
     
    Last edited: Mar 14, 2012
  29. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    I'm in total agreement with dasbin and can understand the frustration, as such that a wide assortment of canned demo's might ease our transition into RAIN

    The last bootcamp demo i received did in fact help in understanding although has this changed since January?

    In the bootcamp demo i would have liked to seen behavior between two entities that reach navmesh waypoint, have random idle and fire on each other.
     
    Last edited: Mar 14, 2012
  30. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    @runner I have put in a request to have multiple AI interacting with one another added to the sample project. I think that will add a needed element in the learning process of RAIN{one}. It will be an FPS-style project, but certainly elements of the project can be applied in numerous places. I will post here when it's ready.

    @Dasbin we have personally answered some of your questions so I will post them here.

    1. Your comment about Max Acceleration not working. Max Acceleration doesn't affect normal RAIN movement because it uses instantaneous velocity, not acceleration. The Max Acceleration value is only used when dealing with steering behaviors directly. If you use acceleration based steering behaviors for movement, then it applies. This may confusing to have in the main UI. We'll consider moving it to make it more intuitive.

    2. Your comment about obstacle avoidance not working. We took a look at the obstacle avoidance project and found that there was a playmaker script affecting the movement of one of the AI. That script was interfering with what obstacle avoidance was trying to do. When he disabled that script and set up a scenario where the AI's paths would cross he found avoidance to be working just fine.

    Here's some more detail about what we did:

    - You need to make their obstacle avoidance colliders a bit bigger to give them time to react. (I set it to radius 4)
    - You need to slow down the AI. I set speed to 1 for just testing.
    - When I made those two changes, obstacle avoidance was obviously working.

    3. We will get back to you for making a custom movement controller.

    Thanks for your questions and feedback. Let me know if anyone has any other questions!

    -Jester
     
  31. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Here is what one of our users, JHarger, did to make a custom movement controller for their game "Longshot"

    "So this may not be exactly what you're looking for, but here's what we did for Longshot. There's another class called ShipController which handles the actual movement... basically from the PlayerController, it passes values from input in the same way that this controller does. (SendMessage is optional... that was just convenient for us, you can easily just store a reference to your main controller as well)

    The scheme I came up with was to use the Kinematic's velocity as a sort of "desired" velocity. That way I can rescale it and apply it as a force instead of a direct velocity.

    public class RAINShipController : AvatarController {
    public override void UpdateFromAvatar (Agent agent, float deltaTime)
    {
    agent.Kinematic.Position = transform.position;
    agent.Kinematic.Orientation = transform.rotation.eulerAngles;
    agent.Kinematic.Velocity = rigidbody.velocity;
    agent.Kinematic.Rotation = rigidbody.angularVelocity;
    }

    public override void CalculatePhysics (Agent agent, float deltaTime)
    {
    agent.Kinematic.Update(deltaTime);
    }

    public override void ApplyPhysicsToAvatar (Agent agent, float deltaTime)
    {
    Vector3 force = agent.Kinematic.Velocity;
    float maxForce = agent.Kinematic.MaxSpeed;
    float maxTorque = agent.Kinematic.MaxRotationRate;

    float forward = Vector3.Dot(transform.forward, force) / maxForce;
    SendMessage("SetForwardMovement", forward);

    float strafe = Vector3.Dot(transform.right, force) / maxForce;
    SendMessage("SetStrafeMovement", strafe);

    float turn = Mathf.Clamp(agent.Kinematic.Rotation.y / maxTorque * 2f, -1f, 1f);
    SendMessage("SetTurnMovement", turn);
    }

    }


    Now there is a little bit of translation here, since we have two main movement controls (move forward/back and side-to-side), we project the Kinematic's desired velocity to the axis we wanted, and then call SetForwardMovement or SetStrafeMovement.

    Hopefully that can get you pointed in the right direction."
     
  32. runner

    runner

    Joined:
    Jul 10, 2010
    Posts:
    865
    is there a E.T.A. on this ? I'm rather looking forward to getting this in my hands.
     
    Last edited: Apr 3, 2012
  33. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    @Runner we are putting together a sandbox level that will show more than one type of interaction. I will open up this forum to requests for what types of interaction you all feel would be most beneficial.

    What do you think?
     
  34. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello RAIN{one} Community!

    RAIN{one} v1.1.4 (compatible with Unity 3.5) is now available.

    We have another announcement for you.

    We are dedicating a space on our website for studios, of any size, to show off their work. It's called "Studio Showcase". So if you're using RAIN{one} in a project and would like for us to promote it, send an email to jester@rivaltheory.com to get started.

    RAIN{one} v1.1.4 is live, check it out: http://u3d.as/content/rival-theory-/rain-one-/22D

    RELEASE NOTES:

    1.1.4 Patch notes:
    --------------
    -Unity 3.5 compatible

    -Improved stability of release, especially on some MacOSX Lion machines
    -Fixed simple mind setup to automatically attach simple mind script
    -Fixed behavior tree setup to automatically attach activation manager script
    -Fixes to behavior tree textures - now embedded
    -Changed MoveLookTarget - no longer a ScriptableObject, so use "new" instead of "CreateInstance"
    -Moved RAIN out of the component menu and back into its own outer menu. Component menu was causing serious problems
    -Fixed issues with reloading path graphs in PathManager ReInit, InitializeMovement
    -PathManager property now public from Agent
    -Misc. Recast fixes
    -Pathfollowing speed upgrades
    -Fixed bug in parallel branch fail/succeed/tiebreaker
    -Obstacle avoidance fixes/upgrades - visualization now available


    Talk to you all soon!

    -Rival{Theory} Team
     
  35. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    I'm trying to understand RAIN's BT, so writing various BT and testing it in these days.

    Here's simple BT for a mob for my own.

    The following is what it does:

    1. It starts with idle state which do idle animation.
    2. If a mob detect a player, it runs specified animation, fightmode once.
    3. Then it moves to target player.
    4. If the distance is enough to attack, it starts to attack the player.
    5. If the player is out of sight which means fail to detect, it stops to attack and do idle.

    ** A cylinder at the image of the bottom is a player.

    Code (csharp):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <behaviortree name="Boss288BehaviorTree" repeatuntil="">
    4.   <variable name="distanceToTarget" initialvalue="0" />
    5.   <variable name="closeEnough" initialvalue="8" />
    6.   <selector name="root" repeatuntil="">
    7.     <sequencer name="Idle State" repeatuntil="">
    8.       <condition name="condition" repeatuntil="" expression="foundplayer==0" />
    9.       <parallel name="parallel" repeatuntil="failure" fail="any" succeed="all" tiebreaker="fail">
    10.         <sequencer name="Detect" repeatuntil="">
    11.           <detect name="detect player" repeatuntil="" aspect="player" variable="target" />
    12.           <assign name="found player" repeatuntil="" expression="foundplayer=1" min="0" max="1" />
    13.         </sequencer>
    14.         <condition name="condition" repeatuntil="failure" expression="foundplayer==0" />
    15.         <sequencer name="Idle" repeatuntil="running">
    16.           <animate name="Idle" repeatuntil="" animation="Idle" waitforsec="1" />
    17.         </sequencer>
    18.       </parallel>
    19.     </sequencer>
    20.     <sequencer name="Prepare Fighting" repeatuntil="">
    21.       <condition name="runonce" repeatuntil="" expression="fightmode == 0" />
    22.       <move name="face to player" repeatuntil="" looktarget="target" lookspeed="360" animationbasespeed="0" />
    23.       <animate name="animate Fightmode" repeatuntil="" animation="Fightmode" waitforsec="1" />
    24.       <assign name="done preparing fight" repeatuntil="" expression="fightmode = 1" min="-3.402823E+38" max="3.402823E+38" />
    25.     </sequencer>
    26.     <parallel name="Chase and Attack" repeatuntil="" fail="all" succeed="any" tiebreaker="fail">
    27.       <action name="CheckDistance" repeatuntil="" classname="CheckDistance" />
    28.       <sequencer name="Detect target" repeatuntil="">
    29.         <detect name="detect player" repeatuntil="" aspect="player" variable="target" />
    30.         <assign name="found player = 1" repeatuntil="" expression="foundplayer = 1" min="0" max="1" />
    31.       </sequencer>
    32.       <selector name="Move or Attack" repeatuntil="">
    33.         <sequencer name="Move to Target" repeatuntil="">
    34.           <condition name="found player" repeatuntil="" expression="foundplayer ==1" />
    35.           <condition name="still far from the target?" repeatuntil="" expression="closeEnough <= distanceToTarget" />
    36.           <move name="Move to target" repeatuntil="" movetarget="target" movespeed="4" animation="Run" animationbasespeed="0" />
    37.         </sequencer>
    38.         <sequencer name="Attack" repeatuntil="">
    39.           <condition name="found player" repeatuntil="" expression="foundplayer ==1" />
    40.           <condition name="enough close to the target?" repeatuntil="" expression="closeEnough >= distanceToTarget" />
    41.           <move name="face to player" repeatuntil="" looktarget="target" lookspeed="360" animationbasespeed="0" />
    42.           <animate name="Attack" repeatuntil="" animation="Attack" waitforsec="1" />
    43.         </sequencer>
    44.       </selector>
    45.       <assign name="reset foundplayer" repeatuntil="" expression="foundplayer = 0" min="-3.402823E+38" max="3.402823E+38" />
    46.     </parallel>
    47.   </selector>
    48. </behaviortree>
    49.  
    CheckDistace is a custom action and it can be available at Cygnus Project site. See the following link:

    http://www.cygnusprojects.com/index...g-intelligence-to-locomotion-driven-characte/

    By the way, I have a question.

    The mob has several attack animation clips and I wan to do that animation one by one (or execute by any conditions)

    I wonder it can be easily done within BehaviorTree editor without writing any custom action.

    All my trivial did not work as expected.

    And any suggestions for the above BT are welcome.


    Thank you.

    -Kim
     

    Attached Files:

  36. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Everyone!

    We have received a lot of requests regarding how to write a custom action in our behavior trees. So we decided to open up the source code on our primitive actions to give you all a good idea on how to do it yourself.

    Enjoy! And as always, if you have any questions or comments, email me Jester@rivaltheory.com

    Primitives Source Code:

    http://support.rivaltheory.com/codesamples
     
  37. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    @Kimsama When say you want to play multiple attack animations, do you mean in the same order every time? From what it sounds like, this can be achieved with a behavior tree, but I will need more details to give a more complete answer.
     
  38. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166

    Thank you for your proceeding.

    First, see the attached image what I've tried before.

    As you can see, I put two attack action under the selector node to make it can be executed in turn depend on the condition node.

    As it is shown on the attached image, the first sequence node under the selector node executes Attak0 and attack variable is assigned to 1 then next time the BT visits, the selector node choose the next sequence node which executes Attack1.

    Question>

    Why 'attack=1' next to 'Animation Attack0' is not executed even the 'debug attack0' node to put debug message leaves no message on the console.

    Any node next to the Animation primitive node is never executed even the node is being under sequence node.

    What did I wrong for that?


    Thank you.

    -Kim
     

    Attached Files:

  39. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    In case you are debating which company to give your hard earned money to for an AI system I would suggest NOT giving it to RAIN based on my experience.

    The product might well be the most amazing AI on Unity, I wouldn't know as I still cannot get it to work and have had enough of Nick in support telling me he will help only to do nothing.
    I have bought a few things from the Store, some for a lot of money, some for a little. RAIN support has been the worse by far, intact I don't think its fair to continue calling it support.

    Not the sort of warm feeling you want from a company if you are planning on making the features of their product central to the core of your game.
     
  40. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Simon,

    I understand where you are coming from. My developer just handed me a build that he had been working on since I brought your issue to his attention a few days ago. Attached is a custom build developed in an attempt to solve your issue.

    Let me know how it works for you. I also read your forum post and found the content passionate and angry. I hope to change your opinion of our company and software in the future.

    Please accept my apologies that our support and software did not meet your expectations. Check your email for additional information.

    I look forward to your feedback for the new build.

    Best,

    Nick
     
  41. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Here is a walk through on how to create a custom sensor from a RAIN{one} user Philo:

    "Not really sure this counts as showing off but thanks to the Rival Theory guys I've made a mesh sensor which can be used instead of a box / expanding box / sphere sensor. In my case, I use this for a vision cone.

    You can see the code and a quick tutorial here:

    http://www.iphil.co.uk/index.php/2012/05/unity3d-rainone-vision-through-a-collision-mesh/

    (sorry, about the font sizes etc, I haven't really finished re-making my blog yet so it's a bit messy in places!)"

    Thanks so much for sharing all your hard work!

    -Rival{Theory} Team
     
  42. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Just a quick note to say that Nick has been working with me to sort out my problems.
    Any issue I had seems to be okay at the moment.
     
  43. gl33mer

    gl33mer

    Joined:
    May 24, 2010
    Posts:
    280

    Try this link instead. http://www.iphil.co.uk/index.php/unity3d-rainone-vision-through-a-collision-mesh/
     
  44. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
  45. Likos1

    Likos1

    Joined:
    Aug 12, 2012
    Posts:
    14
    I will most likely buy this as soon as I can. I have a single question, though. I want the AI to only be able to see a certain distance and for the AI to alert other AI so they can chase what they have seen? Any chance for that?
     
  46. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Hello Community!

    Here are the latest patch notes for v1.2. Please read them carefully! There have been a number of significant changes and upgrades to 1.2.0 from the prior 1.1.4 build. Please note that if you run into any trouble upgrading a prior RAIN project, you may be able to fix any problems by going to the RAIN->Help menu and choosing the “Rebind RAIN Components” option. We advise you to make a copy of your project before upgrading.

    Let me know if you have any questions!! jester@rivaltheory.com

    LINK TO PATCH NOTES: http://support.rivaltheory.com/documentation/release-notes
    LINK TO DOWNLOAD: http://u3d.as/content/rival-theory-/rain-one-/22D

    Thanks!
    -Jester
     
  47. RT_Jester

    RT_Jester

    Joined:
    Jul 21, 2011
    Posts:
    368
    Yes that is completely possible, I can go into greater detail on some suggestions on execution. Email me at jester@rivaltheory.com.

    V1.2 is now live so it's the newest version.

    Best,

    Jester
     
  48. mrbdrm

    mrbdrm

    Joined:
    Mar 22, 2009
    Posts:
    510
    Great Job guys
    keep it up :)
    my wish list :
    1-more tutorials
    2-better looking behavior tree (i found it really hard to undertand)
    you guys have the best full AI solution available to unity, and im a proud owner of your system.
     
  49. Likos1

    Likos1

    Joined:
    Aug 12, 2012
    Posts:
    14
    I once remember on your website you had a free version coming out soon. Did that come with all the feautures or only certain ones? Which ones will it come with?
     
  50. Likos1

    Likos1

    Joined:
    Aug 12, 2012
    Posts:
    14
    Also, Is it possible to use Rain One to spawn AI? I am trying to get the AI to randomly spawn in a certain area.
     
unityunity