Jump to content

[REL] GUI Speedometer (with needle!) 0.1b


50p

Recommended Posts

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

DazzaJay, as I previously said:

Can't you just use 2 images? And alter the coordinates? Or make it digital then you need only 11 images.

If there was a function like guiRotate or guiSetRotation I'd use them.

Link to comment

ah, my bad, i must have missed it when i was scanning thru.

Anyways, i hope you dont mind, but i edited your Disc.png, because i found it to be a bit too "intrusive" (if it was smaller it wouldnt bother me)

basically, i made the outer border thinner, and turned the white transparent.

"Standard Transparent"

disc.png

speedotn.jpg

_____________________________________________________________

:::EDIT:::

So i was really bored, and i made a Speedo pack.

Lots of colours for your server to choose from!

Oo... heres an idea, 50p, would it bee to hard for in a later version you could add a command that lets players switch between different Speedo Images?

Or... what about when at night time, the dash changed from a normal skin to a "Glowing" one....

Or or even better... when Headlights are on, change texture to a glowing one.... (would work great in my server where i have a script that allows the use of L for headlights in every game mode)

anyways, here they are.... Do with them what you wish.

Note: These are .jpg previews to get the .png files just click them.

"Standard Dashboard Glow" (well, its the same colour glow as my Daihatsu's stock dash)

standard.jpg

"Neon Blue"

blue.jpg

"Neon Aqua"

aqua.jpg

"Neon Green"

green.jpg

"Neon Purple"

purple.jpg

"Neon Pink"

pink.jpg

"Neon Red"

red.jpg

Link to comment

Oo... heres an idea, 50p, would it bee to hard for in a later version you could add a command that lets players switch between different Speedo Images?

Or... what about when at night time, the dash changed from a normal skin to a "Glowing" one....

Or or even better... when Headlights are on, change texture to a glowing one.... (would work great in my server where i have a script that allows the use of L for headlights in every game mode)

I thought of adding such features before, but I didn't have much time so I couldn't do anything. I will script those or some of those features as soon as I'll have some time, probably on Thursday.

Link to comment

Awesome! Awesome to the max.

also 50p....

Daniel "Dazza Jay" Fitzgerald: 260 needle images seems a bit much tho

AlienX: only way to do it lol

Daniel "Dazza Jay" Fitzgerald: makes for a long loading time

Daniel "Dazza Jay" Fitzgerald: what crackhead forgot to put in the gui rotate image code into the game

AlienX: CEGUI does not support rotating images

Daniel "Dazza Jay" Fitzgerald: thats what i mean

AlienX: haha

Daniel "Dazza Jay" Fitzgerald: why didnt the creaters make it able to do it

AlienX: .dunno lol

AlienX: u can draw 3d lines in DP3

later on.......

Daniel "Dazza Jay" Fitzgerald: hrmm

AlienX: wat

Daniel "Dazza Jay" Fitzgerald: you said somthing about a 3d line ability in DP3?

AlienX: yeah

AlienX: able to draw 3d lines

AlienX: atleast thats what the changelog said

Daniel "Dazza Jay" Fitzgerald: so you could set a line with any rotation length and width right?

AlienX: dunno

AlienX: all i know is what the changelog says

anyways.. long story short, if this new feature in DP3 works the way we expect it to... then it might be possible to make a speedo needle that looks like SA Cam Hack's one... http://www.tocaedit.com/img/sach/sach-big.jpg

just a simple line that would save on the 260 images and a lot of loading time.

also, i know why the needle dissapears around 73kmh....

AlienX: one weird thing...

AlienX: he seemed to have skipped speedo needle 73

AlienX!: even in the meta.xml and the lua

Daniel "Dazza Jay" Fitzgerald: i noticed it too

AlienX: i dont see how 73 can be an issue

AlienX: lol

Daniel "Dazza Jay" Fitzgerald: it is

Daniel "Dazza Jay" Fitzgerald: at 73KMH the needle dissapears

AlienX: rofl

Link to comment
AlienX: one weird thing...

AlienX: he seemed to have skipped speedo needle 73

AlienX!: even in the meta.xml and the lua

Daniel "Dazza Jay" Fitzgerald: i noticed it too

AlienX: i dont see how 73 can be an issue

AlienX: lol

Daniel "Dazza Jay" Fitzgerald: it is

Daniel "Dazza Jay" Fitzgerald: at 73KMH the needle dissapears

AlienX: rofl

lol'd :lol:

Daniel "Dazza Jay" Fitzgerald: so you could set a line with any rotation length and width right?

basically yea

Link to comment
Daniel "Dazza Jay" Fitzgerald: so you could set a line with any rotation length and width right?

basically yea

well, i belive that would be a much faster and less laggeier idea.....

also, i get the feeling that DP3 will be released soon, as mtabeta.com has had its url changed, and now anyone who tries to enter thier uster / pass into the installer, it just sits there looking dumb.

so pretty much no new players can join.

when DP3 is out, i would deffanatly recommend the line.

Link to comment
AlienX: one weird thing...

AlienX: he seemed to have skipped speedo needle 73

AlienX!: even in the meta.xml and the lua

Daniel "Dazza Jay" Fitzgerald: i noticed it too

AlienX: i dont see how 73 can be an issue

AlienX: lol

Daniel "Dazza Jay" Fitzgerald: it is

Daniel "Dazza Jay" Fitzgerald: at 73KMH the needle dissapears

AlienX: rofl

lol'd :lol:

That is weird I know, but I was asleep when I was exporting every single image manually, it took me 3 hours, LOL. The next day I was fresh minded and then it took me only 30 mins with all of the images exported using other method (automatic)!

I skipped it in the meta.xml and in the code, maybe because it's a special number, ROFL.

Link to comment

lol, just a quick question, what app did you use for auto-Exporting the animation to .png's (as i have tried to make a needle pack, but bloody imageready refuses to do a spin animation from the center of the image, instead it keeps deciding that its going to spin from the center of the needle.)

Link to comment

If you have Photoshop CS3, you could do this whole thing in less than 30 minutes. After creating the image, you just make a macro to rotate it 1 degree and duplicate the layer. Then it would create everything automatically. Then export all the layers to separate files. Really simple. =)

Link to comment

i must be doing somthing wrong with flash 8

this is my starting image....

00001.png

and 260 images later, this is what i end up with....

00260.png

like, its rendered them all fine and rotated fine, but its gone all blocky and rough.

and looking thru all images, it gets rougher and rougher as it goes around.

i dare say i fucked a setting.

--------------------------------------------

also, on a different note.....

Your Digital Speedometer, What do i need to change to get it to display on recource load and NEVER go away (for a 24/7 race server, as it dosent appear if you spawn in the car)

Link to comment

1st question:

Try to change image's properties in Flash library:

- tick Allow smoothing

- change compression: Lossless (PNG/GIF)

May help.

2nd question:

Make a function which will be called by a timer. The function should check if the client is in a vehicle. If he is then showSpeedometer and kill the timer. In updateTheSpeed function (on the line where hideSpeedometer is) add the same timer.

That should work.

Link to comment

Like this?

(timers were so much eaiaier in mIRC.)

timer setTimer( g_root, 1000, 0 
    function ( ) 
        if isPlayerInVehicle( g_Player ) then 
            showSpeedometer() then 
              killTimer ( timerValue ) 
            end 
        end 
    end 
) 

Link to comment
Like this?

(timers were so much eaiaier in mIRC.)

timer setTimer( g_root, 1000, 0 
    function ( ) 
        if isPlayerInVehicle( g_Player ) then 
            showSpeedometer() then 
              killTimer ( timerValue ) 
            end 
        end 
    end 
) 

Kinda...

Try this:

timerID = setTimer( g_root, 1000, 0, 
    function ( ) 
        if isPlayerInVehicle( g_Player ) then 
            showSpeedometer() 
            killTimer ( timerID ) 
        end 
    end 
) 

Replace code in onClientResourceStart with this above.

Link to comment
timerID = setTimer( g_root, 1000, 0, 
    function ( ) 
        if isPlayerInVehicle( g_Player ) then 
            showSpeedometer() 
            killTimer ( timerID ) 
        end 
    end 
) 

Replace code in onClientResourceStart with this above.

ok.. now this is gonna sound really dumb.....

but....

replace code in onclientrecourcestart....

does that mean like this:

addEventHandler( "onClientResourceStart", g_root, 
timerID = setTimer( g_root, 1000, 0, 
    function ( ) 
        if isPlayerInVehicle( g_Player ) then 
            showSpeedometer() 
            killTimer ( timerID ) 
        end 
    end 
) 
  

or does it involve replacing the first line aswell so its like this:

timerID = setTimer( g_root, 1000, 0, 
    function ( ) 
        if isPlayerInVehicle( g_Player ) then 
            showSpeedometer() 
            killTimer ( timerID ) 
        end 
    end 
) 
  

Link to comment
addEventHandler( "onClientResourceStart", g_root, 
    function ( ) 
        timerID = setTimer( g_root, 1000, 0, 
            function ( ) 
                if isPlayerInVehicle( g_Player ) then 
                    showSpeedometer() 
                    killTimer ( timerID ) 
                end 
            end 
        ) 
    end 
) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...