Announcement

Collapse
No announcement yet.

Have an A.I Character stop and face a certain direction?

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

    Have an A.I Character stop and face a certain direction?

    Hi I want to have an A.I character to stop after a 5 minute delay and enter an idle animation which I know how to do. What I would like to do then is when they stop to all be looking or facing the same direction. How would I go about that? I've set up a Set Actor Rotation but I'm using a wander on the character which makes him choose a new location to walk to every few seconds so for the 30 seconds that I have him stopped in that location he keeps turning to a new direction.

    Click image for larger version

Name:	Screen Shot 2015-09-24 at 18.48.33.png
Views:	1
Size:	202.5 KB
ID:	1161792

    Click image for larger version

Name:	Screen Shot 2015-09-24 at 18.49.03.png
Views:	1
Size:	159.2 KB
ID:	1161793

    Is there a way to turn off the wander when he stops to look in the direction I want him to look?
    Last edited by tcla75; 09-24-2015, 01:54 PM.

    #2
    I Tried to create a IsLooking but that seems to have turned off the wander altogether.

    Click image for larger version

Name:	Screen Shot 2015-09-24 at 19.54.29.png
Views:	1
Size:	91.6 KB
ID:	1088115


    Click image for larger version

Name:	Screen Shot 2015-09-24 at 19.56.46.png
Views:	1
Size:	117.0 KB
ID:	1088117
    Attached Files

    Comment


      #3
      try only doing the wander if the movement component is activated. You seem to be activating and deactivating it appropriately so use that as you "state" for whether to wander or not.

      Comment


        #4
        Originally posted by zoombapup View Post
        try only doing the wander if the movement component is activated. You seem to be activating and deactivating it appropriately so use that as you "state" for whether to wander or not.
        I'm not sure what you mean. How would I state it not to use the wander?

        Comment


          #5
          On your behavior tree you can set a service to check a value every tick or set amount of time, then you just have the sequence escape or change its function if/when that value changes

          Comment


            #6
            Originally posted by ZoltanJr View Post
            On your behavior tree you can set a service to check a value every tick or set amount of time, then you just have the sequence escape or change its function if/when that value changes
            Cool just a few questions. Which behavior tree the wander or npc? What service do I need to use to check on every tick. How do I have the sequence escape or change function?

            Comment


              #7
              Bump anyone

              Comment


                #8
                Mmm, I'm confusing about what you looking.

                You want that an actor changes his rotate to look another actor, is that ?

                Comment


                  #9
                  No thats not the problem. I am able to get the Character to look in a certain direction by using a set actor rotation however the problem I have is the wander I have set up for that character picks a point randomly somewhere on the map to walk to within 3 seconds when he is in idle mode so even with movement turned off he will still turn to that direction, which is a problem because I need him to keep looking at the direction I have set.

                  Comment

                  Working...
                  X