Loot chests all opening instead of just the one clicked

Get help using Construct 2

Post » Wed Jul 22, 2015 5:22 pm

So i've put loot chests into my game and when clicked you get a box pop up and get random loot then the chest changes to an empty un-clickable chest

The problem i have is when i click on one and it turns empty all the others turn empty too as i am using the same sprite for each chest,

Is there a way to fix this or do i have to make every chest a different sprite and copy all the loot events to the new chest sprites?



Hope that makes sense :)
B
22
S
6
G
2
Posts: 30
Reputation: 1,879

Post » Wed Jul 22, 2015 5:31 pm

This sounds like a simple picking problem..
You aren't just picking the one chest in your events so the actions are performed on all..

If you could give a screenshot of the relevant events on your event sheet or share your capx it would be much easier to explain how to get it right..
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 » Wed Jul 22, 2015 5:38 pm

Image
B
22
S
6
G
2
Posts: 30
Reputation: 1,879

Post » Wed Jul 22, 2015 5:39 pm

its probably not the most ideal way of doing it, but all i could come up with :)
B
22
S
6
G
2
Posts: 30
Reputation: 1,879

Post » Wed Jul 22, 2015 7:32 pm

LittleStain wrote:This sounds like a simple picking problem..
You aren't just picking the one chest in your events so the actions are performed on all..

If you could give a screenshot of the relevant events on your event sheet or share your capx it would be much easier to explain how to get it right..



nice one, you answered my question in this haha :)
i played around with the pick instances and got it working with pick overlapping point, mouse.x , mouse.y
Thanks alot :)
B
22
S
6
G
2
Posts: 30
Reputation: 1,879

Post » Thu Jul 23, 2015 4:38 pm

I've come across this helping someone else.
You would have to start with the Chest object instead of the mouse object. That way each chest executes its own code, instead of one mouse click executes all chests code.

Chest is overlapping mouse
--left mouse button clicked
----(execute code)
B
5
S
1
Posts: 23
Reputation: 426


Return to How do I....?

Who is online

Users browsing this forum: KTML5 and 19 guests