0 Favourites

Loading, and Families, spawned extra instance

  • Problem Description

    ____ A concise description of your problem here ____

    (Family) On created - spawn sprite2

    Save game. Change layout

    Load game.

    Two (family spawned) sprites (sprite2) exist where only one is expected.

    When a Family uses the spawn action and a layout is saved and then loaded, that action somehow is creating two instances of the object.

    The capx makes it very clear.

    Attach a Capx

    ____ Upload a Capx to this post ____

    https://drive.google.com/open?id=0B0rmj ... mtvNm9ZeW8

    Description of Capx

    ____ Concise description of what this CapX does ____

    User spawns an instance from a family, family instance spawns an object (sprite2), save layout, go to new layout, load save and return to the first, now the family instance has created two sprite2s. Expected only one.

    Steps to Reproduce Bug

    • Step 1 run in debug (or don't I added a textbox that shows object count)
    • Step 2 click create menu button
    • Step 3 click save button
    • Step 4 click next layout button
    • Step 5 click go back to first layout button

    Observed Result

    ____ What happens? ____

    There are two instances of sprite2

    Expected Result

    ____ What do you expect to happen? ____

    Only one instance of sprite2 should exist

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet explorer: YES Operating System and Service Pack ____ Your operating system and service pack ____ windows 10 Construct 2 Version ID ____ Exact version ID of Construct 2 you're using ____ Construct 2 - 233 (64 bit)
  • Also it looks like sprite mirroring doesn't save and load properly

  • Updated to include the mirror bug example

    Description:

    When loading from a save, mirrored objects do not hold their mirroring. This could be a symptom of the family spawning an extra instance if you observe the sprites in the bottom right, the arrows should always face the same direction. When loading from a save an extra instance of the 'head' will appear and maintain the correct mirror while the actual head (pinned to the body) will mirror incorrectly upon hitting a bounding edge (green line)

    Download:

    https://drive.google.com/open?id=0B0rmjtd4YynXc0NjTVBYUmdJRUE

    Construct 2 Version: r233 (64 bit)

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Also experiencing this bug on double instances of families. Thought I was going nuts for a minute but then I figured it must be a bug. Ended up deleting the family but that didn't fix the issue. Still experiencing doubling of sprites.

  • Dont think 'the creating' is a bug. (1st post)

    When you go to next layout, menu is destroyed for memory reasons.

    When you return to previous layout, menu gets recreated, triggering the 'on create' (event 2). The first one was there because of loading gameslot. You have to code that a little differend.

    Move the actions under the 'on created' to the 'createmenu clicked' event block. Created problem solved.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
[Plugin] instance bank2
85 18,369
rexrainbow's avatar
rexrainbow
Unread hot topic
0 Favourites
[Plugin] Extra Expressions
39 15,649
Eren's avatar
Eren
Unread hot topic
52 3,006
Ashley's avatar
Ashley Construct Team Founder