Poll: merge attributes in to behaviors

Discussion and feedback on Construct 2

Post » Tue Apr 05, 2011 1:21 pm

Yes, you should be able to enable and disable behaviors in families, as well as on a per-instance basis. As with attributes they will appear in object pickers so you can do the for-each you proposed.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Apr 05, 2011 1:37 pm

[quote="Ashley":12hxryr8]
Something else to consider is we're planning a new model for families when we get round to them. Objects will inherit the variables and behaviors from the families they're in. So instead of family variables and behaviors being all-those-in-common, you define them seperately and all objects in the family get them, no questions asked. In this case, you can add a 'Sprite solids' family with a solid behavior, and any object in that family also gets the solid behavior. This way you get both! You can make an object solid either by adding the behavior, or adding to a family you made with a solid behavior.

With that in mind, does this sound better?[/quote:12hxryr8]
perfect
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Apr 05, 2011 2:01 pm

[quote="Candescence":1k7x47pc]Also... Didn't someone mention the idea of creating behaviors/plugins using events a while back?[/quote:1k7x47pc]

Yes! Do this!

Adding a group of events instead of having hidden code is also a great idea!
B
8
S
2
G
5
Posts: 744
Reputation: 3,288

Post » Tue Apr 05, 2011 2:58 pm

Hm, as regards event-based behaviors, I think you can already do this in C0.x via attributes.
Somthing like:
Add custom attribute "MyPlatformBehavior", then "For each MyPlatformBehavior" -> ...your code
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Tue Apr 05, 2011 5:16 pm

I don't think so; you can't perform actions on attributes. You can't say MyAttribute -> set x, since different object types can have the same attribute.

And that sounds good Ash, I like the idea of giving families behaviors. The inheriting of variables is what I proposed before, so that's nice.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Tue Apr 05, 2011 7:14 pm

Oh, you are right, can't apply actions to attributes.
Well, at least it can be done for one-type objects with families or even families+pv
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 10 guests