Forcing Family name into all Family Variables?

This forum is currently in read-only mode.
From the Asset Store
A collection of various zombie characters sprites for creating a 2D platformer or sidescroller game
  • I was just thinking that, in a way to avoid problems with using multiple Families on one object and just for a sense of certainty overall, assigning a variable to an entire family, and then calling it should always require the name of the Family within the variable name in some way.

    Example of how it is now, if the Family has a variable called "butt", and I want to call it:


    But I was thinking it would work better and without complications with multiple families if it was like:


    The family name could be automatically forced upon the variable in the Event Sheet, not that you have to add the family name to the variable name when you name the variable.

    It's just a suggestion that would make handling variables with families a lot easier, and avoid conflictions. Hopefully such a thing is not too late to add, or at least in a "checkbox option"-kind of way.

  • I think it must be the blonde day for me today, but I totally missed the point here... could you elaborate, please?

    (By the way, you can skip the .Value suffix, like Family('Variable') is the same as Family.Value('Variable'). Just a tip to reduce the amount of typing )

  • If you use the family manager, you can ensure there's no variable messups or objects without a family variable.

  • I know I can manage it with family manager, but this was just an idea to automatically make it easier once you have several families for an object with a lot of values and keeping track of names within them.

    I could throw the family name into the variables by hand, I guess, but I was just thinking there could be an automatic option of sorts.

    I guess it was a redundant suggestion.

  • Ah I see, that does make sense actually. You could manually name them that by hand though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I agree with konjak that it would make sense in the long run to make family variables seperate. If you have objects with multiple families, each with a large amount of variables, keeping track could get pretty difficult.

  • i would argue that, when two nearly identical operations of different scope want to occupy the same semantic identifier, the liability to differ lies with the specific, not the generic. instead of requiring the family variable to be called by Sprite('Foo.Bar') just so we can confuse ourselfs by mistaking it for Sprite('Bar'), one should take care to name the private variable 'MyBar'.

    besides introducing another way to confuse yourself, i agree that namespace separation is not a bad idea. but you should not be required to include the family when calling the variable from the family itself. because Foo('Foo.Bar') is exactly that :/

  • I'd imagine it being optional as games have already implemented the old system.

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