object doubling itself. please help.

Get help using Construct 2

Post » Wed May 22, 2013 4:00 pm

Hi there. Got an odd problem.

I have an event where if Object A collides with Object B under certain conditions, go to layout whatever.

It goes to the next layout just fine, however, if I already have Object A in the next layout I end up with two on top of each other, as though the one from the first layer carried over.

If I go to another layout I end up with three, and so on.

I've managed to sort of solve the problem by only putting the player Object A in the first layout, but I would like to know why that worked. I checked and the object isn't set to global. Any ideas?

Thanks.
B
7
Posts: 4
Reputation: 283

Post » Wed May 22, 2013 11:28 pm

Without a sample capx, it's difficult to ascertain why this problem might be happening. Are you creating object A in an "On Start of Layout" event anywhere?
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Thu May 23, 2013 12:41 am

It sounds like there was an instance in each level you were entering, and if so you would have two being present in the layout at the same time, both controlled by the same conditions to get over this its best to just have one instance in your project, as it sounds like you have done...
As long as I can move left, right and fire, I'm Happy...
B
42
S
15
G
11
Posts: 655
Reputation: 12,260

Post » Fri May 24, 2013 12:18 am

I would have posted the file but I'm actually new to forums in general and don't know how. It doesn't create it at start of layout. I have it set to destroy the object at Start and then spawn at a certain point. The method of having it in only the first layout works in combination with this, I'm wondering why at this point.

Thanks for responding guys!
B
7
Posts: 4
Reputation: 283


Return to How do I....?

Who is online

Users browsing this forum: a1oleg, DemantDigitalArt, GSquadron, jeffige, MarkThomas, paala and 21 guests