clone enemy every x seconds

Get help using Construct 2

Post » Wed Sep 25, 2013 12:50 pm

hi
im new to construct and have made a enemy with many objects and events attached to it. i would like multiple of this enemy to constantly spawn but keep the same events i have set up. any help is appreciated. thanks and have a nice day
B
4
Posts: 10
Reputation: 245

Post » Wed Sep 25, 2013 12:51 pm

what kind of objects and events its attached to it?
ImageImageImageImageImage
B
54
S
15
G
5
Posts: 852
Reputation: 11,346

Post » Wed Sep 25, 2013 12:57 pm

objects attached are sprites, two particles a variable
and many events, hard to be specific on which type.
B
4
Posts: 10
Reputation: 245

Post » Wed Sep 25, 2013 1:15 pm

Insert the creation(and pinning...) in a function.

Events like On mouse already work for every Object.

Call this function every X seconds.


Edit: Dont forget to pick an instance if you call something like Object destroy.Darklinki2013-09-25 13:16:26
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Wed Sep 25, 2013 1:28 pm

thank you very much for your reply. please excuse my lack of knowledge but from what you said i have tried this.

-create a family with all objects of enemy

-create function(not familiar with these yet)

-added a action to a event which when the function is called it spawns family

-and i made another event with calls the function every x seconds.

but nothing happens.
B
4
Posts: 10
Reputation: 245

Post » Wed Sep 25, 2013 1:35 pm

Make a sample .capx can't tell you like that what's wrong :D
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Wed Sep 25, 2013 1:50 pm

very much appreciated but my project is in a bit of a mess, its been alot of experimenting and learning so i wouldnt want you to have to try and understand whats what. but thanks for the offer. is there any common ways to achieve what i want.
B
4
Posts: 10
Reputation: 245

Post » Wed Sep 25, 2013 1:54 pm

i just tried a global variable and every x seconds add 1 and when at 1 etc spawn family. but game just crashes... i think too much going on :(
B
4
Posts: 10
Reputation: 245

Post » Wed Sep 25, 2013 1:56 pm

you can keep posting all the outcomes but noone can help you without a .capx really..
B
46
S
15
G
73
Posts: 2,026
Reputation: 43,459

Post » Wed Sep 25, 2013 2:07 pm

Just make a small .capx with every x seconds and a sample of your function.
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Next

Return to How do I....?

Who is online

Users browsing this forum: Sparkz and 2 guests