How do I replace an object by another?

Get help using Construct 2

Post » Tue Jul 15, 2014 8:47 pm

basically i want to replace a by b when a reaches, for example x<293
-thanks
B
4
S
1
Posts: 54
Reputation: 456

Post » Tue Jul 15, 2014 9:01 pm

x < 293 ? a > spawn another object "b"
a > destroy
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643

Post » Tue Jul 15, 2014 9:23 pm

@caiorosisca can u make things a bit easier for me? (im a new c2 user)
thanks
B
4
S
1
Posts: 54
Reputation: 456

Post » Tue Jul 15, 2014 10:07 pm

Ok, my solution is to have ObjectA creating a new object (ObjectB) at it's own position, then destroying itself.

Create an event that checks for ObjectA.X < 293, for actions choose ObjectA > Spawn another object> select ObjectB, choose the layer you want, and leave 0 on the image point box.
Next action is ObjectA > Destroy.

Another alternative, I'm not sure if that works in your case, is to only change the Sprite's animation frame (in case the objects are only visually different)
Please tag me with @caiorosisca if your post is refering to me :). I don't always follow the topics I answer.
B
11
S
4
G
1
Posts: 272
Reputation: 1,643


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests