Does anyone know how to disable sound effect for a unit?
Currently I am creating a new tribe (Based on Alim) such that each time when a new military district is created, the free unit given becomes Dark Walkers instead of Desert Walkers. I wrote the following function as a workaround:
---------------------------------------------------------
void game_callback on_unit_trained (Unit the_unit, Leader the_leader, UnitType the_type, Build the_build) {
Location loc = unit_location(the_unit);
UnitType the_type2 = get_unit_type(the_unit);
if(the_type2 == "Desert Walker") {
remove_unit(the_unit);
create_unit(the_leader, "Dark Walker", loc);
}
}
---------------------------------------------------------
It almost works except that the "remove_unit" function will play a sound effect of the Desert Walkers dying, and I want to get rid of that, does anyone know how to do this?
Currently I am creating a new tribe (Based on Alim) such that each time when a new military district is created, the free unit given becomes Dark Walkers instead of Desert Walkers. I wrote the following function as a workaround:
---------------------------------------------------------
void game_callback on_unit_trained (Unit the_unit, Leader the_leader, UnitType the_type, Build the_build) {
Location loc = unit_location(the_unit);
UnitType the_type2 = get_unit_type(the_unit);
if(the_type2 == "Desert Walker") {
remove_unit(the_unit);
create_unit(the_leader, "Dark Walker", loc);
}
}
---------------------------------------------------------
It almost works except that the "remove_unit" function will play a sound effect of the Desert Walkers dying, and I want to get rid of that, does anyone know how to do this?
[This message has been edited by modder00 (edited 08-15-2016 @ 04:45 PM).]