How to make a scope

All about Chaos for Unreal... (UT3, UT2004, UT2003, UT)
Post Reply
lord_kungai
Posts: 711
Joined: Tue Apr 27, 2004 3:41 am
Location: Mumbai, India

How to make a scope

Post 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...
<center><a href="http://home.att.net/~slugbutter/evil/" target="new"><img src="http://home.att.net/~slugbutter/evil/pureevil.jpg" border=0></a></center>
Tim
Chaotic Dreams Team
Posts: 444
Joined: Sun Aug 29, 2004 4:50 pm
Location: Proxy King Lair

Post 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).
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Re: How to make a scope

Post 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)
Jb
Zachariah
Chaotic Dreams Team
Posts: 2331
Joined: Thu Jul 17, 2003 5:25 pm
Location: Wherever Dreams Go Stale.

Post 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?
lord_kungai
Posts: 711
Joined: Tue Apr 27, 2004 3:41 am
Location: Mumbai, India

Post 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
<center><a href="http://home.att.net/~slugbutter/evil/" target="new"><img src="http://home.att.net/~slugbutter/evil/pureevil.jpg" border=0></a></center>
Tim
Chaotic Dreams Team
Posts: 444
Joined: Sun Aug 29, 2004 4:50 pm
Location: Proxy King Lair

Post 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;
lord_kungai
Posts: 711
Joined: Tue Apr 27, 2004 3:41 am
Location: Mumbai, India

Post 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
<center><a href="http://home.att.net/~slugbutter/evil/" target="new"><img src="http://home.att.net/~slugbutter/evil/pureevil.jpg" border=0></a></center>
Kyllian
Posts: 1181
Joined: Thu Dec 04, 2003 1:13 pm
Location: 29.229.90

Post 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
Image
(Melaneus) Dammit, don't you know Furrysound's actually this hot anthro cat goddess? Who does server administration?
jb
Posts: 9825
Joined: Fri May 03, 2002 12:29 am
Location: Coral Springs, FL
Contact:

Post 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)
Jb
Post Reply