[SOLVED] Troubles with shooting in bursts

Almakos

  • Posts: 632
Hi,
I am trying to make player shoot 5 bullets at once (after I press button once) with short time delay between them.
So I came up with blocks in the attachment. But I can shoot only once and so far I failed to make actors spawn with short delay. Can someone advise what should I try next?
Thank you.

« Last Edit: July 15, 2012, 11:17:40 pm by Almakos »
Fishing Fantasy Trailer


kynbo

  • Posts: 139
Try something like this should work 8).
0.1 is bullet spacing
0.5 is shoot delay

Almakos

  • Posts: 632
Thank you, kynbo.

Now player can shoot properly once per 5 seconds, but bullet spacing doesn't work.
what happens is that bullets spawn after "bullet spacing" time, but all 5 at the same time.
I do understand that according to blocks you've suggested, that is how it is supposed to work (after 1 second repeat 5 times), but I don't understand how to separate them properly with "bullet spacing" time (create bullet, wait 1 sec, create bullet, wait 1 sec, create bullet, wait 1 sec, etc)...
Fishing Fantasy Trailer


Almakos

  • Posts: 632
best solution I came up with is this. but I won't be able to change bullets amount in burst if I want...so it would be nice if someone say how to achieve this result the right way
Fishing Fantasy Trailer


kynbo

  • Posts: 139
best solution I came up with is this. but I won't be able to change bullets amount in burst if I want...so it would be nice if someone say how to achieve this result the right way

Uh...No lol you are making it harder for yourself. In the attachment of your second post, change:
 "do after [1] seconds" to "do after [(1*current loop count)] seconds" (look at my attachment in first post)

Why?
-What you did in that behavior is that you repeat the process of creating bullets 5 times after 1 seconds without any spacing bullet time. After you change it to (1*current loop count), it will be like:

Create actor after [(1*0)] seconds
Create actor after [(1*1)] seconds
Create actor after [(1*2)] seconds
Create actor after [(1*3)] seconds
Create actor after [(1*4)] seconds

This way you can change the bullet "burst" amount freely
Hope you understand...I suck at explaining. LOL

Almakos

  • Posts: 632
no, that just I suck at reading. I haven't noticed that (0.1*current loop count) thingy at first.
Thank you so much. works exactly right now =)
Fishing Fantasy Trailer