This is the video I was looking for to understand how to attach a specific item to a specific enemy. Now I get it.
@LOLFactory055 сағат бұрын
you can explain things SOOO GOOD i understood everything directly thank you mate!!!!
@NightRunStudio5 сағат бұрын
Glad to hear it! Thanks for taking the time to comment.
@cozmo_Comet8 ай бұрын
This is probably the best unity tutorial ive ever watched. The definitions and thorough explanations didnt just help me do this, but i also genuinely learnt a lot. Thank you!
@NightRunStudio8 ай бұрын
Wow... that's high praise. Thanks for sharing, and good luck with your project!
@DayvonR642 жыл бұрын
I really like the animation of the enemy, it's definitely a unique design. Yet another amazing tutorial!
@NightRunStudio2 жыл бұрын
Thanks! I’m really happy with how this mech has turned out so far.
@outcreep73372 жыл бұрын
I very recently switched from Roblox to Godot so I can't actually follow along with the tutorial. But absolutely love how you're actually explaining what each line of code is doing and not just telling the viewer to do what you're doing. There aren't many tutorials like this. I almost wish I was using Unity because of how clear this tutorial is!
@NightRunStudio2 жыл бұрын
Thanks for that! This is the best kind of encouragement. It’s so helpful to know that people are appreciating the explanations. Thanks, again!
@outcreep73372 жыл бұрын
@@NightRunStudio Np! I look forward to more content from you!
@georgewashingtonjuniord12902 жыл бұрын
OKAY, i mean it, really, and im someone really looking in depth to stuff and like to have detailed and precise explanations with visuals. YOU my friend (yes we are friends now, sorry mate) have the best tutorials out there. Props on the making and like the visuals, the pace, the intonations, the pauses... really well done. (btw im a teacher, so i dont say that lightly) :)
@NightRunStudio2 жыл бұрын
Haha! Thanks so much (my new bestie!). I so appreciate the positive, specific feedback (as a fellow teacher, I love the teacherly encouragement)! Cheers!
@mcgamer420911 ай бұрын
1 year and it still helped me out alot tyyy so much
@NightRunStudio11 ай бұрын
Glad to hear it! Good luck with your latest project.
@YouVSYouInspiration6 ай бұрын
Wow! Such an excellent tutorial! Learned a lot from this and you are great at explaining the why as you work through the code. I am trying to implement this as a system for enemies dropping health but wouldn't want them to drop every time. What would you suggest adding to the code for random drop based on a percentage? 🤔
@NightRunStudio6 ай бұрын
Have you ever worked with random.Range? You could create an integer called randomNum, set it using random.Range(1, 100) would get an integer out of 100, and then use an if statement so if the number is less than 50 it drops (if you want 50% chance). Hope that helps point you in the right direction!
@mysticowlgames9 ай бұрын
How do I manage the quantity of the drops? For example I want 5x Item1 and 1x Item2, then how do I set that up? Also how do I make the the loot to have force of sideways too like hollow knight?
@NightRunStudio9 ай бұрын
The way this one is set up, you would just have to drag multiple copies of the item into the array (so drag 3 potions in if you want it to drop 3 potions). As for having the item move to the side, you would just want to change the itemDrop scripts direction. Right now it uses Vector2.up, but you would want to change that to something like: new Vector2(1,1) (which would send it up and to the right). You could also randomize the x value to something like: new Vector2(Random.Range(-.5f, .5f), 1) * dropForce, which would give it a random horizontal value. Hope that helps!
@LavenderIV Жыл бұрын
Great video! How would I make the item a collectable item that adds to a score counter?
@NightRunStudio Жыл бұрын
I don't have a video on that exact topic. That said, I have one on keeping score based on destroying enemies, which is more or less the same concept. You could pretty easily adapt this as most of the code would be the same. Let me know if you have any questions! kzbin.info/www/bejne/fYmtfp2Nh6aYg7ssi=Cd1MhBF9X2iihSqk
@totallyoffgrid300814 күн бұрын
Could I use this same idea to have my enemy create a tower every time another tower is destroyed in the area? Using instantiate. Ie: if total towers is less than 3, instantiate enemy tower build. Then hopefully the enemy builds the tower and moves on with his patrol.
@NightRunStudio14 күн бұрын
That should work. Though you'd have to make sure it's instantiating in the correct position.
@smithjones61442 жыл бұрын
Graphics are nice
@NightRunStudio2 жыл бұрын
Awww... thanks!
@matthew5210 Жыл бұрын
You're saving my uni work right now, but how would I make it so the each item drops in random directions?
@NightRunStudio Жыл бұрын
Haha! Glad to hear the videos are going to good use :) At the moment, the code is set up to drop the items at the precise location of the enemy. If you wanted things to drop to one side, you would need to alter that line in the instantiate code. Instead of transform.position for the location, you would need something like transform.position + new Vector2(1, 0) this would set a location 1 unit to the right of the enemy. Depending on how much randomization you want, you could try a couple of things: 1) you roll a random number: int randomNumber = Random.Range(1,2); this would give you a random number from 1-2 (including 1 and 2). Now, you could have different spawns happen depending on which number comes up. For example, if you roll a 1, then you run an Instantiate code with a new Vector of 1,0, but if it rolls a 2 you instantiate with a new Vector added of -1, 0 I hope that helps. Good luck with you course!
@nikolozmetreveli24627 ай бұрын
For some reason public gameObject itemDrops doesn’t work on my game
@NightRunStudio7 ай бұрын
Do you have a script called itemDrops? If you don't have a script with that exact name it wont work (capitals and all).
@amoyze6745 Жыл бұрын
How to pickup the item?
@NightRunStudio Жыл бұрын
That really depends on what you want to do with the item. Do you already have an inventory system? If you just want the item to immediately do something (like restore health), that's pretty straightforward, but if you want to actually store the item it's pretty complex. I have a series on how to make a really simple inventory, as well as one for a more complex inventory if you are interested: kzbin.info/aero/PLSR2vNOypvs6eIxvTu-rYjw2Eyw57nZrU&si=OkHbl4CaTK9uqqz6 and kzbin.info/www/bejne/nXaqZaV7r5ylsLc
@herdisiswandi89211 ай бұрын
In my case the enemy dropped 2 items instead of 1. How to make the enemy drop 1 item, brother? I'am noob 😅😢
@NightRunStudio11 ай бұрын
How many different items did you put in your array? If you only put one item it should only drop one. If it’s firing twice, then I wonder if maybe you put this script on the object twice? (Sounds like it’s firing twice).
@herdisiswandi89211 ай бұрын
as you said apparently I put this script on different objects twice? sorry my bad@@NightRunStudio