Change Color If Colide And Back To Original Color If Not Colide

Discussion in 'How Can I...?' started by vlilicbqko, Nov 28, 2019.

  1. vlilicbqko

    vlilicbqko Boxer

    Joined:
    Oct 8, 2015
    Messages:
    10
    Likes Received:
    1
    Hi Boxers,
    How i can change object color if he colide with character then he come back to original color.

    I try with "if colide" action and "set color" but to get return to original color i don't know ??
     
  2. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    Maybe it works with "State machine" node. Start -> If collide -> State (output 1) -> Set color.
    Start -> State (output 2) -> Set color (original color).
    Haven't tested it, just an idea.
     
  3. vlilicbqko

    vlilicbqko Boxer

    Joined:
    Oct 8, 2015
    Messages:
    10
    Likes Received:
    1
    Thank you for your reply Hanomax ... but this solution not working to me ... the object don't back to the original color.
     
  4. TheGameAppStudio

    TheGameAppStudio Serious Boxer

    Joined:
    Nov 2, 2016
    Messages:
    927
    Likes Received:
    318
    Click on object which you want to set color ...lets say original colour is black on collide with character set colour to red.Now go to advanced tab - drag and drop delay .Point set color done to delay in and on delay out point to another set color i.e original color with a delay time.
    Hope you understand :)
     
  5. vlilicbqko

    vlilicbqko Boxer

    Joined:
    Oct 8, 2015
    Messages:
    10
    Likes Received:
    1
    Thanks for your reply TheGameAppStudio.
    i try your solution? its work but depending the delay time. The original color return inspite of the objects still coliding. but i will based on this the finish my game.
     
    TheGameAppStudio likes this.
  6. Hanomax

    Hanomax Avid Boxer

    Joined:
    Aug 24, 2018
    Messages:
    157
    Likes Received:
    85
    Found solution. File in attachment.
     

    Attached Files:

    TheGameAppStudio likes this.
  7. vlilicbqko

    vlilicbqko Boxer

    Joined:
    Oct 8, 2015
    Messages:
    10
    Likes Received:
    1
    a very great solution Hanomax, the Boolean Invert is what exactly i need the return original color.
    Thank you for your time and replies
     

Share This Page