Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperCube > Help with CopperCube
Shooting bullets continuously

astronomical
Registered User
Quote
2019-04-26 21:39:41

I'm probably doing this completely wrong, but I'd like to know if there's any way to shoot bullets from an object at a constant rate.

The way I have it now is by triggering from the space bar, every X ms, shoot object.

However, this seems to shoot one bullet, then a pause, then it continuously shoots. Is there a way around that so it doesn't shoot and pause?


behroz-khan
Registered User
Quote
2019-04-28 11:59:37

Simple! Just press the trigger continuously without releasing it! Ok I am just kidding!

Here's how:
Just add the behavior when a key is pressed change the variable "TriggerPress" to 1 and when released do it to 0.
Now every <FireRate in ms> (e.g 500 ms) milliseconds if "TriggerPress" is 1, shoot bullet!

CCB:
https://drive.google.com/open?id...


astronomical
Registered User
Quote
2019-04-29 22:54:12

Thank you, behroz-khan

I'm not very good with variables, so this is a great thing to start learning with.

Thanks again dude


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "?nternational" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact