Outerra forum

User mods, screenshots & videos => Vehicles => Topic started by: Shadowfita on July 14, 2015, 08:37:49 pm

Title: Interchangeable parts
Post 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.
Title: Re: Interchangeable parts
Post by: HiFlyer on July 14, 2015, 09:31:01 pm
Would'nt you just hide or unhide parts to do that?
Title: Re: Interchangeable parts
Post by: Shadowfita on July 14, 2015, 11:32:27 pm
How would that be done ingame?
Title: Re: Interchangeable parts
Post by: PytonPago on July 15, 2015, 01:24:32 am
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).
Title: Re: Interchangeable parts
Post by: Shadowfita on July 15, 2015, 01:51:32 am
The main aim at the moment is just have a key that can cycle through different parts of the vehicle as an original test.
Title: Re: Interchangeable parts
Post by: PytonPago on July 15, 2015, 02:18:01 am
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:

Code: [Select]
  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).

Title: Re: Interchangeable parts
Post by: Shadowfita on July 16, 2015, 04:17:05 am
Where can I find the function 'action(k,v,dt)' ?


*edit*

Never mind, thanks for the help!