Need help getting a WORKING automatic shooting script

Working on FPS stuck on shooting (New coder) (PlayCanvas | HTML5 Game Engine) I already have code for one but its quite messy

This is my project:

Ravioli Burglar Simulator by 18 Aliens

Various levels have guns, including automatic guns. Tell me if this is what you are looking for and I will try to help.

I am having quite a bit of trouble finding the guns in your project could you please direct me towards them

Well all guns have the model of a revolver as a placeholder but they all function differently.

There is a gun on the wall in the tutorial which actually acts like a revolver (because the model was made specifically for the tutorial).

In level 2 there is a semi auto handgun on a dresser in the upstairs far room.

In level 5 there is a single shot shotgun in the basement.

In level 7 there is a full auto submachine gun found on a table (on the far left side from where the van is pointing there is a room full of microwaves, the gun is in there).

And in level 8 there is a model 10 in the vehicle garage, but that requires getting a bunch of keys and it would probably take a while to get there.

I have not finished the rest of the levels.

I feel as if this is a good time to mention that I am on a school-issued computer and they have blocked itch.io so if you could please just tell me what level 7 is called in scenes that would be great please and thank you :sweat_smile:

Also when your project is launched the pointerLock does not get enabled

If you arent on itch then I really dont know where you are or what you are talking about. If you are trying to snoop through my actual playcanvas project then please dont do that im sick of people stealing my code.

Ah im terribly sorry i was unaware

I don’t think it’s the user’s intention to steal anything. It’s probably more miscommunication about how your example can be used. Apart from that, users are free to use code from any public project.

There really needs to be some limitation to that. Personally I would greatly prefer a system where people can lock their entire account, making other people unable to go into their editor but they cant go into other peoples editor either. That seems quite fair to me. Or at least some sort of required and clear accreditation clause, as I have literally seen people steal other peoples entire game, claim that they made everything in it, and try to make money from it.

With a personal plan you can make a project private.

Hi @devwok and welcome!

Since this is a frequently asked question, I decided to create an example project.

https://playcanvas.com/project/1267420/overview/basic-shooting

I hope it can help you and please let me know if you have any questions.

Why is this.delay decreasing from 0.1? It should be increasing and fire when greater than an attribute number. That way, the fire rate can be modified by an attribute and used for multiple different rates. I also noticed that the bullets can basically backwards long jump and theoretically pass through an object in 1 frame without actually hitting it.

Also, what is “untilities”

image

You know what I am just going to make my own rival first person shooter example that everyone can use, and it will be amazing.

I have no reason for it, so I will change it if that’s easier.

Not sure what you mean exactly with this, but how can this happen?

This is a known problem with fast moving objects. I’ll see if I can do something about this.

Things I use in the project, but not especially part of or necessary for the example.

This sounds great! :ok_hand:

I meant backwards long jump as in the bullets can phase through objects. Do you actually not know what a backwards long jump is? And I ask about the “untilities” because I thought it was a misspelling of utilities

No, I don’t know. What is it?

Yes it’s a misspelling, sorry.

The History of Super Mario 64’s BLJ - YouTube

Basically go too fast and in one frame pass through an object

1 Like

Thanks! I’m aware of this limitation, but it is up to the user whether this is a problem for their project or not. I don’t want to use a raycast in this example, because I like to keep the code simple and understandable.

Well ive been working on my own fps example and it is far better

Alucards first person shooting | Launch

1 Like