UE5.1 State Tree Tutorial "Overview" (New Tool for AI now production ready)

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ม.ค. 2025

ความคิดเห็น •

  • @MrKosiej
    @MrKosiej  ปีที่แล้ว +2

    Some of the bugs i talked about in this video have been fixed and there are some additions in 5.2, watch my update video here th-cam.com/video/4y9KVs4DyrU/w-d-xo.html

  • @PrismaticaDev
    @PrismaticaDev ปีที่แล้ว +8

    Thanks! Great video on how StateTree is set up :)

    • @MrKosiej
      @MrKosiej  ปีที่แล้ว +6

      Oh damn, Prismatica, love your vids :D Glad i could help.

    • @donnyjoe7653
      @donnyjoe7653 ปีที่แล้ว

      Hey, I really enjoy both your TH-cam channels. Thank you guys!

  • @QuiteDan
    @QuiteDan ปีที่แล้ว +1

    What's this? Actual State Tree documentation?

  • @MrKosiej
    @MrKosiej  ปีที่แล้ว

    I said in the video that a variable that has an "input" category doesn't have to be instance editable for it to show, it's true but it will also not work xd. Mark your variables Instance Editable if you want to edit or bind them.

  • @TheGeezaz
    @TheGeezaz ปีที่แล้ว +1

    You can drag at minute 33:47 from the enum and promote to variable, because its there

    • @MrKosiej
      @MrKosiej  ปีที่แล้ว

      It's there but not exposed, so yeah, technically i could drag it out of the return node and promote to variable but then i can't use "switch on" node with it. I guess it's a viable solution for simple scripts and i could've mentioned it but you might need that switch at some point, and then you'd have to make workarounds or make your own enum anyway.

    • @TheGeezaz
      @TheGeezaz ปีที่แล้ว

      @@MrKosiej I could following you and instead of makeing a new enum I draged and promoted. once that I get the newly created variable and drag out and used the select node.
      and on each option selected what was needed: succeded failed etc

    • @MrKosiej
      @MrKosiej  ปีที่แล้ว +1

      Aight, i've been using state trees for a while now and i do think dragging and promoting is the way to go after all :v

  • @illyay1337
    @illyay1337 ปีที่แล้ว +1

    I think I found why event firing doesn't work from within the tasks themselves. There's a very simple bug in the C++. Gonna do a pull request.
    I'm working on a task that will let you run child subtree assets because they didn't add that for some reason. This resulted in me going into the C++ and I found this bug.
    This is the C++ that drives task nodes:
    EStateTreeRunStatus UStateTreeTaskBlueprintBase::EnterState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition)
    {
    if (bHasEnterState)
    {
    FScopedCurrentContext(*this, Context);
    return ReceiveEnterState(Transition);
    }
    return EStateTreeRunStatus::Running;
    }
    It needs to be:
    EStateTreeRunStatus UStateTreeTaskBlueprintBase::EnterState(FStateTreeExecutionContext& Context, const FStateTreeTransitionResult& Transition)
    {
    if (bHasEnterState)
    {
    FScopedCurrentContext ScopedCurrentContext(*this, Context); //

  • @JoblessJoshua
    @JoblessJoshua ปีที่แล้ว

    Should you use "AIMoveTo" or "MoveToLocationOrActor"? For the 2nd one, I dont know where I'm supposed to get the AI Controller from the State Tree

    • @MrKosiej
      @MrKosiej  ปีที่แล้ว

      I always use AIMoveTo when i can, if you need to get ai controller just use "Get AIController" on the pawn ref (you can even use it on actors).

  • @kushs-labs
    @kushs-labs ปีที่แล้ว

    What a timing. I'm really thankful for it.
    Thanks a ton.
    Will be grateful to know if there is any more planned content in State Trees. ☺️

  • @noisegrindercn
    @noisegrindercn ปีที่แล้ว

    4:40 isn't that just create a circular dependency?

    • @MrKosiej
      @MrKosiej  ปีที่แล้ว

      If you refer to context actor class - not really. Circular dependancy would happen if the actor and state tree couldn't run without each other, which is false. They can, but if they're not properly "connected" the interaction between actor and state tree won't work correctly. By connecting i mean adding a state tree component with apropriate asset to the actor and choosing the right class in state tree. But it will still work even if you just choose "Actor". At high level it's just casting avatar to that class so you can access its fuctions. Concluding, you need to set up a single part for that part to work, it doesn't depend on the other part. Unless your logic depends on both way interaction. But that's not in the fundaments of that system.

    • @noisegrindercn
      @noisegrindercn ปีที่แล้ว

      @@MrKosiej By saying dependency I meant asset dependency since BP classes are all binary assets files on your disk. If your check the reference viewer you can see BP_Enemy is referencing ST_Enemy, then your ST_Enemy is also referencing BP_Enemy which creates an infinite loop. Historicially, Unreal doesn't handle this kind of pattern well as it *may* randomly crash your project if you have too many of these. Also I have to mention that this is quite different from circular reference in your native C++ code which is a normal pattern in coding. Of course if you plan to move your BP classes to C++ then this won't be a problem at all.

  • @k0c0u
    @k0c0u ปีที่แล้ว

    Thank you and i wait new tutorial!!!

  • @kevintealby5036
    @kevintealby5036 ปีที่แล้ว

    Very helpful. Thank you

  • @wenpluto4282
    @wenpluto4282 ปีที่แล้ว

    excellent video!! subbed!

  • @Eirenband
    @Eirenband ปีที่แล้ว

    awesome