about instance objets

Get help using Construct 2

Post » Mon Jul 23, 2012 7:54 pm

Hello! When I create several objects that are an instance of an original that is located outside of the layout, how I can refer to one of them to apply for the position property that does not affect others? I hope you understand what I say. My English is very bad. Thank you!
B
6
Posts: 17
Reputation: 641

Post » Mon Jul 23, 2012 9:40 pm

You need to 'pick' a specific instance. C2 is very good at doing this automatically - can you name your exact situation, or show a capx, so we can help?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Tue Jul 24, 2012 12:47 pm

the best option would be that when an object is instanced/cloned, we have the option to give the new instance a name so that we can refer to it as a new sprite, independent of the main sprite it was cloned from.
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

Post » Tue Jul 24, 2012 1:12 pm

As sqiddster said, C2 is good at automatically picking a specific instance, but if you really want to have a named instance, then you could use a text instance variable to give the object a name and then use the Compare Instance Variable condition to do things to that specific instance.
Vote for all the Construct 2 games on Steam Greenlight - Find them here
B
27
S
7
G
4
Posts: 314
Reputation: 4,928

Post » Wed Jul 25, 2012 4:14 pm

Ok! Your information is very usefull!Thanks! :D
B
6
Posts: 17
Reputation: 641

Post » Mon Feb 11, 2013 12:36 pm

Hey guys,

sorry to bump an old thread, but it seemed close to what im after.

I've made instances of a collision box in my scene - lets say I have two doors, from same object. When I add the text instance variable to the first door, the second door inherits that variable too. Am i doing something wrong? I really dont want to have to clone that object if I dont have to.

Also when I rename the instance in the Properties panel, it renames for all instances with the same name (which leads me to think its changing the properties of the actual object and passing it to all instances). Is this the case? Is the only way to have instances independent from their source is to clone them in the Object Types folder?

B
6
Posts: 30
Reputation: 1,260


Return to How do I....?

Who is online

Users browsing this forum: flemmig, Matthew de, semaso, Skebab, Virpoja and 20 guests