Creating different events for the same object

Get help using Construct 2

Post » Tue Jan 14, 2014 7:24 pm

Apologies if this has been answered before (and probably has) but I couldn't find an answer anywhere! I imported images into construct by dragging and dropping onto the layer. The image was of a button, so obviously I would like to have several of the same sprite doing different things, however I can't work out how to make the event sheet relate to one specific instance of the sprite as opposed to all of them!
B
4
S
1
Posts: 32
Reputation: 418

Post » Tue Jan 14, 2014 7:31 pm

For example: I have the button set to destroy the sprite and start a timer, but whenever I click another button of the same Image It does the same thing! Rather annoying. Very new at this! If you need clarity on what I want to do it is possible on gamesalad by editing the specific instance properties. But when I click "change instance properties" it just takes me to the event sheet page. Also, I have tried dragging the image in each time instead of copy and pasting but still didn't work
B
4
S
1
Posts: 32
Reputation: 418

Post » Tue Jan 14, 2014 7:49 pm

C2 picks all instances by default, unless you specify a means of picking just one. For example, make an instance variable and set a different value per button. Now add a pick event that evaluates the value you want, and only that one will be picked. Post a CAPX if you need help.
ImageImageImage
B
71
S
22
G
241
Posts: 3,734
Reputation: 134,494

Post » Tue Jan 14, 2014 7:50 pm

well you could pick by UID (unique ID) or a better way would be to add one sprite, set it up the way you want, then right-click it to Clone. This will create an identical object, but it will have a different name, therefore can be referenced differently.

Otherwise if you cut/paste the object, they all share the same name and you have to pick them individually by UID.
B
98
S
32
G
16
Posts: 1,204
Reputation: 16,715


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 44 guests