How can I make the particle color same as HSL effect from sprite?

0 favourites
  • 6 posts
From the Asset Store
Wind effect
$2.49 USD
Animated wind effect for objects, grass, trees, etc.
  • Hey, I'm adjusting the HSL (hue parameter) of a sprite randomly (diamond), and when they are destroyed and spawn particles I want the particles to be the same HUE as the original sprite.... How can I do it?

    I thought I could do something like in the value use: DIAMOND.AdjustHSL and its not available, them tried with DIAMOND.ColorValue but it doesnt change the color of the particle or it becomes completely black!

    Please help? Project attached!

    Tagged:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I haven't downloaded your project, but from the screen you posted, I noticed an error.

    In your event you are destroying the DIAMOND object, and then trying to access one of its variables.

    Reverse the two events, and destroy the diamond after retrieving its values.

  • Hi, yes, I noticed that and reversed but made no difference

    I need to save somehow the HSL of the sprite and then catch that value into the particle effect parameter... how is this done? Json?

  • You will need to make a variable that can store your Choose value and call it on destruction.

    I made a short tutorial video:

    youtu.be/E0-kQ2FN4BY

    Let me know if you have any issues

  • Hi, yes, I noticed that and reversed but made no difference

    I need to save somehow the HSL of the sprite and then catch that value into the particle effect parameter... how is this done? Json?

    You can create a variable inside the DIAMOND object (we can for example call the variable "hsl"). Upon creation of the DIAMANTE object you can assign the random value you want to the variable. At the time of particle generation, you can safely get the HSL value to copy the clicked diamond with DIAMOND.hsl.

  • thanks a lot man! winstreak

    that's great!

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