How do I make a sprite spawn

Get help using Construct 2

Post » Wed May 24, 2017 4:45 pm

My problem is , when the sprite spawns the numbers of sprite is hundreds . and i want only 1 to spawn
B
5
S
1
Posts: 11
Reputation: 349

Post » Wed May 24, 2017 4:57 pm

Can you put a screenshot of the event that spawns the sprite?
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Wed May 24, 2017 5:09 pm

imhotep22 wrote:Can you put a screenshot of the event that spawns the sprite?


how to put image? sorry im new
B
5
S
1
Posts: 11
Reputation: 349

Post » Wed May 24, 2017 5:12 pm

Put it on http://tinypic.com/ and share the link here. You have to put as plain text until you get 500 rep, so write the link without the http and www.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Wed May 24, 2017 5:16 pm

Message: yuji567 can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
imhotep22 wrote:Put it on http://tinypic.com/ and share the link here. You have to put as plain text until you get 500 rep, so write the link without the http and www.


oh sorry here:

Image
B
5
S
1
Posts: 11
Reputation: 349

Post » Wed May 24, 2017 5:22 pm

The second condition is the problem, when the condition comes true construct executes it 60 times a second, that's why you get more then 1 spawns. They are several ways you can fix this, you can add another condition to the second event system -> trigger once while true, or you can destroy the sprite 7 after the second event triggers, in the action menu select sprite7 then destroy. Both of this will fix your problem.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Wed May 24, 2017 5:24 pm

imhotep22 wrote:The second condition is the problem, when the condition comes true construct executes it 60 times a second, that's why you get more then 1 spawns. They are several ways you can fix this, you can add another condition to the second event system -> trigger once while true, or you can destroy the sprite 7 after the second event triggers, in the action menu select sprite7 then destroy. Both of this will fix your problem.



then i should create a new sprite?? since ill destroy the sprite 7
B
5
S
1
Posts: 11
Reputation: 349

Post » Wed May 24, 2017 5:27 pm

Can you explain why do you need sprite 7? is it just to trigger the second condition or there's more to it?
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Post » Wed May 24, 2017 5:30 pm

imhotep22 wrote:Can you explain why do you need sprite 7? is it just to trigger the second condition or there's more to it?


to randomized my sprite 4 locations of spawn?
B
5
S
1
Posts: 11
Reputation: 349

Post » Wed May 24, 2017 5:33 pm

If you want to do that, there is no need for the second event at all. You can directly create the sprite 4 in the first event, change the action to system -> create object -> select sprite 4, select the layer, and on x y coordinate add the random location.
Like my work? Fallow me on social media, and see my games on the arcade.
B
7
S
5
G
9
Posts: 298
Reputation: 5,367

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests