Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Compass
#1
Hello

I havent released anything for a long time, I made a code sometime ago when I was making OMA Zombies 2 to detect the position of the zombies (at your six, at your eleven, at your five....). I thought yesterday about this compass, Cool . What it does is to spin in a circle a certain icon and it will show the orientation of a certain position:

Call it like this:

Code:
self thread OrientableShader( position, icon shader, compass x center, compass y center, radius of the compass, shader width, shader height );

Example (to make it appear on the center of your screen around your crosshair, thats how it looks better):

Code:
self thread OrientableShader( self.box.origin, "compassping_enemyfiring", 0, 0, 50, 20, 20 );

self.box.origin was a position I used for testing and compassping_enemyfiring is a decent shader icon for this, remember to precache your shader in Init().

Add this code on your mod:

Code:
OrientableShader( position, shader, x, y, radius, sizex, sizey )
{
    self endon( "death" );
    self endon( "disconnect" );
    self.clocky = createIcon( shader, sizex, sizey );
    self.clocky setPoint( "", "", x, y );
    self.clocky.alpha = 1;
    while( 1 )
    {
        anglestoclock = vectorToAngles( vectorNormalize( anglesToForward( self.angles ) ) );
        anglestopos = vectorToAngles( position - self.origin );
        angle = anglestoclock[1] - anglestopos[1];
        angle += 360;
        angle = int( angle ) % 360;
        angle -= 90;
        self.clocky setPoint( "", "", x + cos( angle ) * radius, y + sin( angle ) * radius );
    wait 0.05;
    }    
}

Video:

Reply

#2
+rep OMA
Reply

#3
(03-22-2012, 17:12)d0h! Wrote: +rep OMA

Thanks, OMA . I am making a quick video.
Reply

#4
screenies pls
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#5
(03-22-2012, 18:28)JayDi Wrote: screenies pls

Added video. OMA
Reply

#6
pretty cool, now make it look like a real compas Big Grin
Black Ops Mods:

RPG(rocket launcher) mod
Get the Specials

Old aliasses:

eliteCVDelite
CVD

Reply

#7
wow nice !
Reply

#8
(03-23-2012, 10:56)CVD Wrote: pretty cool, now make it look like a real compas Big Grin

If I could rotate the shaders......Undecided
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] BLOPS Proradar Compass callouts rotceh_dnih 14 7,563 07-12-2011, 02:01
Last Post: rotceh_dnih
  remove keybinds on compass thre3pi 0 1,574 07-01-2011, 23:57
Last Post: thre3pi
  Preview Blackops ProRadar Compass callout's rotceh_dnih 10 6,211 06-16-2011, 21:54
Last Post: lilmack

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.