![]() |
|
|
#1 |
|
Registered User
Join Date: Jul. 15th, 2005
Posts: 24
|
scope probs
Where can I find some info on drawing a canvas on top of another? For example why am I having so much trouble making a multicolored scope? Getting lost just doing black and white together
|
|
|
|
|
|
#2 |
|
I had success working with HUDOverlay. For mutators that won't rely on a gametype specific HUD, it works pretty well. Some normal HUD functions are missed, but that wasn't too hard to overcome.
To find information on it, I browsed some Discussions on HUD pages at the wiki. Just search the wiki and you find them.
__________________
- SuperApe ![]() Last edited by SuperApe; 9th Nov 2005 at 06:12 PM. |
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Jul. 15th, 2005
Posts: 24
|
OK I got it working thanx a bunch! Now whats the best way to be able to use black and white together? Do they have to be two separate textures (canvas)? I was looking at "drawline" but it doesent sound like it moves with the view, cant find much on it though. I guess Id be happy with some sort of 'plus' in white set on top of the same in black (sort of) at least to start with. Do I need to go into ed and create a modifier there?
The further I go the behinder I get LOL! -NUT |
|
|
|
|
|
#4 | ||
|
Quote:
Quote:
Code:
vector WorldToScreen (vector WorldLoc)
__________________
- SuperApe ![]() |
|||
|
|
|
|
|
#5 |
|
Registered User
Join Date: Jul. 15th, 2005
Posts: 24
|
OK got it!
You da man (Ape) Super Ape! Thanks! -Nut |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Jul. 15th, 2005
Posts: 24
|
Okay 90% seems to be fine but I have one prob-when a player chooses custom scope opt they can still see the def scope also what gives? IE they see them both at the same time.
Code:
else
{
CX = Canvas.ClipX/2;
CY = Canvas.ClipY/2;
ZoomScale = Canvas.ClipX/1024;
if (ZoomString != "")
{
tileScaleX = Canvas.SizeX / 640.0f;
tileScaleY = Canvas.SizeY / 480.0f;
fX = 2*focusX * tileScaleX;
fY = 2*focusY * tileScaleY;
SetZoomBlendColor(Canvas);
Canvas.DrawColor = FocusColor;
Canvas.Style = ERenderStyle.STY_Alpha;
Canvas.SetPos((Canvas.SizeX*0.5)-fX/2,(Canvas.SizeY*0.5)-fY/2);
Canvas.DrawTile( ZoomReticule, fX, fY, 0.0, 0.0, ZoomReticule.USize, ZoomReticule.VSize );
}
else
// default reticule
{
Canvas.SetDrawColor(255,255,255,255);
Canvas.Style = ERenderStyle.STY_Modulated;
// Top Gradient
Canvas.SetPos(200*Canvas.ClipX/401, 3.93*Canvas.ClipY/9);
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/401, Canvas.ClipY/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), 167, 386, 3, 54);
// Left Gradient
Canvas.SetPos(3.94*Canvas.ClipX/9, 200*Canvas.ClipY/401);
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), Canvas.ClipY/401, 116, 437, 54, 3);
// Bottom Gradient
Canvas.SetPos(200*Canvas.ClipX/401, 5.07*Canvas.ClipY/9 - Canvas.ClipY/1360*(90-PlayerController(Instigator.Controller).DesiredFOV));
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/401, Canvas.ClipY/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), 167, 437, 3, 54);
// Right Gradient
Canvas.SetPos(5.06*Canvas.ClipX/9 - Canvas.ClipX/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), 200*Canvas.ClipY/401);
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), Canvas.ClipY/401, 167, 437, 54, 3);
// Top Gradient
Canvas.SetPos(200*Canvas.ClipX/401, 3.93*Canvas.ClipY/9);
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/401, Canvas.ClipY/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), 167, 386, 3, 54);
// Left Gradient
Canvas.SetPos(3.94*Canvas.ClipX/9, 200*Canvas.ClipY/401);
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), Canvas.ClipY/401, 116, 437, 54, 3);
// Bottom Gradient
Canvas.SetPos(200*Canvas.ClipX/401, 5.07*Canvas.ClipY/9 - Canvas.ClipY/1360*(90-PlayerController(Instigator.Controller).DesiredFOV));
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/401, Canvas.ClipY/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), 167, 437, 3, 54);
// Right Gradient
Canvas.SetPos(5.06*Canvas.ClipX/9 - Canvas.ClipX/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), 200*Canvas.ClipY/401);
Canvas.DrawTile(ZoomReticule, Canvas.ClipX/1360*(90-PlayerController(Instigator.Controller).DesiredFOV), Canvas.ClipY/401, 167, 437, 54, 3);
Thanks in advance -NUT |
|
|
|
|
|
#7 | |
|
Quote:
__________________
- SuperApe ![]() |
||
|
|
|
|
|
#8 |
|
Registered User
Join Date: Jul. 15th, 2005
Posts: 24
|
Well there was more past that, I was just showing the main part-Unless I am completely blind(which has happened on more than one occasion!)
-NUT |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|