maxman
Well-known member
I'm trying to include sounds while selecting remaps in the select screen, but no matter how many times I tried, any given sound plays randomly while toggling up/down directions. It's not playing one sound per selecting a remap. For instance, when I press up to the first alternate palette from the default palette, I want one sound to play everytime up/down is pressed. Also, I'm trying not to use script tags for this, but they do work at my disposal when things don't work out for me. However, for this one, it doesn't trigger the sound to play everytime it's toggled with up/down.
I also tried keyscript with it, but no sound is playing at all.
How can I get a different sound to play when selecting each remap with up/down?
C:
anim waiting
@script
if(openborvariant("in_selectscreen")){
void self = getlocalvar("self");
int index = getentityproperty(self, "playerindex");
int hold = getplayerproperty(index, "keys");
int press = getplayerproperty(index, "newkeys");
int map = getentityproperty(self, "map");
void sfx01 = loadsample("data/sounds/heroes/terry/06_terry_00000.wav");
void sfx02 = loadsample("data/sounds/heroes/terry/06_terry_00001.wav");
void sfx03 = loadsample("data/sounds/heroes/terry/06_terry_00002.wav");
void sfx04 = loadsample("data/sounds/heroes/terry/06_terry_00002.wav");
if(getlocalvar("remapSFX") == NULL()){
/*if(
(press & openborconstant("FLAG_MOVEDOWN") )
|| (press & openborconstant("FLAG_MOVEUP") )
)
{
playsample(sfx01, 0, 120, 120, 100, 0);
setlocalvar("remapSFX", 1);
}*/
if(map == 0 && press & openborconstant("FLAG_MOVEUP") ){
playsample(sfx01, 0, 120, 120, 100, 0);
setlocalvar("remapSFX", 1);
}
if(map == 1 && press & openborconstant("FLAG_MOVEUP") ){
playsample(sfx02, 0, 120, 120, 100, 0);
setlocalvar("remapSFX", 1);
}
if(map == 2 && press & openborconstant("FLAG_MOVEUP") ){
playsample(sfx03, 0, 120, 120, 100, 0);
setlocalvar("remapSFX", 1);
}
}
if(getlocalvar("remapSFX") != NULL()){
setlocalvar("remapSFX", NULL());
}
}
@end_script
offset 140 188
loop 1
delay 10
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_0.png
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_1.png
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_2.png
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_3.png
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_4.png
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_5.png
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_6.png
frame data/chars/heroes/KOF_2K3_Terry_Sprite.7z/0_7.png
I also tried keyscript with it, but no sound is playing at all.
How can I get a different sound to play when selecting each remap with up/down?
Last edited: