Forcing Family name into all Family Variables?

New releases and general discussions.

Post » Tue Mar 31, 2009 1:45 pm

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:
Family.Value('Butt')

But I was thinking it would work better and without complications with multiple families if it was like:
Family.Value('Family.Butt')

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. :D
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Tue Mar 31, 2009 1:57 pm

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 :) )
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Mar 31, 2009 2:04 pm

If you use the family manager, you can ensure there's no variable messups or objects without a family variable.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Tue Mar 31, 2009 2:15 pm

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.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818

Post » Tue Mar 31, 2009 2:18 pm

Ah I see, that does make sense actually. You could manually name them that by hand though.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Wed Apr 01, 2009 10:58 am

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.
B
4
G
6
Posts: 32
Reputation: 1,514

Post » Wed Apr 01, 2009 10:11 pm

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 :/
B
2
S
2
G
4
Posts: 171
Reputation: 1,792

Post » Wed Apr 01, 2009 10:32 pm

I'd imagine it being optional as games have already implemented the old system.
B
5
S
2
G
3
Posts: 234
Reputation: 1,818


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests