For those looking for the sound effect section it is at 9:12
@gandalfthegay82843 жыл бұрын
I realize this was posted almost 3 years ago but it definitely helped a lot , thanks lol :)
@mythirdwish4 жыл бұрын
THANK YOU! My Ludum Dare project was gonna be so laggy without this!
@lNitroxin4 жыл бұрын
Yw! Glad I could help! :)
@gaberuth25004 жыл бұрын
Perfect tutorial, straight to the point, and stayed on topic. Thanks.
@lNitroxin4 жыл бұрын
Thank you! Glad I could help :)
@cengiztezel45764 жыл бұрын
@@lNitroxin HOW DID YOU make the particle system?
@lNitroxin4 жыл бұрын
@@cengiztezel4576 A lot of people have been asking me so I think I will most likely make a video on how to make some cool 3D particle effects like this soon when I find the time. In the meantime I also have a different video I uploaded on my channel that covers a lot about the particle system, hope that can help a little bit until then :)
@bennydaboy69844 жыл бұрын
Finally i find something useful
@ithanhunt32504 жыл бұрын
*HOW DID YOU make the particle system ..Enemy Death Effects ??*
@sypo_x18914 жыл бұрын
i came for that too😂
@lNitroxin4 жыл бұрын
This is an extremely late response, I apologize for the wait. Life has been very busy lately, but I have recorded a video on how to make that particle effect that I will be uploading sometime this week since a lot of people have asked.
@kagigreenscreen5 жыл бұрын
finally a proper tutorial on this that works - much appreciated! Been searching for this for ages all the others never worked for me cheers mate! from OZ
@bnebbneb22925 жыл бұрын
Do I have to create my own particle effect for this?
@lNitroxin5 жыл бұрын
Thank you! It's awesome knowing it could help people :) I'm gonna try to upload a new video on how to create effects using the particle system
@lNitroxin5 жыл бұрын
@@bnebbneb2292 yes you need to create the effect yourself, this would work with any other object you decide to spawn in though, I'm going to make a video on how to create one since so many people seem to want it
@bnebbneb22925 жыл бұрын
@@lNitroxin Yes pleasee! I just want a shredded cube type of effect, kinda like yours, so when my Player ball hits the platform, the platform looks like it's destroyed in pieces. Also would you be able to put a link for the script in description?
@TurbulentGamer5 жыл бұрын
@@bnebbneb2292 are you so desperate? just type the code for yourself and learn. you wont learn anything from copying
@bregevgen23 жыл бұрын
My deepest gratitude. I am very appreciated for your guidance.
@ayokuanimation17715 жыл бұрын
thank you sooo much Ive been looking for a working explosion for a hot minute! WHOO!
@lNitroxin5 жыл бұрын
You're welcome! I'm happy to help :) I hope to be making some more tutorials once I'm done working on a big project ^-^
@lahirudissanayake53364 жыл бұрын
This is awesome. All de best. Wish you to have 1000 subs soon.
@unrealdevop4 жыл бұрын
Great Video, I was trying to figure this out for this game I was learning to build and this was exactly what I was looking for. Subscribed
@sufianahmad73374 жыл бұрын
Thank you, Sir, It really helps me. It was an easy and tension-free way of doing this.......... I tried PlayClipAtPoint but it was still working for the first diamond, but now I am instantiating an empty game object with a sound source and I don't think it makes any problem in my case. Thank you :)
@LeviKristo3 жыл бұрын
If your particle system is not instantiating make sure Play on Awake is turned ON on both particle systems
@XONRk4 жыл бұрын
why it not working i follow tutorial exactly but my enemy does not show partical effects whereas i put the effect in enemy plz help me😰😰😰😰
@Old_SDC4 жыл бұрын
Thanks for the tutorial! Is there a way you can do a tutorial on player death with animations please?
@lNitroxin4 жыл бұрын
Glad I could help! :) That sounds like a good idea for a video, someone else also wants me to do something with basic animations in unity so I'll probably make a video combining both of those. Atm I'm really busy due to college work but I'll hopefully get a video on that up soon!
@AboA7ma114 жыл бұрын
Thank you very much!! you've earned a sub!
@bhujangarecords74934 жыл бұрын
I am working on a little breakout clone. The bricks shall disappear after the second hit, but play a sound everytime they are hit. I can only make it play a sound the first time they are hit, but not the second time, when the gameobject gets destroyed, although I trigger the sound before the destroy event in the script. How can I fix this?
@lNitroxin4 жыл бұрын
What I've done to get around this sort of thing is to create a game object prefab with the AudioDource on it set to play on awake. And then when I want to play that sound I instantiate the object, and using my effect script like in this video you can then have that object get destroyed after a set amount of time. Essentially all you need to do is create an effect object like I did above and have your AudioSource on it, then the sound will play when you instantiate it, hope this helps :)
@bhujangarecords74934 жыл бұрын
@@lNitroxin Thanks for your reply, I will try it these days and let you know how it worked out.
@bhujangarecords74934 жыл бұрын
@@lNitroxin It works, thank you !
@lNitroxin4 жыл бұрын
@@bhujangarecords7493 Np! Glad I could help :)
@nuggetman10232 жыл бұрын
hey don't know if this will get through but every time my npc moves it has the particles in the floor what can I do if this is happening? i will make a short vid to show you what is going on.
@mohammadmohib31282 жыл бұрын
Hello you have two scripts in video one is effectobject and the other is enemy but i attached enemy script with my enemy but it could not work properlly please guide me
@flpe71114 жыл бұрын
Thank you, that helped me a lot
@rodsal3 жыл бұрын
5:23 , What line of code do you recommend using if I want the particles to be generated not in the same place as my enemy but rather to be generated with a different value in Y nothing else? Pd: Excellent tutorial!
@lNitroxin3 жыл бұрын
One way you should be able to do it would be to add a Vector3.up multiplied to another number to the object's transform.position. So the where I used "transform.position" you would instead use: "transform.positon + Vector3.up * variant" Where variant is whatever number (negative or positive) that is the distance you want it to be above or bellow the enemy. Alternatively, if you would like to set the Y value to a specific number you could use this in place of "transform.position" instead: "new Vector3(transform.position.x, YPOS, transform.position.z)" Where YPOS is your desired y position. Hope this helps! I'm not 100% sure since I'm doing it off the top of my head right now haha. Thank you! :)
@rodsal3 жыл бұрын
@@lNitroxin Thank you very much, I'll try it :)
@hriday6844 жыл бұрын
Those particles are amazing! Could you show how you've configured the Particle System?
@lNitroxin4 жыл бұрын
Thank you! a lot of people have been asking me about them so I will most likely make a video on how to make some cool 3D particle effects like it soon once I find the time. I also have a different video I uploaded on my channel that covers a lot about the particle system, hope that can help a little bit until then :)
@maximus4042 жыл бұрын
Works okay, but I get an error sometimes? Not always but sometimes.. The object of type 'ParticleSystem' has been destroyed but you are still trying to access it. Any clue?
@ardaaydin47712 жыл бұрын
Try to deactivate particle system or disabling the Mesh Renderer component instead of destroying it.
@SlugHunter774 жыл бұрын
Hey great video but I have a problem, I have set up the particle system so that when they instantiate they will shoot upwards but when I applied the prefab to one of my enemy gameobjects , the moment it dies the particles shoot in the wrong direction,to the left side.I have fiddled with the rotatation and position of the particle system and the enemy gameobject and it still shoots in the same direction and I havent been able to fix it.
@lNitroxin4 жыл бұрын
Make sure your particle effect object's rotation on the transform is set to 0 on all axis, then just use Quaternion.identity in your Instantiate method ( 5:28 ), hope that helps.
@SlugHunter774 жыл бұрын
@@lNitroxin Thanks for the fast reply.
@lordtwilight12245 жыл бұрын
можно вопрос, подскажите пожалуйста, как при выстреле заблокировать другие клавиши или хотя бы движение персонажа? how at a shot to block other keys, or at least the movement of the character?
@achucxeno35884 жыл бұрын
Thank you thank youu Love love you 💖⛩⛩💖💖
@TruixBeams3 жыл бұрын
what do I do if I can't add code because it makes errors?
@fischi36694 жыл бұрын
How did you make the particle system????
@lNitroxin4 жыл бұрын
A lot of people have been asking me recently so I think I will most likely make a video on how to make some cool 3D particle effects like this soon when I find the time. In the meantime I also have a different video on my channel that covers a lot about the particle system, hope that can help a little bit until then :)
@fischi36694 жыл бұрын
@@lNitroxin thank you so much, I appreciate it 🙏🙏
@LizzardKaze3 жыл бұрын
Great video! I learned how to create a death effect easily with your help. In my case, the particle also plays when I start the game though, after selecting "Play on awake". Is there a way to instantiate it without having my enemies explode when the game start?
@ardaaydin47712 жыл бұрын
You should use a start (or awake) function., I think.
@lordtwilight12245 жыл бұрын
как при движение объекта сделать deatheffect? у меня смещается вниз по оси y объект:/
@lNitroxin5 жыл бұрын
Whenever you instantiate the death effect make sure to pass in the transform.position for the object that died, ex: Instantiate(deathEffect, object.transform.position, Quaternion.identy); just make sure that the position you are passing into the Instantiate function is the position of the object that is dying. Hope this helps :)
@lordtwilight12245 жыл бұрын
Nomical Games thank you
@lNitroxin5 жыл бұрын
@@lordtwilight1224 np! Happy to help! :)
@adityachavan93764 жыл бұрын
my shake camera is not working
@lNitroxin4 жыл бұрын
My best advice would be to double check that you are running the coroutine properly using StartCoroutine(FunctionName()), if you still hit a dead end here is a link to the video I used to create this exact camera shake kzbin.info/www/bejne/b3Kcqp1ugNOAbsU
@sanjoe5335 жыл бұрын
Hey great tutorial but can i just ask where you got that death particle animation? Or if you made it yourself, have you uploaded a tutorial anywhere? Thanks
@lNitroxin5 жыл бұрын
Thank you! I created the animation using particle systems, this is my first tutorial ever so I currently don't have one on that, but I can make one in the future if that's something you are interested in :) I am currently almost finished with a big project that I will be uploading a video on and once that one goes up I can start making some more tutorials for sure.
@Basel-ll8fj3 жыл бұрын
Perfect
@PixelTB5 жыл бұрын
Hello, I like to add death effect to my player, for my player I already have player movement script collision script camera follow script, and I want to add death effect but I don't know how, can you help me?
@lNitroxin5 жыл бұрын
Ok so if u have the collision script ready then this portion of the video should help 5:07, when you create a prefab of your death effect you can reference it in the inspector, and then what I did in the video was create a Destroy method that first instantiates the effect and destroys the player immediately after (also note that you dont need your prefab reference at the top to be of type ParticleSystem, if you want you can just make it a GameObject and it should function the same), hope this helps :)
@PixelTB5 жыл бұрын
In my collision script I only had void OnCollisionEnter(Collision collisionInfo) { if (collisionInfo.collider.tag == "Obstacle") { movement.enabled = false; So if the player hits an obstacle, then the player won't be able to move, under that I added if (collision.collider.CompareTag("Obstacle")) { Destroy(); } public void Destroy() { Destroy(gameObject); } And it doesn't work, I am new in unity and I don't know a lot
@lNitroxin5 жыл бұрын
@@PixelTB Ok so what you will want to do is at the top of the scrip you want to reference the object like this : public GameObject playerDeathEffect; // You can call it whatever you want though and once you reference that in the unity inspector try rewriting your collision like this: void OnCollisionEnter(Collision collisionInfo) { if (collisionInfo.collider.CompareTag("Obstacle")) // You don't need to use CompareTag() but its a little bit faster from what I know { Destroy(); } } and then inside of the Destroy method you will want to have your movement disabled and to also instantiate the effect like this: public void Destroy() { movement.enabled = false; Instantiate(playerDeathEffect, transform.position, Quaternion.Identity); Destroy(gameObject); } make sure that in the Destroy method that the Destroy function will always go last so that you can do everything before it.
@PixelTB5 жыл бұрын
@@lNitroxin Thank you for replaying fast, and I will try it now.
@lNitroxin5 жыл бұрын
@@PixelTB No Problem! Happy to help :) Let me know if it works or if you have any other questions
@Akosiyawin4 жыл бұрын
Do you have a Tutorial on how to make that exploding particle? I really want to learn that. Coz I want to use that to my game too
@ruchitayapuram22224 жыл бұрын
if you find it by any chance please link it down here
A lot of people have been asking me so I think I will most likely make a video on how to make some cool 3D particle effects like this soon when I find the time. In the meantime I also have a different video I uploaded on my channel that covers a lot about the particle system, hope that can help a little bit until then :)
@bigcheese16776 жыл бұрын
Hi! I got a request to do a tutorial on this topic, so here is my attempt at creating a tutorial on how to implement enemy death effects and sounds into your game! I hope its helpful and clear, if not then leave me a comment and I can try my best to help. Keep in mind I am not the most experienced with Unity and am still learning a lot, this is my way of doing this and there are plenty of others. Hope you enjoy the tutorial! :)
@TH3wolf235 жыл бұрын
You are commenting with the wrong account LOL
@qmerk2661 Жыл бұрын
first off, nice vid, i really liked it! but i have a question. im new to all of this and i just got my death particle to work, couldnt seem to get what you shown to work in my game so i just went off trying different things, and ended up figuring out a way to get it to work but it seemed to easy.lol. and now im worried its just a bad way to do it. so i wanna ask someone that seems to know what they are talking about if this is bad to do.ill try to explain everything as best as i can. im in 2d, and want death particles when i die to spikes. so i added a "Obstacle" tag to my spikes and then have. void OnTriggerEnter2D(Collider2D collision) { if (collision.CompareTag("Obstacle")) { deathParticle.Play(); } and thats seriously it, and everything works great, but like i said, it seemed to easy compared to this vid. would this be ok to do?
@maxim68974 жыл бұрын
Why does my DeathParticle activate when I reload the main player
@lNitroxin4 жыл бұрын
Do you have the particle system in the scene when the game starts?
@kenshioya91183 жыл бұрын
I tried tying the script and it got errors so I need a download link to the script
@Player-fx3vt4 жыл бұрын
Whats the debugher your using i need it
@riyansh43924 жыл бұрын
Uhh..Your video is awesome but i want to know how to put sound when two blocks collide with each other
@mistercoder65944 жыл бұрын
GREAT VIDEO! i was looking for this, thank you so much i do have a problem tho , this is my code, but for some reason the particles dont activate, i checked the positions of my player, and enemy and well, there are 000. im really confused, could you please help me public class Enemy : MonoBehaviour { [Header("Unity Setup")] public ParticleSystem deathParticles; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } private void OnCollisionEnter2D(Collision2D collision) { if (collision.collider.CompareTag("Player")) { Destroy(); } } private void Destroy() { Instantiate(deathParticles, transform.position, Quaternion.identity); Destroy(gameObject, 0.1f); }
@lNitroxin4 жыл бұрын
Thank you sm! And as for your code it looks good to me! I think your problem might be within the inspector for the particle system, double check and make sure that playOnAwake is set to true on your particle system and that your FX script's time is set to a value greater than 0 if it isn't already. Hope this helps :)
@mistercoder65944 жыл бұрын
@@lNitroxin it helped, thank you so much !
@lNitroxin4 жыл бұрын
@@mistercoder6594 Np! Glad I could help :)
@reder1no5 жыл бұрын
How do you add the particles?
@ReikoTennosaar4 жыл бұрын
Hmm, my particles spawn underground. I followed your particle tutorial too. Help?
@lNitroxin4 жыл бұрын
Hi Reiko! Did you make sure to pass in the enemy position in your Instantiate method? That would be my first guess as to what's wrong
@ReikoTennosaar4 жыл бұрын
@@lNitroxin This is my code, i think everything is how it is in the video even tho i have few extra things :/. I also did this to obstacle (like new script changed few things) and they too spawn underground. using UnityEngine; using UnityEngine.Audio; public class PlayerCollision : MonoBehaviour { [Header("Unity Setup")] public ParticleSystem deathParticles; public AudioSource audioSource; public AudioClip PlayerDeathSound; void OnCollisionEnter (Collision collisionInfo) { if (collisionInfo.collider.tag == "Obstacle") { FindObjectOfType().EndGame(); audioSource.PlayOneShot(PlayerDeathSound); Destroy(); } } private void Destroy() { Instantiate(deathParticles, transform.position, Quaternion.identity); gameObject.active = false; } }
@lNitroxin4 жыл бұрын
@@ReikoTennosaar Reiko Your code looks good, I'm assuming the issue might be with your prefab for your effect, double check that your positions in the inspector for everything on and under your effect prefab are set to 0 0 0 for x y and z. If that still doesnt work, it could be something to do with how your player position is set up, I'm assuming your scripts attached to your player, if it's not then that would most likely be the issue since it's taking in the position of where the script is in the game world.
@ReikoTennosaar4 жыл бұрын
@@lNitroxin The problem was the prefab location. It was 0 -11 0 :D. Now i changed it to 0 0 0 and it works. To be honest i did not know that this affects it :P. Sorry for bothering you and thank you alot, have a nice day!
@lNitroxin4 жыл бұрын
@@ReikoTennosaar No problem! I'm glad I was able to help :)
@tastychicken48902 жыл бұрын
why do you sound dead inside? great video tho thnx very much
@marceloo72785 жыл бұрын
Thank you a lot
@BluePhantomStudio4 жыл бұрын
Bro plz decrease brightness my eyes got flashed for 1 min
@lNitroxin4 жыл бұрын
Sorry about that, I hate Unity's light theme too. My next videos should be using the Unity dark theme now that it's available for free, which will hopefully help with that.
@halukddddd4 жыл бұрын
thanks
@makoopay52503 жыл бұрын
HOW TO DO THIS IN 2D??????
@silent615 жыл бұрын
Sphere is not defined?
@XONRk4 жыл бұрын
Thank u very very much Amazing tutorial But I want to know after cube break then wait for 2 sec after restart the sceane can u please explain me how can I do this plz 🙂😀🙂 My english is fucking bad
@lNitroxin4 жыл бұрын
No worries with the English lol, I think I know what you mean :) To restart the scene 2 seconds after the cube dies you can use an IEnumerator function that waits for 2 seconds and then reloads the current scene, something like this: public IEnumerator Restart() { yield return new WaitForSeconds(2f); SceneManager.LoadScene(SceneManager.GetActiveScene.name); } Then you'd run that function when your player dies and it should do what you want. I would look up the unity documentation for Scene Management though as I don't know off the top of my head exactly what the built in functions for that our. Also make sure to include using UnityEngine.SceneManagement; at the top of the script, hope this helps :) P.S. To run an IEnumerator you have to write is like this: StartCoroutine(YourFunction()); so it would be StartCoroutine(Restart());
@deadzombie36184 жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine;
@soarexecutioner Жыл бұрын
нихрена не работает
@kenshioya91183 жыл бұрын
It’s not working HAIIIIYAAA
@Darth_Sottoth4 жыл бұрын
Did't work(
@muhammadahmadyousaf28244 жыл бұрын
you had already made the particle system .. so we learn nothing.
@lNitroxin4 жыл бұрын
The intent of the video is to teach you how to implement your already created effects into the game rather than creating them, I apologize as I realize I wasn't very clear on that. If you do want to learn how to create your own particle effects I uploaded a video on Unity's particle system to try and help familiarize people with it. I'll try to be more clear with my titles and explanations from now on, hope my other video can help a little bit better :)
@muhammadahmadyousaf28244 жыл бұрын
@@lNitroxin thanks a lot i was harsh before . Sorry for that . can you please give the link to that video where you explain everything in detail?
@lNitroxin4 жыл бұрын
@@muhammadahmadyousaf2824 No worries ur good :) Here is the link to the video: kzbin.info/www/bejne/bZm1iJukgZZ8jM0 It's not the exact particle system I created here but covers the particle system a lot, I hope it can help!