How do I set a value from an Sprite parameter to slide bar?

0 favourites
  • 6 posts
From the Asset Store
3 different games for kids, easy to edit, mobile ready
  • I'm doing a shader generator on the user can modify the aspect in real time using the "slider bar" and text boxes.

    How can i get that when the layout is started> set the slide bar value of X parameter.

    The object have an efect called "Fire". The fire effect have 26 parameters (0 to 25). The idea is that when the layout is started the slide bar get the value of them.

    I already have a for that "on change" the slider the parameter change but obviously all the alider bar starts on 0. So i need that when the layout is started the slider value gets the initial value of each parameter but i can't find nothing ¿?.

  • If you are using the slider bar object, isn't this as simple as using the action "set value"

    And there is no reason for the slider bar to start at 0 for you can change the maximum value, minimum value and value at runtime..

  • I know, i can "set value" of the Slide Bar of something, the problem is that i not find where is the parameter of each variable of the effect to say "set value".

    In the options, i have "set value" of the Opacity object, Angle, X, and a lot of them but i can't find how to set the value of any parameters of some effect added to the object.

    yes i also now the minimu/maximun value at start, also the maximun steps,etc.... the problem is set the slider to the same number of the effect parameter.

    Edit: This:

    How i can set to the slider at the start of the layout the parameter of some effect?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not sure if it's possible to call them directly, but you could ofcourse use instance variables for them and use the set effect parameter to instance variable, than you could change the instance variable with the slider..

  • So if i have 40 sprites with 25 parameters each one i have to go one by one sprite and one by one parameter passing as instance variable? :S .

    I tried from yesterday another solution and nothing, I finally simply set at start layout the value of each Slidebar with the sprite reference while i find a better way, at least i can test the editor/configurator with one sprite.

    Maybe this will be a good idea for a feature request, i saw you can get a lot of information from a sprite but nothing from the effects parameters.

    So, there is no way to set automatically with one event using "for each" the values of each slide bar from some Effect Parameter of the sprite right?.

  • I'm guessing you could make a function to do this (that way you only have to write the actions once), maybe even using an array per sprite in a container and having it's values read instead of having to create a seperate action for everything..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)