ไม่สามารถเล่นวิดีโอนี้
ขออภัยในความไม่สะดวก

Detection By Affiliation - Ue4 C++ Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ก.ค. 2021
  • This video shows you how to setup AI Factions in your game using the detection by affiliation system
    #ue4 ai #AI perception #UE4 Advanced AI #ue4 c++ tutorial

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

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

    This was very helpful. I am not yet comfortable enough with C++ to apply this to my game, but this is a game changer for me. Literally. Thank you!

  • @unw3ee
    @unw3ee 2 ปีที่แล้ว

    Thank you! Easy and quick guide, it was very helpful for me

  • @yogisauravnath5392
    @yogisauravnath5392 2 ปีที่แล้ว

    Sirrrr 🔥

  • @user-sv6ei4do4q
    @user-sv6ei4do4q 4 หลายเดือนก่อน

    Thank You Very Much!!!!

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

    Changing the teamId at runtime needs to notify the AI system of Unreal. Sadly I forgot what method needs to be called.

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

      I figured it out just didn't get the time to update the video....there is a set team id function in the interface

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

    Can change it at runtime by making the teamId BlueprintReadWrite and just changing the value.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  3 ปีที่แล้ว

      Have you tested it....??....you can change the value of the team id at runtime even in c++ but the bots in the same team do not start fighting each other. I did try to do it that way but it did not work but thank you for commenting

    • @dfwerwolf
      @dfwerwolf 2 ปีที่แล้ว

      @@pranjalbhattacharjee5601 I think you need to create custom uint8 variable for teamID and store it in AI controller. Return that new variable via overridden GetGenericTeamId().
      Then you can override "virtual void SetGenericTeamId( const FGenericTeamId& InTeamID )" in the same controller and set your custom teamID variable at runtime. Should work.

    • @pranjalbhattacharjee5601
      @pranjalbhattacharjee5601  2 ปีที่แล้ว

      @@dfwerwolf Thanks for your comment.....I will try to do it that way

    • @RaedAbbas
      @RaedAbbas 2 ปีที่แล้ว

      @@pranjalbhattacharjee5601 Hi, Did that work? Would be nice to update the tutorial please

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

      @@RaedAbbas I am sorry but I did not get a chance to test it yet but I will make another tutorial as soon as I figure it out.

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

    Hi! I would love to know if you found a way to change affiliation at runtime, so that team id assigned as friendly to player will become hostile if player attacks a member of that team. Any idea?

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

      Yes....there is a function in the interface to set team id....you can use that to change the bots attitude towards the player

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

      @@pranjalbhattacharjee5601 I am using pretty much only blueprint tho, any way to do this without c++? perhaps make a function that is exposed to blueprint?

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

      @@MathB_Official Yes you can expose it to blueprints but you will have to have to do that yourself in c++.....these features are not exposed to blueprints out of the box

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

      @@pranjalbhattacharjee5601 I will look into that then! Thank you very much for the tutorials you made! very usefull to someone like me who almost never did any c++ haha.

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

      @@pranjalbhattacharjee5601 right now I have made a little check on the receive dammage so that allied can't hurt each other (frienfly fire) but excluded the player from it. as my Behavior tree make the dammage causer the primary target, if I attack one of my allies he will defend himself haha. I could probably use that to warn other nearby allies that I have betrayed them but not those too far away that eould have no idea xD

  • @liamvandyck4546
    @liamvandyck4546 2 ปีที่แล้ว

    IS it possible in blueprint ?