new component idea

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
kattle87
Posts: 402
Joined: Wed Sep 26, 2007 9:06 am
Location: Italy

new component idea

Post by kattle87 »

Would it be usefull to add a "ZFunction" component similar to ZLibrary, but which is able to define only one function that can have other components as children? Or have a function in a ZExpression to call the execution of a "Group" component might also be an elegant solution.

EG: I create a function or a group called "refresh" that contains several "RefreshContent" components so that I can use it inside a ZExpression when I need it. I know there are other ways for doing this but this might be usefull for cleaness of code and for other nasty stuff (EG: the "remove model" posted by Tischk)
In the fall of 1972 President Nixon announced that the rate of increase of inflation was decreasing. This was the first time a sitting president used the third derivative to advance his case for reelection.
-=Hugo Rossi=-
User avatar
Kjell
Posts: 1879
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hmm,

It's a good idea, but I guess you wouldn't be able to pass any arguments like you can with functions defined in a ZLibrary, right? The general structure I use now is a Condition Component that checks whether the Function variable > 0, and every loop it subtracts 1 off that value .. so you can call the function multiple times per frame ( arguments are passed using a Array ). But I agree, it's workaround-ish :)

K
Post Reply