Randomly Tint Sprites

0 favourites
  • 4 posts
From the Asset Store
Build your map with these isometric objects and terrains
  • Hi there,

    I'm playing around with some of the new FX in R100/101.

    Now my question: How can i randomly tint my Sprites (or parts of it)

    Here is a little Eample (*.capx) for a better Understanding what i mean:

    Example

    Hope you can help me out!

    Thanks

    KMag

  • I'm not sure if I understood your question, but I try..

    You can add some different colored block as animation frames of your "Blue" object.

    Then, editing the animation, you must set speed = 0.

    Now you have an animation in "freeze" state on the frame 0 (the first).

    To randomize the tint, you can use floor(random(numeberOfColours)) to set the frame of your object.

  • HatsuSakura

    hmm...what i mean is - when i click Left and Hold - only the new generated sprites should be new colored....

    KMag

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm sorry: I completely misunderstood your question..

    I tried this workaround (but it doesn't solve anything): I set to a random value an instance variable called "B" for the Blue object. Then I assigned the B value for the tint FX but while the B variable value was different for each Blue object, the tint was always the same.

    I think the reason is because Tint is specific for the object itself (read "global"). So even if an instance variable could be different for every Object, an effect defined as an FX of the Object can be only global..

    I hope you can solve this issue.

    let me know, because I'm interesting in this argument (now I manage colors with the frozen animation workaround...)

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