How to make an Aimbot Enemy AI that Shoots in Game Builder Garage (GBG Guide)

  Рет қаралды 21,215

Loup&Snoop

Loup&Snoop

Күн бұрын

Пікірлер: 70
@loupandsnoop
@loupandsnoop 3 жыл бұрын
NOTE: My anchor point was rotated! If you use this AI, and it's always facing 90 degrees in the wrong direction, this is why. Rotate the base like I did. Sorry I forgot to mention that detail!
@bayliation1402
@bayliation1402 3 жыл бұрын
It ok
@airorello6290
@airorello6290 3 жыл бұрын
Of course, the one class I thought I never needed is the one I need now... Trig...
@onlypuppy7
@onlypuppy7 3 жыл бұрын
Again, you have a great understanding of the game and how to work within its limits. Nice work!
@lordneeko
@lordneeko 3 жыл бұрын
Math Student: We are we ever going to have to use this?!? Nintendo: Guess this game isn't for you.
@Magillt-1
@Magillt-1 3 жыл бұрын
10:49 simple solution, attach the enemy's location sensor to the gun instead
@ronn201
@ronn201 3 жыл бұрын
Incredible! Seriously incredible! I can't believe you figured this out weeks ago! Good job!
@RAAAAAHHHHHHH
@RAAAAAHHHHHHH 3 жыл бұрын
Absolutely amazing thumbnail and a great guide too
@robfrydryck127
@robfrydryck127 3 жыл бұрын
Thank you so much! I needed this so bad!
@shade041
@shade041 3 жыл бұрын
You are an absolute coding madman. Another excellent video my friend. Would you be able to do a tutorial on how to overlay the damage on a screen after getting hit, or a tutorial on how to show a health bar that moves with the camera on both 2D and 3D planes?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
Thanks! I don't have plans for a video on that yet (although I am thinking about one on cameras). For this specific question come to my twitch stream and we can work it out.
@theelitemyt
@theelitemyt 3 жыл бұрын
Great work, although I can't get the basic 3D one to work. The left side of the traveller follows me perfectly, as does the Y position of the gun, but since it fires ahead, it's always shooting 90 degrees in the wrong angle. Not sure what I'm doing wrong!
@theelitemyt
@theelitemyt 3 жыл бұрын
Never mind - all a matter of rotating and launch angles!
@JoelTheParrot
@JoelTheParrot 3 жыл бұрын
Thanks! This'll help with a plan I had
@SolidVerse
@SolidVerse 3 жыл бұрын
Could it be possible to have lightsaber blocking mechanics, where you block a blaster fire and reflect it back at the enemy?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
Yeah. not with this AI. You'd need to do a ton of math to figure out how to position a cylinder to get a desired deflection, and then move the cylinder there in 3D. Deflecting it straight back would not be a trivial task. All of this is going to be very complicated lol.
@SolidVerse
@SolidVerse 3 жыл бұрын
@@loupandsnoop As is the nature of video game programing
@JeffJubilant
@JeffJubilant 3 жыл бұрын
How did you apply a texture to only the World ceiling?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
Apply a texture to the world nodon. Then set the texture's face to only apply to the ceiling (Y+). It needs to be a world shape with a ceiling, tho.
@a-ramenartist9734
@a-ramenartist9734 3 жыл бұрын
Absolute legend
@TDG_gaming_3093
@TDG_gaming_3093 3 жыл бұрын
7:00 what is the nod on connected to the anchor point? Edit: nvm it’s a touch sensor. Just so you know
@RealLilChopstick
@RealLilChopstick 3 жыл бұрын
Is there any way to play a sound effect when a projectile is fired from the AI?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
I did this in my level. One way is to trigger the launcher manually, and have that trigger also activate the SFX. Alternatively, you could check with a touch sensor that a projectile has been produced.
@RealLilChopstick
@RealLilChopstick 3 жыл бұрын
I am using a touch sensor to enable the projectile launcher so when trying to trigger the SFX using the touch sensor the SFX is only played once. Any fixes?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
@@RealLilChopstick The touch sensor would need to specifically detect the type of object the projectile is made of, and not anything that the enemy is made of. Controlling the SFX by a trigger to the launcher (touch sensor to flag to timer to launcher) would probably be best)
@mofoluwasoomololu6279
@mofoluwasoomololu6279 2 жыл бұрын
Tip use a touch sensor to give it a range
@loupandsnoop
@loupandsnoop 2 жыл бұрын
Since I'm already calculating distance (and using that to change projectile speed), you can easily slip a comparison at that step to turn off the firing at a certain distance.
@truthbydesign5146
@truthbydesign5146 3 жыл бұрын
Would be interesting to see you expand upon your most advanced AI here, introducing an algorithm to more closely mimic a human’s fallibility .. e.g. 70% of the time AI will be “in the zone” and nailing it, and the rest of the time AI’s aim will be off by a tiny amount ..
@SirRebrl
@SirRebrl 2 жыл бұрын
Simplest way would be to spit out a random number, and if it exceeds some value (like your 70%), then add a small randomized error to the calculated target vector. Only a handful of extra nodons.
@digglystyleanimations
@digglystyleanimations 3 жыл бұрын
How can you make it so that a certain amount of hits can destroy an enemy?
@firetobstertheultimate2732
@firetobstertheultimate2732 3 жыл бұрын
Yeah like I'm trying to recreate Mario level 1-1 and I'm having trouble with geting the koopa working
@loupandsnoop
@loupandsnoop 3 жыл бұрын
The code for the huntsman level has something like this. I use a "Destroying" sensor to detect that the player has destroyed a bullet, feed that into a counter, and then when the number of hits reaches a certain threshold, activate a "Destroy Object" to kill the player/enemy.
@bgbong0
@bgbong0 3 жыл бұрын
There's a health demonstration here twitter.com/wydamn/status/1406347406925467650 Not sure if it's the best option but it looks like a good start.
@CadiaCreations
@CadiaCreations 3 жыл бұрын
Isn't that basically just the example from Mystery Room where it shows you how to create a crate that's destroyed in three hits? Or do you need something more complicated?
@simon-ricardokuhn1713
@simon-ricardokuhn1713 2 жыл бұрын
Thanks to this, I managed to make a Lugia boss fight! It's only using the basic aiming at you (without the jump prediction) since it's already hard enough. If interested, here's the ID: *G 005 XC7 X0V*
@normad88
@normad88 3 жыл бұрын
This is why I am not good at having fun programming, I had hard time understanding application to the maths I learned growing up. If I had only not been so stubborn at a critical time in my brain’s developmental stages in life, I’d be able to understand all this. Learning it as an adult is possible, yes. But it hits a lot different, almost feels like a chore. Anybody else feel the same?
@jonathancrews169
@jonathancrews169 3 жыл бұрын
Yes I feel the same, growing up only caring for basics of math has made stuff like this harder to understand. What many find easy and fun, I see complication and work. It exhaust me to conprehend but a good programmer would feel generated. But I like learning new things, so im proceeding.
@lrgogo1517
@lrgogo1517 3 жыл бұрын
Did that joke need the *entire* “NO GOD” scene?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
Great question! Yes it did.
@theguy9777
@theguy9777 3 жыл бұрын
How to make diolauge when you press ZR near an npc
@loupandsnoop
@loupandsnoop 3 жыл бұрын
This will be best with a combination of touch sensors to check you are near, teleport nodons to bring a dialogue box close, and teleport to send it back. I'm skipping details, but that's how I'd approach it.
@BlooJooce
@BlooJooce 3 жыл бұрын
I feel like a goof lol I'm trying to use the simple stormtrooper ai for a different use but when I set it up in code, it reads a -118 but when actually in the game it gets stuck around -30 or so and barely moves. I have it all run exactly as your apart from the fact that I use an apple
@loupandsnoop
@loupandsnoop 3 жыл бұрын
The details of the angle depends on how you made your turret. For example, if you turn the anchoring object in my code by 90 degrees, everything will be wrong by 90 degrees. Remember that you are feeding in an angle for the turret to shoot RELATIVE to the base. I'm really sorry I didn't mention this detail in the video.
@BlooJooce
@BlooJooce 3 жыл бұрын
@@loupandsnoop I'm not getting proper rotation. My location sensor is on the item attached to my hinge nodon. Not to my anchor device. However I've tried both and neither have worked. Everything is movable and I even made sure nothing was solid. Do you think rotating my object would cause it to properly rotate? It's a perfect cube so it's confusing just want to make sure I understand. Edit: I started from scratch on an entirely new world same exact thing. Works fine. Maybe I broke my test world lol
@sophiamaples2775
@sophiamaples2775 2 жыл бұрын
This doesn't work I put it in my game and it still only fired in one direction a different direction but still not at the player
@cancercrab6487
@cancercrab6487 3 жыл бұрын
one thing not mentioned is this video is that the character has to be facing you at the star of the game. This may seem like common sense, but it caused me so much pain 😂
@loupandsnoop
@loupandsnoop 3 жыл бұрын
Sorry. I tried to correct it in the heat seeking rocket video....
@cancercrab6487
@cancercrab6487 3 жыл бұрын
Loup&Snoop All good. My comments may sound critical of your videos, but honestly thank you so much! You’re doing amazing work.
@bonniegamer2o236
@bonniegamer2o236 3 жыл бұрын
Is there a way to make the ai respawn
@loupandsnoop
@loupandsnoop 3 жыл бұрын
Not really. You just can't break it. Teleport it around instead.
@Galeboy
@Galeboy 3 жыл бұрын
Suggestion: How to make a day night cycle?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
There's probably no simple way to do this, as the world nodon has no inputs. You'd need to either rotate the whole game world, or swap game or related. But none of these solutions will be pretty.
@treehousegames7903
@treehousegames7903 3 жыл бұрын
I feel like swap game would be your best bet. [On Start]-[Timer]-[Swap Game] This would also easily allow you to have things be different at day and night. But keep in mind that if you want to save any data at all between the times you'll need [Swap Game]\ [× Calculator]-[Swap Game] [On Start]-[Timer]/
@loupandsnoop
@loupandsnoop 3 жыл бұрын
@@treehousegames7903 The issue with this is to save data, like the player's coordinates AND current state of the level. There are ways to save different parts of a level, but doing all that in one number will make a number that may exceed how big of a single number GBG can store.
@treehousegames7903
@treehousegames7903 3 жыл бұрын
@@loupandsnoop That is a good point, I didn't think of that...
@whospwow
@whospwow 2 жыл бұрын
just make a following but the follower movement speed is 0 lanch ocget boom (has spelling mistakes)
@treehousegames7903
@treehousegames7903 3 жыл бұрын
...but... then... how do you *not* die...?
@ecbongar60
@ecbongar60 3 жыл бұрын
yes
@Verpa11
@Verpa11 3 жыл бұрын
Yeah Mathe
@tailsmilesprower9451
@tailsmilesprower9451 3 жыл бұрын
What about a 2D game
@jootkujoanimsyt8202
@jootkujoanimsyt8202 3 жыл бұрын
Congrats On Remaking Minecraft Skeletons 👏😐
@themagnet7474
@themagnet7474 3 жыл бұрын
I must be missing something. From the start. My ai never moved.
@loupandsnoop
@loupandsnoop 3 жыл бұрын
Try downloading the sample code.
@sophiamaples2775
@sophiamaples2775 2 жыл бұрын
@@loupandsnoop WHY IS THERE SAMPLE CODE
@loupandsnoop
@loupandsnoop 2 жыл бұрын
@@sophiamaples2775 To make your life easier
@DylanRosarioGamingOfficial
@DylanRosarioGamingOfficial Жыл бұрын
Memes Memes Memes Memes Memes me a me a Memes Memes
@Anormalyoutuber2255
@Anormalyoutuber2255 2 жыл бұрын
Sniper bot
@Poisonations
@Poisonations Жыл бұрын
436th like
@DejectingArt
@DejectingArt 3 жыл бұрын
How did you make the damage blood on the screen?
@loupandsnoop
@loupandsnoop 3 жыл бұрын
check the head nodon setup at the top left in the sample code.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
黑天使被操控了#short #angel #clown
00:40
Super Beauty team
Рет қаралды 61 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
[Game Builder Garage Tutorial] Enemy AI
7:00
Oribloop
Рет қаралды 108 М.
2D Enemy AI: Game Builder Garage Tutorial
22:23
All Da Bois
Рет қаралды 35 М.
[Game Builder Garage Tutorial] Door
10:49
Oribloop
Рет қаралды 45 М.