Inheritance and functions, will this be supported?

Discussion and feedback on Construct 2

Post » Tue Feb 28, 2012 11:18 am

[QUOTE=rexrainbow] @valkyriegames

"Constructors and destructors" could be implemented by behavior. Do you need one?[/QUOTE]
There, fixed it for you.
B
35
S
8
G
8
Posts: 532
Reputation: 6,868

Post » Tue Feb 28, 2012 11:36 am

@valkyriegames
@Fimbul

SpriteExt
I put it in my small behavior plugin -- sprite extension.
Some sprite actions use combo box to select input value, it makes value assign a little difficult from a variable. So I make some direct assign actions.

Well, I add constructor and destructor into condition.

test capx

rexrainbow2012-02-28 11:47:42
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Tue Feb 28, 2012 1:05 pm

I know I said this elsewhere - family behaviors would greatly simplify things. I have to do all sorts of workarounds to emulate this.

Another thing: have a way to tell the object type from a family object. For example, at some point I picked an Enemy object. I want to have two subevents, one for Ogre and the other for Troll. Right now I added a variable "objectType" and I filter by it, but it would be nice to have a built-in property "typeof" or something.
B
14
S
5
G
7
Posts: 235
Reputation: 5,175

Post » Tue Feb 28, 2012 2:08 pm

Thanks for all the helpful comments guys!

[QUOTE=Animmaniac] Yes, it's possible to have the same functionality as a family tree, but you have to add each object individually to multiple families, instead of adding a family to another one (that would consequently add all the belonging objects automatically).
[/QUOTE]

It's a pity they don't allow adding a family to another - that would make things quite convenient! (Maybe the devs could think about doing it *hint hint* :D)

@SullyTheStrange and @Arima: The suggestions about simulating a constructor and destructor are fair alternatives, but I was hoping for a "language supported" way of doing it! Probably the most important thing that constructors and destructors allow is nice groupings of functionality to object types and makes the "code" much simpler and more readable.

[QUOTE=rexrainbow]
@valkyriegames

"Constructors and destructors" could be implemented by plugin. Do you need one?
[/QUOTE]

Would the plugin allow the "code" to be grouped together with the objects? If so, that would certainly be very useful!

[QUOTE=Fimbul] [QUOTE=rexrainbow] @valkyriegames

"Constructors and destructors" could be implemented by behavior. Do you need one?[/QUOTE]
There, fixed it for you.[/QUOTE]

lol Fimbul.
B
19
S
5
G
4
Posts: 85
Reputation: 4,925

Post » Tue Feb 28, 2012 2:14 pm

@rexrainbow

Nice! I hadn't realized that you made a plugin already. It looks great, I'm going to check it out now thanks! :D
B
19
S
5
G
4
Posts: 85
Reputation: 4,925

Previous

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests