R131 - Selecting family is not resulting the expec

Bugs will be moved here once resolved.

Post » Wed May 22, 2013 10:36 pm

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/47035927/temp/unexpected_result_selecting.capx

Steps to reproduce:
1. The code is designed to filter what sprite was selected in the family when you click over it;
2. The selected family object will be cloned to the mouse;

Observed result:
@Ashley, when selecting family is not resulting the expected Sprite object. Against it's giving a random family object.

Expected result:
Select the filtered sprite object;

Browsers affected:
Chrome: yes

Operating system & service pack:
Win 8 32 bits

Construct 2 version:
R131 - TELLES08082013-05-22 22:38:27
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,190
Reputation: 18,267

Post » Thu May 23, 2013 1:00 am

This is by design. If you pass a family to 'create object', it will pick a random member of the family and create that instead. You need to work around this by using e.g. an instance variable on each object that stores its type.
Scirra Founder
B
357
S
214
G
72
Posts: 22,946
Reputation: 178,228

Post » Thu May 23, 2013 5:13 pm

So simple? Like giving an ID for each object and then creating the object with the same ID as the placed objects on the canvas?

I'm just worried about how to setup it to create the object by checking their ID, maybe after checking the family, and the IDs, create the object using their object sprites and not the family object instead.

Will try this today.

Thank you.

Solved =]
https://dl.dropboxusercontent.com/u/47035927/Samples/placement.capxTELLES08082013-05-23 22:55:55
ImageImageImageImageImageImage
B
92
S
19
G
12
Posts: 1,190
Reputation: 18,267


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests