Please help me to replace the sounds of the original models in scripts correctly (via directory addons). I understood how to replace the simple characteristics price or fuel consumption. Approximately as follows:
Create a file ***.script and put it into the GS-archive to "addons" directory with these strings:
For enabling the sound file in original script there is a function:
How can I change name of the audio file by simply replacing the string in a separate script in a folder? What syntax?
Maybe this is so?
Doesn't work...
Thank you!
Create a file ***.script and put it into the GS-archive to "addons" directory with these strings:
Code:
// Circs:
$grid = MAIN.$grid;
$level = MAIN.$level;
//Find in game environment "metro-01"
if($grid.getGridObject("metro-01")) {
with ($grid.getGridObject("metro-01")) {
.displayName = "NameIt";
.capacity = 5;
.$price =1000000;
.$fuelConsumption = 0;
.$electricityConsumption = 100;
}
}
For enabling the sound file in original script there is a function:
Code:
with (this.doorOpenSound = new_sound(this)) {
.load("/metro/sounds/Subway1_door_open.wav");
.volume = 1.0;
.minDistance = 50.0;
.maxDistance = 150.0;
}
How can I change name of the audio file by simply replacing the string in a separate script in a folder? What syntax?
Maybe this is so?
Code:
$grid = MAIN.$grid;
$level = MAIN.$level;
if($grid.getGridObject("metro-01")) {
with ($grid.getGridObject("metro-01")) {
with (this.doorOpenSound = new_sound(this)) {
.load("/metro/sounds/My_sound_Subway1_door_open.wav");
.volume = 1.0;
.minDistance = 50.0;
.maxDistance = 150.0;
}
}
Doesn't work...
Thank you!