how to erase part of brush?

Find quick help here to get you started with Hollywood
Post Reply
Bugala
Posts: 1390
Joined: Sun Feb 14, 2010 7:11 pm

how to erase part of brush?

Post by Bugala »

Never done this before and after trying for a while, decided to look help from here.

Thing is, I have a background Brush, and on top of that is displayed a brush that is showing all the buildings in the level.

Now what I want to do is that when one building is destroyed, this building would disappear from this brush that shows all the buildings.

What I am in practice trying to do, is draw a box that would make those pixels invisible, or erase them, but I dont seem to be able to achieve this.

Can someone give me a simple example like that?
User avatar
jPV
Posts: 734
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: how to erase part of brush?

Post by jPV »

If you're using alpha channels in brushes, this might be the easiest way. Or SelectBrush() would be another option...

Code: Select all

@DISPLAY 1, {Color=#BLUE}
CreateBrush(1, 800, 600, #RED, {AlphaChannel = True})
DisplayBrush(1, 0, 0)
WaitLeftMouse
Cls
SetFillStyle(#FILLCOLOR)

; Make a "hole" on the alpha channel
SetAlphaIntensity(0)
SelectAlphaChannel(1)
Box(100, 100, 50, 50)
EndSelect
DisplayBrush(1, 0, 0)
WaitLeftMouse
Bugala
Posts: 1390
Joined: Sun Feb 14, 2010 7:11 pm

Re: how to erase part of brush?

Post by Bugala »

Thanks. So simple but couldnt figure it out as I havent really dealt with that. I figured it is somehow drawing with color 0, but didnt know how. I tried using color $0000000 but that didnt work. Was also looking at MASK options, since that is just on and off, but couldnt figure out how to draw that 0 anywhere.
Post Reply