Announcement

Collapse
No announcement yet.

[UPDATED 5/16] A.I. Templates - Bot, Car, & +Flying AI

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Originally posted by Mathis View Post
    Hi Peter ! First of all thank you for this awesome suite of tutorials, this is just awesome !

    I did your tutorial using UE 4.4 and it seems that the behavior tree isn't working fine.

    This issue is the following, on your tutorial I only use the "Move to point" part, I only need for my project to have a pawn walk to different point ( so I only use the left part of the tree ).

    Thing is after the first way point, when my pawn arrives, he doesn't update the route and he seems stuck on the first one, switching to an idle position.

    Would you have any idea about it ? I do have the Decoration to update the route.

    Thank you again and when this bug is resolved I'll translate all of this in C++
    Thank you thank you Mathis, much appreciated. One possible problem is the way point isn't near the ground so it can't project the location on the navmesh properly. If it finds the first one, it should find the next one.

    Originally posted by iGoogle View Post
    @SilentX`: plz reupload images in i.imgur.com(with https) or attached it here. all images are down. plz dont use dropbox link

    Error (509)
    This account's public links are generating too much traffic and have been temporarily disabled!
    I know! Its been a real mess. Will do!

    Originally posted by Bireysel View Post
    Hi Peter.
    I am trying to replicate your CAR AI project in UE version 4.4.3. First I tried to copy the structure of the project but it did not work (I think I have missed something there) . When I try to open your project in v 4.3.1 it runs smoothly. But Can not open it in v 4.4.3 nor can I replicate the project in 4.4.3. Is there a guide line for CAR AI project so I can use in 4.4.3 and future releases.
    Thank you.
    Interesting. I will have to release a new update soon, but I'm currently in limbo so it been hard to create in general. I do have an updated version of the CAR AI with more advanced measures taken. This car will feature new avoidance measure I attempted and failed, and other examples I'm sure others can learn from. I will make sure to post them as soon as I can properly do so!


    -----------------


    Hey guys, thanks again for all the support! I'm currently working on a lot of things IRL, so it has been taken its toll creatively. I'm still very much working in UE4 but don't have time to post as often. Will make sure to give you guys an update once I'm settled in the new place.

    Peace

    Comment


      #47
      Hey SilentX ! Thank you for your answer I'm sorry I just saw you replied.

      Originally posted by SilentX` View Post
      Thank you thank you Mathis, much appreciated. One possible problem is the way point isn't near the ground so it can't project the location on the navmesh properly. If it finds the first one, it should find the next one.
      Peace
      Well it actually stop after finding the first WayPoint, thing is it is really cool because it follows the path using the navmesh, but when it arrives on the WayPoint, the pawn goes on IDLE and on the graph you can see it goes through every nodes.

      In the blueprints it seems to be stuck in the For Each loop.

      I'm currently in my office so I can't provide any screenshots yet, I'll do as soon as I get home tonight.

      And once again, Thank you SilentX !

      Comment


        #48
        Hello Peter. First off, thanks for the tutorials. Behavior Trees escaped my realm of knowledge before and I just did everything in C++. This is much easier to debug.

        One thing that confuses me though is when finished is relevant. It seems to be causing a problem in my game. I have a section in my BTS_DetectEnemy that essentially says, if enemy is no longer valid (ie everyone is now dead) go back to the move state. However, this never happens and it just kind of sticks in the attack state.
        Click image for larger version

Name:	khuDhgj.png
Views:	1
Size:	47.4 KB
ID:	1057601

        Even though the state is being changed in the above image, the enumerator is not updating on the tree.
        Click image for larger version

Name:	AYQsAe6.png
Views:	1
Size:	112.8 KB
ID:	1057602


        Comment


          #49
          Im New to Unreal Engine, I like the idea of programming with nodes, I dont know what Nodes exist to represent code, I tried to modify your example so that when the monster character(JILL) is close to a Unit and starts to attack the unit backs away.

          Can u help
          Firstly getting the Jill_units location /The Nearest Jill ?
          Would you then set a new location target and move to it or maybe a simpler move backwards-no path

          I would add a reaction time so that the unit will get hit they cant be god like.

          Also how would you add a slight randomness to the Task forces decision to shoot so they dont all shoot at the same time?

          For a level of my own using your AI system I would plant Jill_Type ai bots around the level, setting a trigger radius so they only activate once player or task_force units enter that radius.

          Also how do u go about making sure the attack animation completes before starting over, want to avoid looping animation too.

          if taskforce_unit or player move away the Jill-bot, her attack animation should continue to end then move towards the player/TF
          Jills state would need to switch to move to target then back to attack, Can u position TargetPoints from withing the blueprint.

          1 more thing can u make it so when objects are placed they number them selves (G-id) that would come in handy for allsorts, We have built menu system hud,Follow cam/Mini map We just need AI.

          If u could comment in the blueprints abit more for beginners, I come from programming background but my pc takes all day to compile this engine so I want to learn blueprints ,plus I think its the way forwards.

          Is this being updated anymore?
          I been watching it everyday and not seen any changes.

          Many Thanks ,Mince

          FoldingCircles@Gmail
          these few adjustments will really help

          Comment


            #50
            I'm not the developer of this project but I think I can help with some of these problems.

            Originally posted by brettpalmer View Post
            Firstly getting the Jill_units location /The Nearest Jill ?
            The simplest way is to use the get all actors of class node and use the get path length node to see if they are closer to your actor than the previous (always storing the closest one and disregarding if it is further away). Note this does not account for line of sight. but if the length is closer, you can then do a ray trace to see if they are visible.

            Originally posted by brettpalmer View Post
            Would you then set a new location target and move to it or maybe a simpler move backwards-no path
            you can use move to actor within a radius if you are attacking. Fleeing you can use move to location or position an actor and move to it. The problem with just moving the character away is that it might move off the nav mesh which essentially moves it out of bounds. as long as your point is on the nav mesh, it should move to it. If it is unreachable, chances are, your character is cornered and should fight for their life.

            Originally posted by brettpalmer View Post
            I would add a reaction time so that the unit will get hit they cant be god like.

            Also how would you add a slight randomness to the Task forces decision to shoot so they dont all shoot at the same time?
            a random float with a delay node does the trick for reaction time. if it's when they first notice the enemy, then the they should not be in sync when firing either as each characters AI would have a different float generated.

            Originally posted by brettpalmer View Post
            For a level of my own using your AI system I would plant Jill_Type ai bots around the level, setting a trigger radius so they only activate once player or task_force units enter that radius.
            You could use a sphere overlap actors on your AI bots to act as a trigger. Filter the comando's class so only they trigger it.

            Originally posted by brettpalmer View Post
            Also how do u go about making sure the attack animation completes before starting over, want to avoid looping animation too.

            if taskforce_unit or player move away the Jill-bot, her attack animation should continue to end then move towards the player/TF
            when I play an anim montage, it returns a float. that is the length of the animation playing. Storing that value, I check delta time + time since animation started. If it is greater than the animation length then it is alright to play again. Otherwise, add delta time to time since animation started. and repeat next tick. You can also add a multiplier (mine is 0.8) on the returned float so it gets 80% of the way through the animation before it can start another one. This helps blend the animations a bit better.

            Originally posted by brettpalmer View Post
            Jills state would need to switch to move to target then back to attack, Can u position TargetPoints from withing the blueprint.
            I'm having trouble with this one myself. It seems to get stuck in the attack state for me. see my previous post.

            The rest is kind of out of my domain since it's not my project. Let me know if you need clarification on any of this.


            Comment


              #51
              Thanks Justin

              I am familiar with ray-tracing and path-finding and state machine, but not in Blue Prints, I guess I got to learn the Prints.

              My Problem is I dont have a clue what Nodes to use, I know Branch is If and I know how to get and set variables.

              "when I play an anim montage, it returns a float. that is the length of the animation playing. Storing that value, I check delta time + time since animation started. If it is greater than the animation length then it is alright to play again. Otherwise, add delta time to time since animation started. and repeat next tick. You can also add a multiplier (mine is 0.8) on the returned float so it gets 80% of the way through the animation before it can start another one. This helps blend the animations a bit better."

              If there was 1 Answer u could give me that would make the most difference I would say It would be, How do you pull the Animation_Time_Length.
              Getting Time-Started, Would you use on-begin or /do once

              if TimeNow>(TimeStart+Anim_TimeLength) Then CanAttack =True

              Thanks For The Help

              Comment


                #52
                This might help. It is what I do for my animations. For me, attack speed is a value depending on what character is attacking As I have commented in the image you can use the return value of the animation instead of attack speed to get it to always finish it's current animation before starting a new one. The only difference here is that I'm counting time until next attack is available (counting down to 0) and you are counting time since last attack (counting up since time at tick).

                Click image for larger version

Name:	Nw5Z2Tl.png
Views:	2
Size:	205.9 KB
ID:	1057891
                Last edited by Justin.Dooley; 10-17-2014, 01:55 PM. Reason: Fixing attachment link


                Comment


                  #53
                  Awesome! Thanks for the contribution!

                  Comment


                    #54
                    Thank you for your help.

                    Comment


                      #55
                      The Major flaw with the above Delay for animation ..... is The Delay Before The Attack, Need to attack then delay before next attack.

                      SilentX Been Silent alright.

                      HELP!
                      Now my Jills they dont transition from 1 place to another they just appear 3 seconds later in there next location. I know its week but a few minor adjustments by some 1 who, A)> knows how this system is put together and, B)> knows what they are doing; us beginners would have sumin we could play with,.

                      We can add weapons and fx and build levels. We have done some cool Mocap using a Xbox Kinect using IPI Mocap, But adding states to your design so they can be used well that going to take a while.

                      Do you think there will be any more added to this system?

                      Comment


                        #56
                        Hi Guys - I get internet today! Isn't that exciting! Its been a grilling month for me. I've been doing a lot at once and sadly my participation in my personal projects were taking a hit. Well that finally changes somewhat, haha! Now that I'm stable again - after I get internet today its just a matter of getting back up to speed. I haven't stopped working since I lost internet, so don't think there isn't anything new! More coming soon!

                        Thanks for the support guys.



                        --

                        Update##

                        I've updated the thread!
                        Last edited by PeterLNewton; 11-15-2014, 03:24 PM.

                        Comment


                          #57
                          Flying AI?

                          Have you done any research into Flying AI? I was hoping just getting AI to move to an elevated location, I would just need to activate flying on the actor but it's not that simple. Methinks this feature is not fully implemented and a custom grid of cubes and pathing algorithms will need to be made. But I don't really know for sure.

                          Comment


                            #58
                            Originally posted by Sluggernot View Post
                            Have you done any research into Flying AI? I was hoping just getting AI to move to an elevated location, I would just need to activate flying on the actor but it's not that simple. Methinks this feature is not fully implemented and a custom grid of cubes and pathing algorithms will need to be made. But I don't really know for sure.
                            Hi Sluggernot,

                            Yes I have. There are a few ways you can do it, and they have different advantages for different techniques. So my question is what are they having to do. Just transfer from one location to another location? Fly all the time? This would help me give you a better solution.

                            Comment


                              #59
                              Ah, yah, fly. Think Real Time Strat space game. So there is hovering but a majority of the movement is going to be flying around asteroids.
                              Of course, ideally, the asteroids and debris are floating around and rotating and the levels are built dynamically but that can come later. At this time I have done all of the research I can find on getting the flying made that every AI has to actually work with the pathing that is built in.

                              Your thread title boasts Flying AI but it doesn't have any, right? Please tell me i'm missing something.

                              Comment


                                #60
                                Originally posted by Sluggernot View Post
                                Ah, yah, fly. Think Real Time Strat space game. So there is hovering but a majority of the movement is going to be flying around asteroids.
                                Of course, ideally, the asteroids and debris are floating around and rotating and the levels are built dynamically but that can come later. At this time I have done all of the research I can find on getting the flying made that every AI has to actually work with the pathing that is built in.

                                Your thread title boasts Flying AI but it doesn't have any, right? Please tell me i'm missing something.
                                You sir are correct. Working to correct that.
                                Last edited by PeterLNewton; 11-27-2014, 04:31 AM.

                                Comment

                                Working...
                                X