PDA

View Full Version : Screen->DrawTile and Screen->Rectangle, etc.



Praethus
10-03-2007, 02:28 PM
If a use Screen->DrawTile to draw a tile onto a layer that already exists, how does it interact with that layer? Will it replace the pixels already there?

Also, does Screen->Rectangle work? And if I do a Screen->Rectangle and a Screen->Circle on the same layer and they overlap, how do they interact?

DarkDragon
10-06-2007, 10:42 AM
The later calls overwrite the pixels from the earlier calls/layer in both cases, unless, of course, the later call has the transparency parameter set to translucent (128).

Praethus
10-06-2007, 09:26 PM
What if the later pixels are the transparent pixel at the beginning of each CSet. Basicly I want a black layer above everything and the ability to write a circle of transparent pixels into it centered around Link, but when I scripted it, it didn't work. This should create an effect similar to the LttP lantern which was my intent.

DarkDragon
10-06-2007, 09:54 PM
No, the effects get applied one on top of the other, as if you were using normal layers. A transparent circle on top of pitch black won't "erase" the black underneath.

The easiest way to do what you want is probably to create a block of tiles containing the transparent hole and the black immediately around it. Draw this block so that the hole is over Link, the draw black rectangles to fill in the rest of the screen not covered by the block.

ShadowMancer
10-06-2007, 10:03 PM
So is there any way to 'erase' what is drawn with drawing functions?
Also a related question, does what you draw persist or is the screen refreshed each frame? example, I draw a tile then call waitframe right away, does the tile disapear? and if not, is there a way to refresh the screen? I would like to be able to create moveing effects/enemies etc with drawing functions.

DarkDragon
10-06-2007, 10:16 PM
Drawing effects only apply during the frame they are drawn, so yes, you can easily animate/turn off the effects using script logic.

Praethus
10-08-2007, 01:39 AM
Hmm... I'll try your method, DarkDragon. I'll let you know how it turned out.