Anteworld - Outerra Game > Modding: Importer, Tools & Utilities

No sound ID.

(1/1)

Kane98:
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.


fly77:
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: ---
//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};
}


--- End code ---

Kane98:
Thanks Fly77, Youre a life saver! Ill be sure to do that in my mods moving forward!

Navigation

[0] Message Index

Go to full version