Is it possible to make an actor look through a background?

GoldensnypaGoldensnypa Member Posts: 32
edited November -1 in Working with GS (Mac)
So for example, If I created a white box as a main with a desert background. And underneath the white box another layer of background which would be coloured in grey. Could I make the white box look through the grey background to look at the desert background? So you would be looking at a desert texture through the white box ; the white box turns into a desert colour. Could that be done in Game Salad? I apologise if I didn't explain myself properly.

Comments

  • youngster9youngster9 Member Posts: 326
    Yes you could use the self.color.alpha attribute. This is basically the transparency of an object. Or you could go into the color attribute of the actor and you get the color popup window where you can pick the colors. You will also see a slider called opacity. You can change that to exactly what you need.

    Hope this helps
  • JBULLFROGJBULLFROG Member Posts: 58
    I think you are asking if an actor can "mask" your background texture and that would only be
    visable where ever your white box actor is located. Is that correct?
  • GoldensnypaGoldensnypa Member Posts: 32
    Thank you for your quick reply. One question. Do you think there is a tutorial on how to write this attribute and how to apply it? That would be very helpful as I am still a learner. Thank you
  • GoldensnypaGoldensnypa Member Posts: 32
    And Yes JBULLFROG
  • JBULLFROGJBULLFROG Member Posts: 58
    As far as I know there is no way to mask and actor with another. But thinking creatively you could create a "reverse mask". So if your back ground texture is 480x320 the size of the iPhone screen then make your layer that the user sees through a large png image in photoshop with a hole cut out the center. Now make it big enough that it will never reveal the background when moved around on the screen. If you want it fixed center screen then just set up your controls to move the background layer under the overlay layer "480x320 with your hope cut out the center". I hope that helps you a hive the desired effect.
Sign In or Register to comment.