Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0

Question

AU FPS v1.6 How to do smoke granade and grenade?

PLEASE HELP

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

To throw a grenade, you can instantiate an object, pressing a key - and then apply a force on its rigidbody. Using a coroutine, instantiate explosion FX after a while, destroying the previous intantiated object. Use sphereCast to apply damage inside a radius. To create a smoke grenade, there is many way to do that, but personnaly I would like to use plane and texture (always facing to player) playing with size, rotation and alpha. Maybe it could waste system ressource ++

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

Please login or register to see this link.

 

 

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

can you give me an example

Share this post


Link to post
Share on other sites
  • 0

Take a look at links which I shared. Each of them has its own example.

If you cannot integrate them in the FPS kit, I assume that you have to learn basics firstly. It's not a reproach - we did that too ++

Share this post


Link to post
Share on other sites
  • 0
Please login or register to see this quote.

As geckoo said, you can use that to make a grenade.

I will give you the guide using that(except the WaitForSeconds)

First, frag grenade:

make a bool that checks the player gets the key down.

Make a float which is the delay and a timer that equals the delay at the start.

if it gets the key down, the countdown goes down to 0(by seconds).

if the countdown goes to 0. Instantiate the object(grenade)

and in the frag grenade, make a script which will have also a delay(5 seconds, for example)

if it goes to 0, then Instantiate an explosion.

Use the sphereCast to catch the rigidbodies in the area, or the players to damage them(or both).

For rigidbodies, use rigidbodies.AddExplosionForce(force);

Smoke grenade:

Use the same steps, but instead of an explosion and SphereCast, use a smoke particle

and for details, make a trigger inside the smoke that if the player is near, the screen fades to gray.

Sorry if my English is bad, or my explanation is bad.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×