How to make a scope
Posted: Wed Jul 20, 2005 10:29 am
I just wanted to know how to make a UT mod/mutator/something that modifies the SR/LG/CUTSR scopes to become like the Unreal 2 SR scope.
Help please...
Help please...
What things are you lacking from the U2 scope (been a while since I played it)lord_kungai wrote:I just wanted to know how to make a UT mod/mutator/something that modifies the SR/LG/CUTSR scopes to become like the Unreal 2 SR scope.
Help please...
That would be nice, except I wouldn't understand any of it, sorry...Tim wrote:Well, I can send you a fraction of UT2k4 sniper rifle code if you wish. If Jb agrees I can also send CUT sniper rifle code (for enchanched scope).
Close, but not really.Pepito wrote:I think he means he wants the Zoomstops from U2. where it would zoom into certain levels automatically instead of a dynamic zoom.
Like , 1x > 2x > 4x > 8x
am I right?
Except for the LST, this is the U2 scopeIn the 'Ideas...' post, I wrote:When activated, the zoom adjustment is done with mousewheel/weapon change keys. AWO with this weapon activates the LST.
Code: Select all
if ( PlayerController(Instigator.Controller).DesiredFOV == PlayerController(Instigator.Controller).DefaultFOV )
{
Super.RenderOverlays(Canvas);
zoomed=false;
}
else
{
if ( FireMode[0].NextFireTime <= Level.TimeSeconds )
{
chargeBar = 1.0;
}
else
{
chargeBar = 1.0 - ((FireMode[0].NextFireTime-Level.TimeSeconds) / FireMode[0].FireRate);
}
CX = Canvas.ClipX/2;
CY = Canvas.ClipY/2;
Scale = Canvas.ClipX/1024;
Canvas.Style = ERenderStyle.STY_Alpha;
Canvas.SetDrawColor(0,0,0);
// Draw the crosshair
Canvas.SetPos(CX-169*Scale,CY-155*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair',169*Scale,310*Scale, 164,35, 169,310);
Canvas.SetPos(CX,CY-155*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair',169*Scale,310*Scale, 332,345, -169,-310);
// Draw Cornerbars
Canvas.SetPos(160*Scale,160*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', 111*Scale, 111*Scale , 0 , 0, 111, 111);
Canvas.SetPos(Canvas.ClipX-271*Scale,160*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', 111*Scale, 111*Scale , 111 , 0, -111, 111);
Canvas.SetPos(160*Scale,Canvas.ClipY-271*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', 111*Scale, 111*Scale, 0 , 111, 111, -111);
Canvas.SetPos(Canvas.ClipX-271*Scale,Canvas.ClipY-271*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', 111*Scale, 111*Scale , 111 , 111, -111, -111);
// Draw the 4 corners
Canvas.SetPos(0,0);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair',160*Scale,160*Scale, 0, 274, 159, -158);
Canvas.SetPos(Canvas.ClipX-160*Scale,0);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair',160*Scale,160*Scale, 159,274, -159, -158);
Canvas.SetPos(0,Canvas.ClipY-160*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair',160*Scale,160*Scale, 0,116, 159, 158);
Canvas.SetPos(Canvas.ClipX-160*Scale,Canvas.ClipY-160*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair',160*Scale,160*Scale, 159, 116, -159, 158);
// Draw the Horz Borders
Canvas.SetPos(160*Scale,0);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', Canvas.ClipX-320*Scale, 160*Scale, 284, 512, 32, -160);
Canvas.SetPos(160*Scale,Canvas.ClipY-160*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', Canvas.ClipX-320*Scale, 160*Scale, 284, 352, 32, 160);
// Draw the Vert Borders
Canvas.SetPos(0,160*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', 160*Scale, Canvas.ClipY-320*Scale, 0,308, 160,32);
Canvas.SetPos(Canvas.ClipX-160*Scale,160*Scale);
Canvas.DrawTile(texture'NewSniperRifle.COGAssaultZoomedCrosshair', 160*Scale, Canvas.ClipY-320*Scale, 160,308, -160,32);
// Draw the Charging meter
Canvas.DrawColor = ChargeColor;
Thanks Tim, even though I'm not a Bihari politician...Lallo Prasad Yadav wrote:I thank you from the bottom of my heart and my wife's bottom