Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by EliteHedgehog56 · May 28, 2016 at 10:34 AM · muzzleflash

Mussle flash script file

hey guys I'm making a survival horror fps game and I'm trying to add muzzle flash script to my shotgun that emits the particle only when the left mouse key is pressed I've tired many scripts that people have put up on the forums for it but they all end up with compile errors when I copy and paste them in.

does anyone have a free muzzle flash script file that I can download for my project because I'm new to unity and have no idea how to 'drive' the script editor.

thanks

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image EliteHedgehog56 · May 29, 2016 at 11:22 AM 0
Share

Ok I'll give that a crack :P

avatar image Le-Pampelmuse EliteHedgehog56 · May 29, 2016 at 06:28 PM 1
Share

Don't write a comment as an answer. Use the comment function. Only when you want to write a solution to a question, use the answer function.

avatar image Mmmpies Le-Pampelmuse · May 29, 2016 at 08:10 PM 0
Share

Clicking on Add Your Reply @Le Pampelmuse jumps me down to a text box with the word Answer too high to see. So to most that Answer function looks like a Reply function.

I know you're trying to keep the forum neat but it does need some improvements like changing that link to say Add Your Answer. Then maybe new users might look for the comment link ins$$anonymous$$d.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by JedBeryll · May 28, 2016 at 10:46 AM

Make the particle system duration short (maybe equal to the lifetime). Turn off looping and turn off play on awake. Set emission to 0, add a burst: at time 0, particle count 1 if its sprite sheet, otherwise set it to whatever you want. Call Play() from the script whenever it is fired.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

45 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Adding muzzle flash to the unity 0 Answers

Adding muzzle flash to the gun.... 1 Answer

How to make a pyramid-ish shape from a cube in unity (for making a muzzle flash) 1 Answer

Particle System only playing on start and end of GetButton() 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges