Page 1 of 1

How to make a scope

Posted: Wed Jul 20, 2005 10:29 am
by lord_kungai
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...

Posted: Wed Jul 20, 2005 7:04 pm
by Tim
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).

Re: How to make a scope

Posted: Sat Jul 23, 2005 2:51 am
by jb
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...
What things are you lacking from the U2 scope (been a while since I played it)

Posted: Sat Jul 23, 2005 11:47 am
by Zachariah
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?

Posted: Sat Jul 23, 2005 5:42 pm
by lord_kungai
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).
That would be nice, except I wouldn't understand any of it, sorry...
Send it anyways, and I'll try to do something...
Thanks anyways for the offer! :D
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?
Close, but not really.

I don't really like zoomstops but as I said in a previous post:
In the 'Ideas...' post, I wrote:When activated, the zoom adjustment is done with mousewheel/weapon change keys. AWO with this weapon activates the LST.
Except for the LST, this is the U2 scope



sdrawkcab pleh esaelP

Posted: Mon Jul 25, 2005 11:17 am
by Tim
Not sure, but i tihnk this is it:

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;

Posted: Mon Jul 25, 2005 11:31 am
by lord_kungai
Lallo Prasad Yadav wrote:I thank you from the bottom of my heart and my wife's bottom
Thanks Tim, even though I'm not a Bihari politician...

However, I still do not know what to do with this code. Can you please help me? PM me or send me an email if you feel that you can give me tons of details.

Thanks! :D

Posted: Wed Jul 27, 2005 2:53 pm
by Kyllian
I'm about as lost as anyone else when it comes to the zoom
I dug thru the code all the way back into Engine.u(to Object to be specific) and I couldn't find anything that looked like it controlled how far you can zoom

Posted: Wed Jul 27, 2005 3:55 pm
by jb
Alls you would have to do is modify the mouse up/down inputs to change the FOV when your are in "zoome mode":

ie
Mouse up - 10 FOV (zooms in more)
Mouose down + 10 FOV (zooms out more)