Ren'Py Quastion about x-ray

Tronin672

New Member
Apr 16, 2023
1
0
I want to be able to look at character sprites while playing with x-ray mod. I think of it as a small area around the cursor. The part of the sprite that fell into this zone should be displayed without clothes.

I tried to look for solutions, but I could not figure out this problem. How can I implement a similar x-ray mod in the game?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Respected User
Donor
Jun 10, 2017
10,141
14,825
Wow...

Hmmm.

I guess it would need an image for the x-ray part, combining the mask and the x-rayed image.
The mask being 2 times the size of the image, full black, with a circle at full transparency in the middle.
Relying on the x-rayed image is shown in pos 0,0, while the mask is positioned for its center to match the position of the mouse.
Then this ATL image is used in another ATL image, that would be the final result.
Once again relying on parallel, showing the normal image, in pos 0,0. As for the first ATL, it should probably be ed, once again accordingly the the mouse position, then past through in order to put all black pixels at full transparency.

It's also possible to do this with a , following more or less the same principle.
Firstly build the x-rayed part by bliting the mask on the x-rayed image, then turning every black pixels at full transparency, and bliting the result on top of the normal image.

The second method is probably the most reliable and, paradoxically, the easiest to implement.