R79.3 Family Sprite Instance Wrong Var Values

Bugs will be moved here once resolved.

Post » Tue Feb 14, 2012 9:14 pm

Created very simple capx to demonstrate another family variable bug.
Family Var Value Bug

In this capx file, I have three sprites, called ButtonA, ButtonB, ButtonC, all of which belong to FamilyButton. FamilyButton contains a family variable called "ButtonType" which has already been set to A, B, and C respectively for each Button's inherited family instance variable ButtonType. (I did this after I created a blank layout called Layout_Defaults which contains one instance of every sprite in the project, since if there are no instances, attempts to edit an instance variable result in check failure as per my previous post).

Now, in my main layout, I dragged ButtonA, ButtonB, and ButtonC to the layout, but to my surprise, all of the ButtonType var were set to 'C'.


Repro: (Just use my capx)
1. Open example capx
2. Drag any Button sprite onto Layout_Main.
3. Observe that the family instance var default value is the same for all of them.

NOTE: Programmatically creating instances of ButtonA/ButtonB/ButtonC through System.Create or Spawn calls retain the correct default values, showing A, B, C inside their ButtonType var.

-- cacotigon
B
30
S
6
G
8
Posts: 232
Reputation: 6,119

Post » Wed Feb 15, 2012 5:02 pm

Should be better in r79.4, can you check?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Thu Feb 16, 2012 8:34 pm

Tried out a couple of projects, everything looks spic and span. Thanks Ashley!
B
30
S
6
G
8
Posts: 232
Reputation: 6,119


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests