- Home /
Halo still not accessible via script? Simple muzzle flash alternatives please?
I found that I was getting an error from GetComponent(); and I looked around and it seems like you cannot access the Halo component via script.
My intention was to use a Halo as a muzzle flash on a gun, having it turn on for a fraction of a second when a shot is fired and then be off again.
Can somebody point me in the direction of a different way to do muzzle flashes then? From what I've read, it sounds like some kind of particle system is my best bet, but there are multiple categories under "Legacy particles." Can anyone tell me which one I should look into, if that is a good way to go about this?
I have also seen talk of using a muzzle flash 2D texture or something but I would rather not take that approach. Nothing in my game is textured, I am using a very simple solid color + toon shader style and for the muzzle flash I would like something pretty similar to the Halo effect. This is a top down shooter if that helps your mental image of what I'm trying to do.
I would appreciate any tips! I don't need to be taught how to use a certain particle system or anything, I would just like to be told which one to teach myself! Meanwhile, I will explore my options myself of course.
"Legacy" is jargon meaning a system is being retired or replaced. Shuriken is the newer, superior particle system option. It's what gets created when you choose to create a Particle System through the Editor drop down menus, and is the component named and referred to as a Particle System throughout Unity. Its "type" or "class name" is ParticleSystem.
It is difficult to recommend a strategy for creating a muzzle flash effect without fully understanding your desired aesthetic.
@AlwaysSunny Thanks for the info! I'll look into it. I'm also currently considering using a light on the muzzle position that turns on when the gun is fired. I noticed that I can check a box "show halo" or something like that so it will illu$$anonymous$$ate the area and have the desired halo effect :)
Your answer
Follow this Question
Related Questions
MachineGun script applied damage to the object that is not hit. 1 Answer
Why is this returning false but somewhat true? 1 Answer
Muzzle flash stop when reloading? 3 Answers
How to add Muzzle Flash to Weapon 1 Answer
Gun sparks when firing gun. 4 Answers