I need help with shooting script

In class we needed to code some sort of game, and they gave us some options to choose from, and I chose this, because, well, I already knew about it, and the others weren’t very good, so i need to make a school appropriate shooter, but i am stuck on a shooting script, if you can help i would appreciate it very very much,

What i need is reloading, ADS, variable (in editor) range, accuracy, damage, spread, bullet speed, magazine capacity, reload time, and a semi-auto mode, full-auto, and shotgun.

Hi @Gavin_Durbin! I understand you want to make an extensive shooting mechanism, but I recommend starting from the beginning. Now it is not clear what you expect from other forum users.

1 Like

Hello @Gavin_Durbin,

For the bullet mechanics in the script you can do:

For (0,0,-0.2); you can change it around to see if the bullet goes where a bullet is supposed to go.

I changed your line of code @Gabriel_Dobrzynski because it is translateLocal instead of translate.Local.

1 Like

Yeah, Last second I realised it was wrong. But everyone makes mistakes.

1 Like

Can i make the bullet effected by physics?

Do you mean the impact effect? I would use the particle system for this.


Sorry, I think I read it wrong. Yes, you can move the bullet with physics, if that is what you mean.

1 Like

with bullet drop?

You probably won’t need all the elements, but it might help to take a look at the project below.