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)
new component idea
Moderator: Moderators
new component idea
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=-
-=Hugo Rossi=-
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
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