0 Favourites

R79.3 Family Sprite Instance Wrong Var Values

  • 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

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Should be better in r79.4, can you check?

  • Tried out a couple of projects, everything looks spic and span. Thanks Ashley!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)