Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
An animatable scope for custom weapons. Version 1.2 is higher precision, uses the screen's center for zero coordinates and has aspect corrected 1:1 zoom.
Scope1.2.pk3
Spoiler: Some possible effects...
On activation the scope could fade in (while remaining screen centered) as the target view pitches up.
During zooming the Focus can be set low and then smoothly regain clarity after the Zoom has finished.
Could be made to follow custom bobbing.
With Fade, Draw Radii and a low Zoom you can create a shock wave effect.
There is a test menu to demonstrate each variable's range* and purpose:
*Edit: The menu actually limits some ranges.
S'pose I should add a screenshot...
Something I might add in future is a Tint/Darken/Desaturate type of thing for the unzoomed portion of the screen.
The easiest way is to set the 'target y' property to 0 and lower the 'draw y' property so that it lines up with the sprite.
If instead your sprite is screen centered you'll need to draw a transparent circle of pixels in the sprite to be able to see through it.
Also, mess around with the gldefs file so that it reads either 'hardwareshader postprocess scene' or 'hardwareshader postprocess beforebloom' in order to place the scope in front of or behind the sprite.
Only by modifying the shader, it can't be done from zscript. You'd think it'd be simpler than the circle but today I can't get it to work right. I'll come back to it later though