Firebullet i can?

hi to all…
i need to modify a value cooldown in second… have some suggest???


1 Like

If you want to keep shooting make it 0 sec, it make no time before the bullet and the other one .

Maybe make it 2 sec to 4sec make sense for a game.

thanks for your answer … my problem is that I have the character shooting … so when he fires the bullet it has to go at the end of the animation … and not every x seconds … because everything works but every time the character does the animation only once and the bullets come out continuously … I would like that every time a bullet comes out … preferably when I decide it … the character comes alive 1 time

don’t forget to put trigger once under your condition to make it only work once when you press shoot (E for example) everytime.

Something like

If you press “E”
Animation is finished
Trigger once > create an object " bullet"
add force to bullet to enemy position
Change “character” animation set “1”

Reverse if press “E”.
Change the animation set to 0 Trigger once

If thats didn’t help you after you try it . Please put a screenshot for what you want to ask about it. There is a good people here that can help you like that more easily.
Good luck

Thank you for your answer…
my problem is different … in the sense I would like to achieve
as long as I keep my finger pressed on the button … an animation that is not looped at its end ends and the gun continues to fire … but the animation stops …
i probably have to take out the firebullet and put in a normal bullet creation …
because I want to get that as long as I have my finger on the button the animation that is not looped when it reaches the end it restarts … and when it reaches frame x it gives birth to the bullet … so far everything is fine … it works … only that the animation it is done only once …

Go to your object and turn loop on to make it loop automatic.
If you want to do it manually read this topic

This talks about how to loop an animation manually …
I need that when I keep my finger on the fire button every few seconds a bullet starts ok ?? until I remove my finger … at this point for each bullet the character performs an animation … which is that of the gun firing … in my case the animation starts only once and then stops but the bullet keep exiting as set on firebullet …

Please check out this tutorial read all the parts and you will get a better idea how to make the game done.

in reality I already have the idea … there are just a few steps that I can’t … such as the one mentioned above …
if you use the firebullet behavior … you will know that every few seconds you set if you hold down the fire key a shot will go off ok ?? follow me?? I can’t synchronize the animation … or rather I have succeeded but it happens only once … and I need that at every stroke that starts the animation resumes … that’s all … that tutorial that you show me is very basic … I already saw it 2 years ago I think … thanks anyway …

No, it’s hard to follow you when you keep changing what you want.

Another requirement? If you want to synchronise the bullet firing with a particular animation frame, then you’ll need current animation condition to check the name of the animation that’s playing, and then use current animation frame to determine which frame of the animation is playing.

1 Like

yes but you didn’t understand … I don’t put every few seconds … and the behavior that adds it by itself … that’s why I’m saying that in my opinion I have to eliminate the firebullet behavior and I have to continue with a different system …
I am also trying to understand where it seems that I have changed my mind … it is not so … if you read well you understand that I am always talking about the same thing … and I apologize if perhaps I have not been clear
finally I do not have a new requirement … I am telling you exactly what happens … because I have programmed that at the third frame the bullet must come out … it happens only the first time … then the bullets continue to come out and the animation does not start anymore … but I repeat … I think it is firebullett behavior … as soon as I have a moment I remove that and try another method

My previous post described how to do this. You’ll need to check the current animation frame is 2 (the numbering is zero based). If you’ve done this and it still doesn’t work, then post a screen shot of the events.

animation 15 is death animation game have 2 paddle left and right… paddlefire is a button where i want adjust

so this is my best

now… do animation just 1 time… at frame 3 start a bullet and do all 1 time… i need repeat that until i leave my finger on the button…

How frequently do you want it to repeat? As it is, it’ll repeat every frame, so it will seem like your bullets are coming out in a short stream until the bullet count is 0.

Try this, it uses the cooldown period to pause between firings :

And this is how you get the compare numbers function :

Also, I’d recommend naming the animations, and referring to them by name. That way you aren’t restricted to their position in the animation settings, and it makes it easier to understand what each animation represents.

I never understand these things … why does it work like this ??? in fact I said the same thing you say but in a different way … I refer only to animation = 15 … if I put it as you say … that is, different from 15 it does not work … if I put it is not 15 it works. …
why then?

here where I marked in white would you mind explaining to me that you are saying why I didn’t understand it ???
if the behavior of the player “PLAYER.FIREBULLET” what would this sign mean? “::” and this then ?? what does it refer to ??? “CooldownTimeLeft ()”
how do i use upgrades … how do i increase the firing rate ??

thank you in advance…

The :: signals that the what is to follow is a parameter or function of the behaviour.

You know the cooldown period in the screen snip in your first thread? The CooldownTimeLeft() is a function that returns how much of the cooldown timer is still remaining. It counts down from whatever value you specified in the settings, and stops at 0.

You can change the cooldown period in the actions. By reducing the cooldown period, you’ll reduce the wait time between bullets, and increase the fire rate :

Not sure. I inverted the condition in my test project, and it worked fine :


in this way the animation will also be synchronized ???
because it is currently at frame 3 if the animation lasts one second and the bullet comes out at frame 3 … increasing the firing rate also means increasing the speed of the animation ???

ah and thanks for all the explanations they are really important !!!


You can reduce the bullet cooldown period to 1 second. After that, you’ll either need to speed up the animation, or reset the current frame to 1 when you set the animation :

1 Like