Set effect from expression?
I think it would be useful to have the option to select an object's shader from an expression (great for custom level formats and editors). The shaders to include in an application could be determined in a similar way that you can right now select what sound and image filters to include.
That's just an idea though :)
Re: Set effect from expression?
Yes it's in the wish list, but I don't know when that will be done.
Re: Set effect from expression?
I think it's planned, but it would require some changes. The static dialog probably gets pre-checked, and all the effects that are being used in the application are compiled at start of frame.
Re: Set effect from expression?
Well, that's why I suggest an option to select which shaders to include in the app, just like you can manually select which sound and image filters to include.
...but then, I guess this is also a feature I can live without if I have to :)
Re: Set effect from expression?
Well, Yves said it's on the wish list, that means it will be added sooner or later anyway :)
Re: Set effect from expression?
yeah- if you have to select what pixel shaders you are including in the app anyway, it doesn't really help for levels editors and such. You are just as well off saving even a single number that defines which of the shaders to use. 1=water effect, 2=perspective, etc...
It isn't too much extra work to have events that parse that at the beginning of the frame to specific shaders you have included...
-Andy
Re: Set effect from expression?
I beg to differ. You'll need one event for every possible shader, instead of just a single action that does it all automatically. Sure, it's quick to add, but it's terribly inefficient. Imagine if a loop is iterating through the objects created on a given frame and setting all the shaders out of 50 possible ones. You'll need to run 50 "on loop" events on each object creation for each possible shader. Fastloops are a lot less fast than people think, just creating a bunch of objects and iterating through all those "on loops" events will result in a noticable pause in time during gameplay. I'm already facing this problem in something I'm working on.
If you specify what shaders to include in the application properties, and then get to set them using expressions, you'll get cleaner events that run a lot faster.
I'm not saying that Clickteam should add this, I'm just saying does make a difference.