How do I resize instance of object

Just started using Construct 2? Post your questions here

Post » Thu Jan 07, 2016 4:23 pm

I have 5 objects of same type on the screen. When game is started i would like, when user click on this object to increase it's size. But right now size is increased of all objects of same type. Is there any way to increase size of just that instance of touched object?
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Thu Jan 07, 2016 4:41 pm

ButcherZV wrote:I have 5 objects of same type on the screen. When game is started i would like, when user click on this object to increase it's size. But right now size is increased of all objects of same type. Is there any way to increase size of just that instance of touched object?

Have you tried adding a "pick" event from System?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Thu Jan 07, 2016 4:57 pm

Zebbi wrote:
ButcherZV wrote:I have 5 objects of same type on the screen. When game is started i would like, when user click on this object to increase it's size. But right now size is increased of all objects of same type. Is there any way to increase size of just that instance of touched object?

Have you tried adding a "pick" event from System?


I saw that but i don't know how to use it. How do i get ID of that touched object?
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Thu Jan 07, 2016 6:24 pm

You should read "How events work" in the manual..

Sounds like you are dealing with an unreferenced object.
"On object touched" or "On object clicked" should be enough to reference the object.
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 » Fri Jan 08, 2016 9:11 am

LittleStain wrote:You should read "How events work" in the manual..

Sounds like you are dealing with an unreferenced object.
"On object touched" or "On object clicked" should be enough to reference the object.

I would assumed that was the condition they were using?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Fri Jan 08, 2016 12:12 pm

Here is capx
dropbox.com/s/y45pb1qyweowquk/sticker.capx?dl=0
B
14
S
3
G
1
Posts: 87
Reputation: 997

Post » Fri Jan 08, 2016 12:24 pm

Easiest way would be to use an instance variable (on the family?) instead of a global variable..
You aren't referencing an instance right now, so the action is performed on all instances..
If you search the forum for "select instance" you will probably find many examples..
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


Return to Beginner's Questions

Who is online

Users browsing this forum: celstrider, Yahoo [Bot] and 3 guests