Change the light color dynamically

Discussion in 'How Can I...?' started by Jagabum, Oct 17, 2015.

  1. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    I'm doing a scrolling game, and have a light that is fixed just off the screen that is white in colour at the start (background is white too).

    As the game progresses to the next stage, the background changes to yellow. Is it possible to also change the light to yellow too? Checked out the Transform item, don't think it can target light items? Anyone have any idea of a hack for that please?

    What i am trying to achieve is that when the objects scroll to the side of the game field, they appear faded off due to the white light. However when the background is changed to yellow, the white lighting becomes very obvious....
     
    Last edited: Oct 17, 2015
  2. wesam_badr

    wesam_badr Miniboss Boxer

    Joined:
    Oct 10, 2015
    Messages:
    1,065
    Likes Received:
    479
    the only thing that i can think of is to is use the powerup to change the character and make its duration long along the level
     
    Jagabum likes this.
  3. Phill Mason

    Phill Mason Serious Boxer

    Joined:
    Sep 25, 2015
    Messages:
    880
    Likes Received:
    721
    Hey @Jagabum, What about moving the white light out of the way to reveal the yellow one? I should think you could attach a transparent image to your light and set it to collide - wake up, collision based and zoom off the screen using linear velocity to get rid of the white light. So, when your character runs into the transparent image it activates and disappears. Might be worth playing around with to see if you can come up with some effect that works throughout your scene transitions.
     
    Jagabum likes this.
  4. Jagabum

    Jagabum Guest

    Joined:
    Sep 25, 2015
    Messages:
    25
    Likes Received:
    5
    thanks both west and phill! and i get what you mean phil, great suggestion! gonna give it a try and see how that works out! :)
     

Share This Page