Problem with do Action after End of Repeat condition

Get help using Construct 2

Post » Tue Oct 10, 2017 9:17 am

After LMB click i use REPEAT condition with wait 0.1s included to shot bullet

How can i run other action when REPEAT is finished?
B
10
S
2
Posts: 44
Reputation: 721

Post » Tue Oct 10, 2017 12:19 pm

Not sure I understand your question.. Do you mean something like this?
Image
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
125
Posts: 1,741
Reputation: 66,803

Post » Tue Oct 10, 2017 12:38 pm

dop2000 wrote:Not sure I understand your question.. Do you mean something like this?
Image


Sorry prabably because my english is not very well

After repeat 10 times gun should be destroyed BUT not earlier

when i set repeat X times

Events should wait for last bullet fired
B
10
S
2
Posts: 44
Reputation: 721

Post » Tue Oct 10, 2017 2:44 pm

As an example you can setup a instance variable for the gun like - "fired", and make check in every Condition ( is Gun.fired <= 10) if not - you make (Else) action which destroys gun . Also every shot action adds 1 to Gun.fired instance variable.
B
9
S
1
Posts: 65
Reputation: 861

Post » Tue Oct 10, 2017 2:51 pm

The right way would be to count the number of shots as MadScientist suggested.
But my example in the screenshot above also does what you want - fires 10 shots in 0.1s intervals and then destroys the gun.
Image

Did I help to fix a problem in your game? You can buy me a cup of coffee :) If you'd like to hire me, please see this post
B
17
S
9
G
125
Posts: 1,741
Reputation: 66,803


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 26 guests