Post by Power Supersport on Mar 2, 2016 12:15:34 GMT
Everyone loves nitrous... Especially in racing!
Well, it is a common question on the forum aswell...
Say "Hello" to Game Modelling #7 - Nitrous... We're gonna script the nitrous system...
How it's done? If you're redirected by the link in the description of the video, this is what you need to know...
This is special cut script that you can freely use or modify into your projects... Please consider crediting me and the tutorial series, so other people can find them aswell...
Again, you can freely use, modify and share the script, but please consider giving me credit and linking my channel with the tutorial series...
Subscribe to support me and by channel... Like for more videos...
And reply, so I can read your support and motivate myself to make more content that you will like...
Enjoy watching!
Well, it is a common question on the forum aswell...
Say "Hello" to Game Modelling #7 - Nitrous... We're gonna script the nitrous system...
How it's done? If you're redirected by the link in the description of the video, this is what you need to know...
This is special cut script that you can freely use or modify into your projects... Please consider crediting me and the tutorial series, so other people can find them aswell...
/// Script made by Power Supersport in 3drad.boards.net...
int [] time(1);
float nitrous;
float maxNitrous = 100; // Maximum nitrous
float acceleration;
void Main()
{
if (iInitializing()) {
nitrous = maxNitrous; // Setting the nitrous to the maximum... May be deleted if you don't want to start with full N2O...
}
/// Nitrous
if ((iKeyDown(iKeyCode("DIK_N"))) && (nitrous > 0)) { // N can be changed to any key... But N is the most common...
time[0] = 0;
nitrous -= 0.5; // This is how fast the nitrous will go down... You can lower this value for slower consumption...
acceleration = 1.5; // This is by how much the acceleration increases...
OUT_22 = IN_0; // Particle frequency is relative to the speed of the car...
}
else {
time[0] += 1; // If you don't press N, the timer will start to count...
if (time[0] > 100) { // Value 100 can be bigger for longer delay before the N2O starts to recharge...
nitrous += IN_0 / 500; // Value 500 can be bigger for slower recharge relative to the speed...
}
acceleration = 1;
OUT_22 = 0;
}
if (nitrous <= 0) nitrous = 0;
if (nitrous >= maxNitrous) nitrous = maxNitrous;
OUT_4 = 1 * acceleration; // Value 1 is your default acceleration of the car...
OUT_44 = nitrous; // This is the ValuePrint... You can delete this if not needed...
}
Again, you can freely use, modify and share the script, but please consider giving me credit and linking my channel with the tutorial series...
Subscribe to support me and by channel... Like for more videos...
And reply, so I can read your support and motivate myself to make more content that you will like...
Enjoy watching!