Outerra forum
User mods, screenshots & videos => Vehicles => Topic started by: Shadowfita on July 14, 2015, 08:37:49 pm
-
Hi, I was wondering if it was possible to import a vehicle that let's you change parts etc ingame? if it is possible what would be required?
An example would be a car that is just a normal car then you can flick a switch and suddenly it has a spoiler.
-
Would'nt you just hide or unhide parts to do that?
-
How would that be done ingame?
-
How would that be done ingame?
... you can bind any action (from turning up and down lights, to fire and changing mehes visibility) to any of the selectable buttons (like the AUX1 - 4). Whayt is the main aim ? Some racing car spoilers ? (dont think, you would be able now to call up a window whyte a sellectable list, but maybe in the future).
-
The main aim at the moment is just have a key that can cycle through different parts of the vehicle as an original test.
-
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).
-
Where can I find the function 'action(k,v,dt)' ?
*edit*
Never mind, thanks for the help!