If Color = "color" Then...

Discussion in 'Buildbox 3.0' started by spacefinn, Oct 6, 2018.

  1. spacefinn

    spacefinn Boxer

    Joined:
    Sep 29, 2018
    Messages:
    5
    Likes Received:
    0
    Is it possible to implement a node, that checks the current color of the character?
    Example:
    If a red ball passes through a red hoop, a point should be added to the score.
    if a blue ball passes through a red hoop, the ball should die.

    Is it possible to do it without scripting? If not, what is the code to do it=
     
  2. thatguyminib

    thatguyminib Serious Boxer

    Joined:
    Jul 1, 2017
    Messages:
    552
    Likes Received:
    307
    You will have to use the if collide mode.

    So for instance in your red ball object use the if collide and set that object to the blue ring and then do a destroy and a remove node.

    And vis versa with the blue ball.
     
  3. spacefinn

    spacefinn Boxer

    Joined:
    Sep 29, 2018
    Messages:
    5
    Likes Received:
    0
    Thank you!
    The thing is (i have not mentioned this yet which was kinda dumb of me) the "red ball" changes its color too. So making a node for a blue hoop is not possible, since at one point (when the ball is red) it can pass through, and at the other point (when it is not) it cant.
     
  4. thatguyminib

    thatguyminib Serious Boxer

    Joined:
    Jul 1, 2017
    Messages:
    552
    Likes Received:
    307
    Yeah you will need to dive into js then
     

Share This Page