Get AI To Follow The Player | Halo Infinite Forge Tutorial

Поділитися
Вставка
  • Опубліковано 2 лип 2024
  • Want an AI or group to follow you where ever you go? This is how to make it happen. Big thanks to all who have supported this channel up until this point.
    In this tutorial I show several different ways to get them to follow you, and you can skip around the video timestamps to the part you want. Each part uses the previous part as a base though.
    •Zechariot Discord: / discord / Zechariot
    ___________________________________________
    All of my prefabs will be uploaded using the exact nodes and setup I used in the video. You may need to adjust object references.
    Prefab: www.halowaypoint.com/halo-inf...
    _______________________________________________________________
    _______________________________________________________________
    Chapters:
    00:00 Intro
    01:37 Map Setup Part 1 (Basic Following)
    03:00 Scripting Part 1
    07:24 Testing Part 1
    07:57 Map Setup Part 2 (Get Two Different Groups To Follow)
    11:09 Scripting Part 2
    16:64 Testing Part 2
    17:17 Map Setup Part 3 (Amassing Troops From The Map)
    18:10 Scripting Part 3
    21:28 Testing Part 3
    22:22 Map Setup Part 4 (Make Them Stop Following)
    23:02 Scripting Part 4
    24:00 Testing Part 4
    26:16 Special Demonstration
    _______________________________________________________________
    _______________________________________________________________
    Music:
    • The Legend of Zelda: O...
    &
    • Halo 3 Complete Soundt...

КОМЕНТАРІ • 86

  • @badger417_
    @badger417_ 8 місяців тому +15

    Underrated channel, very good tutorials

  • @icarus_the_heretic2660
    @icarus_the_heretic2660 8 місяців тому +2

    No problem dude and we thank you for sharing your knowledge to us! :)

  • @HeavySpark
    @HeavySpark 8 місяців тому

    Thankyou for contributing guides to the community for better maps.

  • @arkonomus
    @arkonomus 8 місяців тому

    This helped so much, thank you. Great video.

  • @nickbattista7268
    @nickbattista7268 8 місяців тому

    keep up the great work been here since the beginning n dont plan on leavin anytime soon!

  • @dann9732
    @dann9732 8 місяців тому +1

    Incredible intro, you instantly catch me with the Temple Music of Zelda OOT. Cult classic !!

    • @-Zechariot
      @-Zechariot  8 місяців тому +1

      Thanks!
      It’s mainly due to most of my tutorials taking place in the temple of time that I’ve been working on in the forge

  • @DEWtheMCCOY
    @DEWtheMCCOY 8 місяців тому +4

    Hey! To set up follow on a certain player, you need to make an object list variable, then just add and remove the player from the list. When you are calling for the one player, use Get Object at Index set to 1 then remove player from the list 😊 hope this helps, great vid ❤

    • @-Zechariot
      @-Zechariot  7 місяців тому

      Oh? This could be very helpful. Is there a way I could get a slightly more in depth explanation? This will allow me to fully revamp some of the current tutorials.

  • @kaylaearley1742
    @kaylaearley1742 5 місяців тому

    Top tier video editing 👌

  • @nathanjones7274
    @nathanjones7274 4 місяці тому

    Sick vid currently making my own firefight map and would like a squad of marines following the player to each zone awesome!!

  • @jbraunsc21
    @jbraunsc21 8 місяців тому

    Sub earned, your 300+ now!

  • @StrmTrprTK420
    @StrmTrprTK420 4 місяці тому

    Ty so much, I'm gonna have all hunters and spec ops in my firefights hunt me

  • @icarotheonly7215
    @icarotheonly7215 5 місяців тому

    The amount of time your content has saved me (and the amount of consoles your content has prevented me from throwing out windows) is immeasurable. Halo Infinite's script system may be the most advanced, but in terms of stability and function, it's on par with Halo 2... I hate to love it, but your content makes me hate it a little less.

  • @michaelregonaldhouston9366
    @michaelregonaldhouston9366 7 місяців тому +2

    Now here's a question I've been stumped on and would love some help with... How would you get the AI to do this same thing, but have them HUNT the player down? Like, vehicles on patrol that will bullrush you once they see you. I think a derivative of this script could be used, but I also want them to do a patrol pattern before that hunting script activates... Testing tonight.

  • @zanzibarcraig1174
    @zanzibarcraig1174 8 місяців тому +2

    Hey man I just recently came across your content and I'm super Blown Away I love to try to get in contact with you sometime and speak about forage find some things that I've been trying to accomplish with my own map thanks for uploading this type of content I'll be hopefully making content like this in the future 👏

    • @-Zechariot
      @-Zechariot  8 місяців тому +1

      I probably should set up some sort of way for people to interact with me better 😅 I’ve never used discord but I may end up setting one up

  • @kiingbooty
    @kiingbooty 7 місяців тому

    I love your video dude, only thing is the music is a little too loud. Maybe town it down a bit slightly. Cheers!

    • @-Zechariot
      @-Zechariot  7 місяців тому

      I figured it out shortly after this video came out. My editor program was the culprit. Sounded much quieter in it than the final product on the different platforms like mobile.

  • @CrashOzzy1223
    @CrashOzzy1223 6 місяців тому

    1:33 yes, I want that… and another, but I think 343i needs to add a roaming script themselves.

  • @castilloespinoza9726
    @castilloespinoza9726 8 місяців тому +1

    How works ''set AI dificulty'' and how I can use it on forge?

  • @CrashOzzy1223
    @CrashOzzy1223 6 місяців тому

    21:58 strange, the game has set voice lines for alliances with Spartans and the marines with a slightly different sentence, but for some odd reason it doesn’t work in forge with the lines… I haven’t had the chance to check for custom games.

  • @Fire4ward
    @Fire4ward 8 місяців тому +2

    Could you do a video on how to spawn ai after capturing a stronghold zone and then have them follow whichever team captured it?

    • @-Zechariot
      @-Zechariot  8 місяців тому

      This is easy, but the problem is following the team would make the ai follow the mid point between all team members. If the team gets split up, the ai will be in some space between all of them instead of following a specific player or group.
      Best way to do this to probably have them follow the player on the team with the highest point amount as a sort of AI leader.

  • @CrashOzzy1223
    @CrashOzzy1223 6 місяців тому

    0:01 oooh… is it zelda? I coulda sworn, I think that’s what it’s called.

    • @-Zechariot
      @-Zechariot  5 місяців тому

      Yup, I've worked for MONTHS on this map too, and it's almost ready.

  • @StrmTrprTK420
    @StrmTrprTK420 4 місяці тому

    Is there a way to make good AI and bad AI to follow the player? Lik team followere help but enemy followers attack

  • @javiers.ramirez7862
    @javiers.ramirez7862 8 місяців тому

    Wow….. dude is rocking all the same armors parts and coating that I have been using since I first bought it.

    • @-Zechariot
      @-Zechariot  8 місяців тому

      I think it's the closest I'm ever going to get to looking like mine from Halo 3 😅 I was one of the lucky ones to have my exact color scheme I used as a coating

    • @javiers.ramirez7862
      @javiers.ramirez7862 8 місяців тому

      @@-Zechariot change your chest plate to the UA/Macrospline 🔥

    • @javiers.ramirez7862
      @javiers.ramirez7862 8 місяців тому

      @@-Zechariot on mine specifically I also enable the victory wings armor affect too

  • @Endtimes4ahatter
    @Endtimes4ahatter 8 місяців тому +3

    I wonder if you can adjust the AI difficulty like from easy to legendary. Is it possible with scripts?

    • @LCVcultGaming
      @LCVcultGaming 8 місяців тому +2

      yeah, but i dont think their health pool increases by a crazy amount its more so how they interact with the player, but ill check it rn

  • @rainplayzz
    @rainplayzz 8 місяців тому +2

    Could you make a tutorial of the ai following the players mark?

    • @-Zechariot
      @-Zechariot  8 місяців тому +1

      Yes actually it’s processing now as a matter of fact 😅

  • @9000Dogs
    @9000Dogs 8 місяців тому +2

    Is there a way to get AI to automatically follow a random player on one specific team? Say, have Bravo-marked Squads follow Eagle (Team 1), and Charlie-marked for Cobra (Team 2)? Thank you so much for all your help!

    • @-Zechariot
      @-Zechariot  8 місяців тому

      Oh that’s easy. Are you wanting them to follow the same player the entire game or switch up players?

    • @9000Dogs
      @9000Dogs 8 місяців тому

      ​@@-ZechariotSo sorry, didn't get a notification you responded! And yeah I want them to follow a random player on their proper team, and follow someone new when the player dies.

    • @9000Dogs
      @9000Dogs 7 місяців тому

      @@-Zechariot Any advice on this one? I was thinking maybe a branch check for team alignment would work? And if the AI faction matches player faction, they follow a random player on that team. Like the branch style of true-false you used in the FFA affiliation for Infected team AI? Apologies for what is probably a simple question.

    • @-Zechariot
      @-Zechariot  7 місяців тому

      @@9000Dogs I’d have to set it up, pretty much how you said. Only thing I’m having a hard time seeing is how to figure out it is THAT player that died. That has been one of my biggest hurdles I haven’t been able to climb over yet. How to get a specific player on a team from spawning or dying.

  • @itsyahomiescott3742
    @itsyahomiescott3742 8 місяців тому

    How do you show the AI health bars?

  • @aidansxboxmusic7217
    @aidansxboxmusic7217 7 місяців тому

    Ok so I’m trying to make a script using the part 1 script to try and make a group of marines wait at an area and when the player interacts it makes the marines follow the player who interacted with the scripted button but I can’t get it to work

    • @-Zechariot
      @-Zechariot  7 місяців тому +1

      Hmm.
      I’d say just rig up a new script, using “on squad spawned with squad label” to “set squad variable” so that way you can use the squad later.
      On object interacted, hook up your button, then have a 1 second “wait for n seconds” node, then use “set squad follow object” and hook up the activator of the button to the object they follow, and use get squad variable for the squad you have set. That SHOULD do it.

  • @smefiregod6566
    @smefiregod6566 8 місяців тому

    How do you do when let's say you make a campaign, and you enter in a area where there is the max amount of AI fighting eachothers. When you go to the 2nd area (checkpoint) since there was the max AI figthing, but now im in a new area there can't be more AI that can be spawned. So do i kill/remove ai from the first area ? Hope you understood

    • @LCVcultGaming
      @LCVcultGaming 8 місяців тому +3

      I'd say yes, have a area monitor trigger kill all units and spawn new ones either before the player reaches the new area or when ever you want them to. that how older game do it (and still do it) that's why there are in-between sections of corridor very often to load/de-load stuff

    • @smefiregod6566
      @smefiregod6566 8 місяців тому +2

      But to not ruin immersion, you must do it in the right middle, so not too before in case the player go back in the 1area, but not too far too @@LCVcultGaming

    • @-Zechariot
      @-Zechariot  8 місяців тому +2

      @@LCVcultGaming That’s exactly it

    • @smefiregod6566
      @smefiregod6566 8 місяців тому

      How and by the way zechariot, of course depend of how many people would like to see that, but how to make wit the nodes an objective system (Protecting a certain unit/object/whatever) and if die/destroy you loose@@-Zechariot

  • @Son_Joe_Productions
    @Son_Joe_Productions 8 місяців тому +1

    Is there a way for an AI to not stay dead? (Example: The Arbiter in Halo 3 campaign. Where he goes down for a few seconds, then gets back up like nothing happened.)

    • @-Zechariot
      @-Zechariot  8 місяців тому

      Not that specific AI. But you can have one respawn and teleported directly to you to appear as if they are back just like that.

    • @Son_Joe_Productions
      @Son_Joe_Productions 8 місяців тому

      Cool, thanks for the info. I can already think of some campaign missions in my head.

    • @-Zechariot
      @-Zechariot  8 місяців тому

      @@Son_Joe_Productions there is a way though that you can set it up so that the AI you’re wanting like that will almost never die anyway as well

    • @Son_Joe_Productions
      @Son_Joe_Productions 8 місяців тому

      Neat. 😎

  • @Naratiq
    @Naratiq 7 місяців тому +1

    I noticed when I die and respawn, the AI stops following and won't start again. Any advice on that? Thanks for the video!

    • @-Zechariot
      @-Zechariot  7 місяців тому +2

      Yeah that happens cause this game for some reason deletes the data of the player and ai objects when they die. So it breaks the link between the two. I’m trying to find a way to have it set so that when a player spawns it follows that same player again.

    • @Naratiq
      @Naratiq 7 місяців тому

      Ah, I figured as much :/ Based on the 'On Player Spawn' node, in the description it says when a player spawns or respawns so technically it should work with that, guess it is just a bug.

  • @user-ce5fq1zp9v
    @user-ce5fq1zp9v 8 місяців тому +1

    I’m subscribing but you really need to have that background music at least 50% volume or lower. Can’t hear you half the time my guy

    • @-Zechariot
      @-Zechariot  8 місяців тому +1

      I've noticed in some cases the levels get weird. I've worked to reduce it over the course of the videos I make, and in the editor it sounds a lot lower than the final product when uploaded, and I'm not sure why it does that. So I'm reducing the levels across the board

  • @thebossbrags
    @thebossbrags 8 місяців тому +1

    Don’t work for me, the AI also die randomly after a certain amount of time. Copied this same script multiple times and simply won’t work for me 😕

    • @-Zechariot
      @-Zechariot  8 місяців тому +1

      They just die randomly? That’s odd. Do you have a separate script running or was it a blank map?
      If you want, try a simpler method by just creating a button, create an “on object interacted” and connecting that to “set squad follow object” and the activating player to the target object. Then get an “on squad spawned with squad label” and have it set to alpha. Get the 3 nodes needed for variables which are “declare squad variable” “set squad variable” and “get squad variable”
      Type Alpha into the identifier of the declare squad variable, scope local. Place it wherever it doesn’t have to be connected to anything.
      Then connect the on squad spawned with squad label diamond to the set squad variable diamond. Then connect the squad output to the value input of the set node. Make sure the identifier is Alpha and scope local.
      Then just use the get squad variable node and connect the value to the squad input of the set follow object node, and make sure the identifier is alpha and scope local. That should get any ai on alpha to follow you. Then just build up from there. Once you get it working you can come back and change the event that gets alpha to follow you to what ever you want.

    • @thebossbrags
      @thebossbrags 8 місяців тому

      Okay mate I’ll try that. If you want to jump on with me I’m making a campaign mission currently and it’s massive. Already done 1 and would love someone’s input who is very good with scripting 😁

    • @-Zechariot
      @-Zechariot  8 місяців тому

      @@thebossbrags Once I'm caught up on a few things, I might be able to work something out and take a look with you

  • @darealsnurbs2403
    @darealsnurbs2403 8 місяців тому +1

    This failed for me. Tried copying this exact script on a blank canvas same as the example you set and it still doent work

    • @darealsnurbs2403
      @darealsnurbs2403 7 місяців тому

      Just revisited this. It does work. Pretty sure I screwed it up somewhere

  • @mckant
    @mckant 8 місяців тому

    I wonder if there’s a way to use this script to make the AI follow a neutral flag (and possibly make them return it)

    • @-Zechariot
      @-Zechariot  8 місяців тому +1

      I’ll look and see what I come up with. Hopefully the flag doesn’t delete its object once a player picks it up. Sometimes this game does things like that. And if there’s a node that sends the flag back to home base, then it can happen

    • @mckant
      @mckant 8 місяців тому

      @@-Zechariot thanks man, you're the best :)

  • @TylerDertonin
    @TylerDertonin 7 місяців тому

    You could literally script a halo wars game using the ai movements and switches

    • @-Zechariot
      @-Zechariot  7 місяців тому

      Oh I know. And I want this so bad. If I don’t see one in a few months then I might just do it myself

  • @ibawkbawki
    @ibawkbawki 6 місяців тому

    Did the exact same thing but with marines…. And they don’t follow me

    • @-Zechariot
      @-Zechariot  5 місяців тому

      I'm making an updated tutorial that will fix any issues this video had, since it was a bit out of order. Be on the lookout and hopefully it fixes your problem

  • @itsyahomiescott3742
    @itsyahomiescott3742 8 місяців тому

    Is there a script that allows you to play as the AI?

    • @-Zechariot
      @-Zechariot  8 місяців тому

      No that’s pretty much something that can’t happen as far as the game goes

    • @itsyahomiescott3742
      @itsyahomiescott3742 8 місяців тому

      @@-Zechariot Ah, I see. Thank you.

  • @CrashOzzy1223
    @CrashOzzy1223 6 місяців тому

    26:26 well that’s rude.

  • @princessoscar3089
    @princessoscar3089 6 місяців тому

    I did it exactly the same as you but THE AI DOES NOT FOLLOW ME. :( WTF

    • @-Zechariot
      @-Zechariot  6 місяців тому +2

      This one was a bit all over the place. It wasn’t as straightforward as it should have been.
      The best way to do this is do baby steps.
      Use the button and set the script up like this
      >”on object interacted” (your button)
      >”for each object” and using “get all AI Units” and plug that into the objects input of “for each object”
      >”get squad from AI unit” and plug the AI unit into the “current object” pin of “for each object” then use “get squad has squad label” from AI advanced, and plug in the squad pin from “get squad from AI unit” into the squad pin of the new node. Manually set the squad label of the node using the node properties tab to what ever squad you have that you want following you.
      >”branch” connected to “execute per object” and the condition of the branch needs to be connected to “has label” from the “get squad has squad label” node.
      >”Set squad follow object” connected to “if true” from branch. The squad input of this node needs to connect back to the “squad” output of “get squad from AI Unit” and the object needs to connect all the way back to the activating player from “on object interacted”
      That should be a very basic way of getting AI to follow the player who presses the button.

    • @princessoscar3089
      @princessoscar3089 6 місяців тому +1

      It says NODE GRAPH FAILED: Set squad follow object not connected to any evet.@@-Zechariot
      EDIT: I GOT IT TO WORK!!! I didn't plug the DIAMOND SLOT from "on each object interacted" into the DIAMOND SLOT for "for each object". You didn't say to do that lol but I did it and it fixed it so whatever! xD

    • @-Zechariot
      @-Zechariot  6 місяців тому

      @@princessoscar3089 oop. But it’s working now so just work from there and build the script how you want it haha. You can replace the button with any event you want as long as you have a way to get the player to plug into the last node.

  • @watermelongaming3698
    @watermelongaming3698 8 місяців тому

    how do i set it up so they follow whoever activates Custom Equipment A?

    • @-Zechariot
      @-Zechariot  8 місяців тому

      I haven’t played around with the custom equipments but I’m thinking that would be in “events custom” and as long as you find a way to get the player that used it, you can plug that into the set follow object node.

    • @watermelongaming3698
      @watermelongaming3698 8 місяців тому

      @@-Zechariot I tried. I tried simply replacing "on player spawn" with "on use of custom equipment A" and put the activating player bit where i needed to, but it still didn't work.

    • @-Zechariot
      @-Zechariot  8 місяців тому +1

      @@watermelongaming3698 I’m on the forge right now, and I’ll work up a script and see if I can get it working.

    • @watermelongaming3698
      @watermelongaming3698 8 місяців тому

      @@-Zechariot Thank you.

  • @CrashOzzy1223
    @CrashOzzy1223 6 місяців тому

    0:22 when you start out just 10 alone is amazing because think they are a full complicated individual each (not when there’s bots but I don’t think someone in the right mind would be wasting money and or time to make bot accounts and exploits) to see 784, that’s a lot. (Ahem ahem, I *‘DISLIKE’* greedy UA-camrs like that beast person.)

    • @-Zechariot
      @-Zechariot  5 місяців тому

      If I'm being honest here, I am FLABBERGASTED that I have made it to almost 900 haha. I NEVER thought I'd make it this far, but hey, here I am now