Trouble with instances

Get help using Construct 2

Post » Sat Jan 24, 2015 9:14 pm

I have a flower that needs water every "x" seconds. This is indicated by spawning a small waterdrop object to an image point on the flower. I click the watering can and then click the flower. The waterdrop object is then destroyed. The problem is that it destroys all instances of the water drop instead of the instance that is associated with the clicked flower. I've tried several setups with instance variables, but my brain isn't connecting the dots. I wonder if anyone could help me out here? Attached is a stripped down version of my file with the problem. Thanks!
You do not have the required permissions to view the files attached to this post.
B
6
S
1
Posts: 28
Reputation: 554

Post » Sat Jan 24, 2015 9:27 pm

You're not picking any water instances, so by default they are all picked for destruction.

this will work in your case. You could also make one a container with the other in which case your original code would work.
Forum.capx
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sun Jan 25, 2015 6:37 am

So simple, Thanks!!
B
6
S
1
Posts: 28
Reputation: 554


Return to How do I....?

Who is online

Users browsing this forum: Exabot [Bot] and 38 guests