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!
@bayliation14023 жыл бұрын
It ok
@airorello62903 жыл бұрын
Of course, the one class I thought I never needed is the one I need now... Trig...
@onlypuppy73 жыл бұрын
Again, you have a great understanding of the game and how to work within its limits. Nice work!
@lordneeko3 жыл бұрын
Math Student: We are we ever going to have to use this?!? Nintendo: Guess this game isn't for you.
@Magillt-13 жыл бұрын
10:49 simple solution, attach the enemy's location sensor to the gun instead
@ronn2013 жыл бұрын
Incredible! Seriously incredible! I can't believe you figured this out weeks ago! Good job!
@RAAAAAHHHHHHH3 жыл бұрын
Absolutely amazing thumbnail and a great guide too
@robfrydryck1273 жыл бұрын
Thank you so much! I needed this so bad!
@shade0413 жыл бұрын
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?
@loupandsnoop3 жыл бұрын
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.
@theelitemyt3 жыл бұрын
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!
@theelitemyt3 жыл бұрын
Never mind - all a matter of rotating and launch angles!
@JoelTheParrot3 жыл бұрын
Thanks! This'll help with a plan I had
@SolidVerse3 жыл бұрын
Could it be possible to have lightsaber blocking mechanics, where you block a blaster fire and reflect it back at the enemy?
@loupandsnoop3 жыл бұрын
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.
@SolidVerse3 жыл бұрын
@@loupandsnoop As is the nature of video game programing
@JeffJubilant3 жыл бұрын
How did you apply a texture to only the World ceiling?
@loupandsnoop3 жыл бұрын
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-ramenartist97343 жыл бұрын
Absolute legend
@TDG_gaming_30933 жыл бұрын
7:00 what is the nod on connected to the anchor point? Edit: nvm it’s a touch sensor. Just so you know
@RealLilChopstick3 жыл бұрын
Is there any way to play a sound effect when a projectile is fired from the AI?
@loupandsnoop3 жыл бұрын
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.
@RealLilChopstick3 жыл бұрын
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?
@loupandsnoop3 жыл бұрын
@@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)
@mofoluwasoomololu62792 жыл бұрын
Tip use a touch sensor to give it a range
@loupandsnoop2 жыл бұрын
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.
@truthbydesign51463 жыл бұрын
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 ..
@SirRebrl2 жыл бұрын
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.
@digglystyleanimations3 жыл бұрын
How can you make it so that a certain amount of hits can destroy an enemy?
@firetobstertheultimate27323 жыл бұрын
Yeah like I'm trying to recreate Mario level 1-1 and I'm having trouble with geting the koopa working
@loupandsnoop3 жыл бұрын
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.
@bgbong03 жыл бұрын
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.
@CadiaCreations3 жыл бұрын
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-ricardokuhn17132 жыл бұрын
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*
@normad883 жыл бұрын
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?
@jonathancrews1693 жыл бұрын
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.
@lrgogo15173 жыл бұрын
Did that joke need the *entire* “NO GOD” scene?
@loupandsnoop3 жыл бұрын
Great question! Yes it did.
@theguy97773 жыл бұрын
How to make diolauge when you press ZR near an npc
@loupandsnoop3 жыл бұрын
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.
@BlooJooce3 жыл бұрын
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
@loupandsnoop3 жыл бұрын
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.
@BlooJooce3 жыл бұрын
@@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
@sophiamaples27752 жыл бұрын
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
@cancercrab64873 жыл бұрын
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 😂
@loupandsnoop3 жыл бұрын
Sorry. I tried to correct it in the heat seeking rocket video....
@cancercrab64873 жыл бұрын
Loup&Snoop All good. My comments may sound critical of your videos, but honestly thank you so much! You’re doing amazing work.
@bonniegamer2o2363 жыл бұрын
Is there a way to make the ai respawn
@loupandsnoop3 жыл бұрын
Not really. You just can't break it. Teleport it around instead.
@Galeboy3 жыл бұрын
Suggestion: How to make a day night cycle?
@loupandsnoop3 жыл бұрын
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.
@treehousegames79033 жыл бұрын
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]/
@loupandsnoop3 жыл бұрын
@@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.
@treehousegames79033 жыл бұрын
@@loupandsnoop That is a good point, I didn't think of that...
@whospwow2 жыл бұрын
just make a following but the follower movement speed is 0 lanch ocget boom (has spelling mistakes)
@treehousegames79033 жыл бұрын
...but... then... how do you *not* die...?
@ecbongar603 жыл бұрын
yes
@Verpa113 жыл бұрын
Yeah Mathe
@tailsmilesprower94513 жыл бұрын
What about a 2D game
@jootkujoanimsyt82023 жыл бұрын
Congrats On Remaking Minecraft Skeletons 👏😐
@themagnet74743 жыл бұрын
I must be missing something. From the start. My ai never moved.
@loupandsnoop3 жыл бұрын
Try downloading the sample code.
@sophiamaples27752 жыл бұрын
@@loupandsnoop WHY IS THERE SAMPLE CODE
@loupandsnoop2 жыл бұрын
@@sophiamaples2775 To make your life easier
@DylanRosarioGamingOfficial Жыл бұрын
Memes Memes Memes Memes Memes me a me a Memes Memes
@Anormalyoutuber22552 жыл бұрын
Sniper bot
@Poisonations Жыл бұрын
436th like
@DejectingArt3 жыл бұрын
How did you make the damage blood on the screen?
@loupandsnoop3 жыл бұрын
check the head nodon setup at the top left in the sample code.