Object spawns the other one

Get help using Construct 2

Post » Thu Jul 25, 2013 3:13 pm

Hello,
I need some help with spawning of the new objects.

I have several objects that have motion on different angles, how to set that object (when gets destroyed) spawns another one (i got to this point) or more and that newly spawned objects inherit parent's motion (direstion, speed and angle), this is the part that i cant solve... :(

Help!!!irina2013-07-25 15:54:08
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Thu Jul 25, 2013 3:25 pm

A spawns B
Set B.values to A.values
Destroy A
B
22
S
4
G
1
Posts: 100
Reputation: 2,150

Post » Thu Jul 25, 2013 3:48 pm

hm... i see your logic but i dont see that option or im doing something wrong!?

can you give me example for direction of movement or speed?
irina2013-07-25 15:53:40
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Thu Jul 25, 2013 4:14 pm

Here's an example for different objects with bullet behaviour:

B
10
S
1
Posts: 54
Reputation: 958

Post » Thu Jul 25, 2013 5:11 pm

@ NIKO

Thank you, exactly what i was looking for.

Cheers!
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Thu Jul 25, 2013 5:23 pm

One little problem .... i can make it work on destroyed but not on animation end... any ideas why?
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Thu Jul 25, 2013 6:11 pm

-Does the animation end on the moment you want the sprite spawned?

-Are you still destroying the sprite through an action AFTER setting all it's values over to the spawned sprite?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Thu Jul 25, 2013 6:55 pm

I have normal animation that loops and destroyed animation that takes over upon heatlth < 0.
Normal one is in loop so i guess it never ends and that's why it wont trigger the event, on the other hand it looks little awkward if new object just pops after destroyed animation and object being actually destroyed.

Ideal would be to spawn it in the middle of destroyed animation... but how to do that?

update...
iw suceed with 2 conditions: anim. playing and frame = 8 to spawn it in the middle of animation!!!!irina2013-07-25 19:13:41
B
26
S
11
G
2
Posts: 669
Reputation: 5,038

Post » Thu Jul 25, 2013 7:50 pm

That's quite a good solution, might use it myself as well. :P
B
10
S
1
Posts: 54
Reputation: 958


Return to How do I....?

Who is online

Users browsing this forum: ColombageEnPLS and 6 guests