The main aim at the moment is just have a key that can cycle through different parts of the vehicle as an original test.
... i had a whyle ago a "sellector" for oppening different stuff on a vehicle like this:
- first you need a counter, that will at a press of a button change the number by +1 and change back to zero, when the max. is reached. best incorporated trough that existing script in the "function action(k,v,dt)" part:
if (v == 1 && aHornBool == true) {
/// some action
}
if (v == 1 && aHornBool == false) {
aHornTime = aHornTime + (2 * 1);
/// some action
}
if (v == 1) {
if (aHornBool == false) {aHornBool = true;}
else{aHornBool = false;}
}
Than in the "function update_frame(dt, engine, brake, steering)" (or even in the "///some action" space) add some IF functions turning visibility on and off for each number (one selectable mesh visible, all other invisible).