Mefisto_PL Posted January 29, 2012 Share Posted January 29, 2012 How I can replace speedbar in race gamemode to nitrobar? I ask because on wiki I don't found anything to help : Link to comment
Paper Posted January 29, 2012 Share Posted January 29, 2012 you must modify the race scripts for make the bar relative to the nitro and if you want you can change the image ^^ Link to comment
Mefisto_PL Posted January 29, 2012 Author Share Posted January 29, 2012 but in which file? Link to comment
Castillo Posted January 29, 2012 Share Posted January 29, 2012 Is not that easy, because there's no such function "getNitroLeft" or something similar. There's a resource called "race_nos", it's a script which has a nitro meter. Link to comment
Mefisto_PL Posted January 29, 2012 Author Share Posted January 29, 2012 Yes it is but I want create bar, not meter Link to comment
Castillo Posted January 29, 2012 Share Posted January 29, 2012 It's easy if you have DX drawing knowledge. Link to comment
Mefisto_PL Posted January 29, 2012 Author Share Posted January 29, 2012 Can you give me events ? Link to comment
Castillo Posted January 29, 2012 Share Posted January 29, 2012 Events...? you mean functions? You only need dxDrawRectangle and if you want to draw the nitro left in a text then dxDrawText. Link to comment
Mefisto_PL Posted January 29, 2012 Author Share Posted January 29, 2012 ahh Okey thanks Link to comment
Paper Posted January 30, 2012 Share Posted January 30, 2012 Is not that easy, because there's no such function "getNitroLeft" or something similar. He can use timers, nitro durations i definied, but i don't remember it Link to comment
Phat Looser Posted February 1, 2012 Share Posted February 1, 2012 1) get a car 2) tune it with NOS 3) get a stopwatch 4) trigger the nitro 5) write down the time 6) create another bar in the "race" resource 7) set this bar to "1" if the car has nitro, else don't if the car has nitro and "fire" is pressed, activate a timer which triggers each 200 ms and reduces the bar (1-(maxNitroTime - timercalls*200)/maxNitroTime) 9) if (maxNitroTime - timercalls*200) <= 0 then set the bar to 0 10) if another nitro is ready (measure that time, too maybe) or a nitro was picked up, set the bar to 1 again 11) ??? 12) PROFIT Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now