Get Color of Background: HOW?

  • I want to get the colour of the background and apply it to an object.

    How is this done?

  • Go to «Behaviour» --> «Transform» list --> Tap «Advanced» --> Find «Get Color» behavior --> Use its input field with «Set Color»0_1512205223517_image.png 0_1512205281739_image.png 0_1512205291041_image.png 0_1512205303438_image.png 0_1512205499810_image.png
    (In my bad sample objects had partly transparent color, that's why the small one seems to have another color)

  • @Andrey-Ghost How does this get the colour of the game's background?

  • You can't get the color of the background (yet?), but there is a simple way around that.

    You can set an empty object as a background and an another object can use the Get Color behavior to get the color of the background, just like how Andrew Ghost did it.

  • @Deeeds While the game is running, you can’t Get or Set the background colour. I’d recommend just going into the background, finding the colour section then copying the colour code and use that. I’m pretty sure next update we’ll be able to set background colour.

  • 0_1512214404053_3B9036EE-12D1-4693-8AEF-5EE0E324B0E0.png
    You can see the background colour here. Colour code to the left #000000FF

  • @Aidan-Oxley Yes, I'm well aware of this, this is where I'm setting different colours for different scenes. However... I'd like certain objects to become aware of this colour, and then change themselves to this colour so they can "burn" into the background, and then act as "masks" for parts of other things.

    Hence the very specific nature of the question... how do I get this colour?

    Since it's not possible, let's hope this also comes with a "set" feature, in next week's update.

  • @Deeeds Waiting for new features isn’t the only way to do what you’re trying to do. You could store the colour code of the scene background somewhere, and have your object aware of what scene it is in. But if the object isn’t mirrored across scenes, then the object doesn’t have to look for or get anything, it can just set colour to what your background is.

  • 0_1512249255494_3FFEDAE9-D1E7-4F3C-B0C8-D6FB189DB914.jpeg
    Copy what’s circled in yellow, then you can just paste it into the Set Colour where you want it to be same as background colour.

  • @Aidan-Oxley Again, you're not hearing me.

    I know about this approach, already. But it limits me to having to do this, for every single scene, for every single object that's doing "masking".

    I want to be able to get that colour, regardless of how many times I change it, and how different it is in each scene. I'm reasonably sure you know this but are simply jumping to your reflexive defence of hyperPad, again.

  • @Deeeds I guess since you keep changing it through the editor, it could make it a bit easier for you. But if there were no way to change the background through behaviours, it would make little sense to be able to get the background colour through behaviours.

Log in to reply