Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => Topic started by: Kane98 on June 05, 2023, 11:34:52 pm

Title: No sound ID.
Post by: Kane98 on June 05, 2023, 11:34:52 pm
Hello I've been on a wild goose chase with making basic engine sounds work for a mod I'm working on. I can't seem to figure out what I'm doing wrong, and its getting really frustrating... All I'm getting is a No Sound ID error resulting in zero sound from my mod.


Title: Re: No sound ID.
Post by: fly77 on June 07, 2023, 02:07:18 am
Hi
the problem in your script is that your command " return {mass:1842, steering:2.0, steering_ecf:60, centering: 1.6, centering_ecf:20};" you put it before load_sound_command...return command means it exits the init_chassis function before it ever gets to the load_sound commands.
The return command needs to be the LAST command in init_chassis function like so :

Code: [Select]

//invoked only the first time the model is loaded, or upon reload
function init_chassis(){
  ....
    this.add_wheel('UAZ_PU_W_FL',wheelparam);
    this.add_wheel('UAZ_PU_W_FR',wheelparam);
    this.add_wheel('UAZ_PU_W_RR',wheelparam_Rear);
    this.add_wheel('UAZ_PU_W_RL',wheelparam_Rear);

  return {mass:1842, steering:2.0, steering_ecf:60, centering: 1.6, centering_ecf:20};
 
  //sounds
  _starter_sound =  this.load_sound("diesel-engine-start.ogg");
  _engine_sound = =this.load_sound("diesel-engine-idle.ogg");
  _stopping_sound = this.load_sound("diesel-engine-stop.ogg");
  _sound_source = this.add_sound_emitter("UAZ_Engine",1);
 
  this.set_interior_sound_attenuation(0.15);

   return {mass:1842, steering:2.0, steering_ecf:60, centering: 1.6, centering_ecf:20};
}

Title: Re: No sound ID.
Post by: Kane98 on June 07, 2023, 09:19:58 pm
Thanks Fly77, Youre a life saver! Ill be sure to do that in my mods moving forward!