Spawn 3 Times Only Spawns 1 ?

Get help using Construct 2

Post » Mon Feb 11, 2013 3:23 pm

Spawn 3 Times Only Spawns 1 ?

Hi,

I am trying to spawn 3 large asteroids for my game project now.
You can see code below - problem is only 1 large asteroid is spawned?

Developer screenshot(what am I doing wrong?):

Hope you can help, thanks!

JeZ+Lee
B
11
S
3
G
4
Posts: 105
Reputation: 2,950

Post » Mon Feb 11, 2013 3:35 pm

You are spawning them on top of each other. Check create object action in system menu, probably more suited for what you are doing.
B
24
S
8
G
7
Posts: 756
Reputation: 7,202

Post » Mon Feb 11, 2013 3:41 pm

[QUOTE=vee41] You are spawning them on top of each other. Check create object action in system menu, probably more suited for what you are doing.[/QUOTE]Hi,

That works, but all 3 large asteroids have the same x,y start position?

How can I randomize the x,y start positions of the 3 large asteroids,
while keeping them at the edges of the game screen away from player?

Thanks!

JeZ+Lee
B
11
S
3
G
4
Posts: 105
Reputation: 2,950

Post » Mon Feb 11, 2013 4:16 pm

You could so something like in this example:

Evil sprites example

There are lots of ways to do it, this is a simple approach where you define the spawn range from the middle of the layout (scrollX, scrollY).
B
24
S
8
G
7
Posts: 756
Reputation: 7,202


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 30 guests