Family Solution

0 favourites
  • 15 posts
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • Problem Description

    Pick a family instance, tell the event system to spawn that exact instance in another location, it doesn't pick the correct instance to respawn. In fact, it appears to pick a random instance.

    Attach a Capx

    https://drive.google.com/file/d/0B_4xfu ... sp=sharing

    Description of Capx

    Holding down touch will make the object remain on screen, releasing will destroy the newly spawned object.

    Steps to Reproduce Bug

    • Run on PC or Mobile.
    • Touch or Click on the colored boxes on the top of the screen.
    • Notice the correct instance isn't picked...it seems random.

    Observed Result

    Correct instances are not picked, instead they may be picking randomly...

    Expected Result

    When I touch red it should spawn red, when I touch yellow it should spawn yellow, when I touch blue it should spawn blue, etc...

    Affected Browsers

    • Chrome: YES
    • FireFox: ?
    • Android OS: YES

    Operating System and Service Pack

    Windows 7 64 bit

    Construct 2 Version ID

    r-167.2

  • Does anyone know how to solve this???

  • That's the way families work. 'Create/Spawn', on a family, is random. You have to create the specific instance instead.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I thought the engine would be smart enough to know which instance of the family object I picked and then be able to reproduce that...Guess not..

  • I wonder if it would be easy enough to make families work this way, it sure seems logical and consistent with the way all of the other events work within C2.

    I was actually a little surprised that they didn't already work this way, it seems intuitive and simple that they would work just like this... - It would be a good feature to have...

  • I wonder if it would be easy enough to make families work this way, it sure seems logical and consistent with the way all of the other events work within C2.

    I was actually a little surprised that they didn't already work this way, it seems intuitive and simple that they would work just like this... - It would be a good feature to have...

    Yes i agree with you. It would be great if we have this feature and seperate feature for generate random family object instance (like currently we have).

  • I thought if there was already an SOL built list, then family create it would also create the same type. But it's not. in fact as I understand Random Family is far from being a bug. It is random specifically for the Randomness. So it is smart, it is by design to generate randomly. It's not an accident or incidental. It is a feature design.

  • Families generate a random instance if you create them alone in events, yes, but if you pick an instance of said family, should it not re-create that exact instance?

    In other words, there are easy ways of creating a random family instance, but not easy ways of creating a specific family instance using the family object.

  • Just to be specific,

    I have a nice little shop full of items. All of the items are under the family named "items", and I want the user to be able to touch an "items" object and have that "items" object display largely on the virtual table in front of them.

    I told Construct 2 to display the exact "items" object the user touched, but instead it picks a random item. Shouldn't Construct 2 display a random family instance if I tell it to display a family instance without picking one first, but if I specify which family instance I'm talking about, should it not display that instance, same as how all the other events work in Construct 2?

  • Same problem here and I'm not sure how to work aorund it ( obviosuly, I may repeat the same event for every object in the family but that's families for after all).

    Let me know if you figure out how to solve it.

  • Yep. There is no way to use any model of creating a specific family instance... officially. There is a plugin that let's you create an object based on a string naming paramater.

    I assure you I tried the same thing and thought the same thing. If you are doing Create Family, then the object will be random from the Family. If you Create Object which is in a family, then you will create the object..

    Do you need to create the object. If your using store items. Should you just use one object, but have numerous frames/animations to distinguish the items. Then just use setAnimation/Frame.

  • Closing as the originally reported issue is by design.

  • Ashley

    jayderyu

    That's fine, no hard feelings, but before you sweep this one under the rug as it were, consider for a moment just this -

    If I want to quickly make a family group. And display one item from that group with all of its associated family instance variables, and animations, etc...How would I do that using the family object to call them?

    An example for the more enlightened people listening to this thread: Take 50 unique items, each with their own instance variables (Cost, Item Number, Item Name, Description, etc.), and create an efficient piece of code that allows the user to click on any item and have that item display larger with all of its instance variables being picked and stored as local or global variables that can be used for the functionality of the store.

    I ask this with the belief that there is an extremely efficient solution, otherwise, shouldn't families be able to do this???

  • jayderyu - A fine suggestion - but I don't believe a single object can contain 50 various sets of animation dependent instance variables, nor would a single object with multiple animations serve to pick the correct instance variable along with each corresponding animation. If the solution is to simply code out each object individually, shouldn't there be a better, faster, stronger awesomer way???

    This is Construct 2 after all!

  • Hello everyone,

    This post has not been updated since a year ago. But I just bought the personal edition and started using the family feature, but i found the same issue, the exact same problem of the .capx with the color boxes, did you get any idea of how to deal with that ? Thanks

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