[Solved] Difficulty using the timer for the same instance

Hello everyone, everything good ?

I’m trying to create a bullet hell style game and I’m struggling with some logic …

I am instantiating three instances of the same object (ship) at the beginning of the scene and at a certain distance a timer is triggered that causes the objects to fire a number of bullets.
I want these three instances to fire just a set number of bullet and then pause the timer. Example: Ship 1 = fire 3 bullets, Ship 2 = fire 4 bullets, Ship 3 = fire 1 bullet.

Would anyone know a solution for this?

I’m leaving the project link for better understanding


I thank you for your attention, thank you.

are you want the 3 ship shoot at once but different number of bullets? are you want one ship shoot all its bullets ( 4, 3 or 1) at once, or with a litle delay?

I want the 3 ships to shoot at once, but with a different number of bullets

how are you imagine shooting 4 bullets at once?

The first ship fires 4 bullets, the second ship fires 3 bullets, and the third one fires 1 bullet. After each ship has fired its quantity of bullets it stops firing.

unfortunately if you don’t understand the question, I can’t help it.

I’m really sorry I couldn’t understand.
Did you mean what would be the condition for the ship to shoot four bullets?

no. if you shot 4 bullets exactly the same time and exactly same direction, it will look like a single shot.

Got it.

Would you have any solution that comes close to the problem I mentioned ?

will be if I want to. I’m sure I can figure out, but I need to know every detail because i don’t want to work with it twice. thats why I asking questions instead of answering tham. because you withhold tha information.

I think Gyuszko is asking you what is the exact pattern of bullet fire that you have in mind.

For example
Tank 1 - fire 4 bullets simultaneously in linear path (same time, same direction). This would appear like one bullet being fired.
Fire 4 bullets at the same time in a spread formation (same time, bullets going in different directions).
Fire 4 bullets consecutively, along the same path (not at the same time, one after the other)
Fire 4 bullets consecutively, spread formation (not at the same time, and in different directions)

And then should all Tanks be firing their bullets at the same point in time, or do you want Tank 1 to fire bullets first, then stop… Switch to Tank 2 and fire it’s bullets… etc…

1 Like

fire 4 bullets consecutively, along the same path (not at the same time, one after the other)

And then all tanks must fire their bullets at the same time

done. how can I upload the project file back?

I shared a folder on my Google Drive, if you prefer, you can upload it to this folder. Thanks for the help and sorry for the inconvenience.

it’s upstairs in principle, but I’m not sure. did you find it?

1 Like

Yes, exactly that solution I needed, thank you very much.:blush::blush::blush:

1 Like

welcome. you can edit the topic"s title to mark the problem is solved like others. unfortunately we dont have a button in the interface to this.