How do I Get current instance Effect Value

0 favourites
  • 9 posts
From the Asset Store
A total of 214 high quality and unique magic sound effects suitable for RPG, Battle Arena and more!
  • I have some sprites in "colorable" family. It's easy to change colour of sprite with HSL effect, but when I need to read current sprite Hue Saturation or Lightness, there's no experssion to Get current instance effect value.

    It would be useful to have

    colorable.effect("HSL",0)[/code:u4dv5cov]
    to get value of 0 parameter in HSL Effect.
  • Couldn't you use LiteTween and TweenToEffect to do that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tweens are great for smooth animations, but what I need is expression to get sprite effect value, here's the picture:

  • Hey, I made this Capx a while ago but didn't post it because my internet was kinda bad, and i think this will work for now till we find another solution:

    [attachment=0:2hxcm8mn][/attachment:2hxcm8mn]

  • I've seen similar question before and I think the answer is you can't because it's a webgl thing, thus it is not accessible through system expression. I can't find the thread but if I'm not mistaken, there's a workaround by assigning the effect parameter with instance variable or normal variable. This way, you can get the effect value through variable.

    I'm probably wrong on the webgl thing, probably Ashley himself can explain why it is not accessible.

    Btw, it is interesting on how do you intend to use it in mathematical expression, can you share what are you trying to achieve?

  • I'm making effect editor in game

  • What DuckfaceNinja said. Link your effect parameters to variables. A bit of a workaround but you will have full control after that.

  • I made a quick thing, and i think it's what you needed?

    [attachment=0:5itrs2dd][/attachment:5itrs2dd]

  • I combined Your Solution Wisdoms with variables instead of tween to and lite tween.

    Works the same and event sheet look like this:

    I think this can be a temporary solution

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