Короче, суть такая.
Кастомную озвучку делаю так: регается событие unit_selected для конкретного юнита,
дальше триггер:
  • отключает себя во избежание звукоабуза
  • задаёт случайное значение переменной от 1 до x-xxx, сколько там звуков.
Далее идут ифзенэлсы от 1 до xxx
if (udg_integer == 1) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath1, 100, GetTriggerUnit() )
else
if (udg_integer == 2) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath2, 100, GetTriggerUnit() )
else
if (udg_integer == 3) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath3, 100, GetTriggerUnit() )
else
и так до последнего звука из саундсета.
Потом триггер запускает однократный таймер в Y секунд, после завершения которого исходный триггер (занесенный ранее в хэш) включается обратно.
Всё так-то действует. Но иногда при выделении юнита может проявиться раздражающее подлагивание. Чтобы его убрать, продрачиваются туда-сюда громкости звуков и изменение значения Y (просто больше ничего придумать не удаётся), и в конце концов обычно такое шаманство приводит к чему-то приемлемому (подлагивание устраняется до незаметного уровня). А бывает и так, что просто во время игры это подлагивание при выделении то достаточно заметно проявляется, то внезапно пропадает и все как по маслу идет (ну это если так-то отмечено, что оно ещё не устранилось).
Собственно прошу прокомментировать и посоветовать по оптимизации. Понимаю, что в идеале вообще должны быть кастомные саундсеты, но всё никак это раскурить не могу, да и, ятп, там не только вшивать в мпкью придётся, но и формат звуковых файлов нужный ставить, а их и так нарезать ещё и громкость настраивать...

Принятый ответ

ClotPh:
Ige, т. е. как-то так (при инициализации)?
call Preload (war3mapImported\SingerOfDeath1.wav)
call Preload("war3mapImported\\SingerOfDeath1.wav")

Показан только небольшой набор комментариев вокруг указанного. Перейти к актуальным.
0
21
7 лет назад
0
Че еще подумалось... может, есть смысл кастомные звуки "прелоадить" - при инициализации карты массово проигрывать с громкостью 0? Или бред и ни на что не повлияет?
2
32
7 лет назад
2
ClotPh:
Че еще подумалось... может, есть смысл кастомные звуки "прелоадить" - при инициализации карты массово проигрывать с громкостью 0? Или бред и ни на что не повлияет?
Надо же, сам ответил на свой вопрос - подгрузка звуков требует времени, для подгрузки есть целый набор функций preload.
Так что подгружаем все звуки вначале, чтобы не было просадки фпс.
0
21
7 лет назад
0
quq_CCCP, то есть уточни, плз: их проиграть при инициализации карты с громкостью 0? Или что конкретно сделать? Хочется увидеть образец прелоада на 1 любой звук.
0
32
7 лет назад
0
ClotPh, просто загрузи прелоадом. Уже 100500 раз выкладывал код, поиск в помощь.
0
21
7 лет назад
0
Только вот что находит:
Но не прелоадить же каждый из сотен (если не тысяч потом) звуков подобным образом, это же бред, да и тема столетняя
Короче, если не получаю ясности, для начала пока попробую проиграть звуки с громкостью 0 при инициализации и посмотрю, что получится
0
26
7 лет назад
0
полный код в студию.
0
21
7 лет назад
Отредактирован Кет
0
Hate, так мб уже определимся, проблема в коде или в отсутствии прелоада звука.
Я пока прелоад попробую все-таки.
На, код тупейший, знаю, зато понятный шаблон, просто при новом персонаже имя меняешь и все.
Функция реагирует на выделение героя с нужным саундсетом (и только его).
2.5 это сейчас там таймер стоит, а вообще там число меняется от 0.7 до 3, пока мне не покажется, что так меньше лагает
function SingerOfDeathSounds2 takes nothing returns nothing
local timer t = GetExpiredTimer()
local trigger sounds = LoadTriggerHandle(udg_Hash,GetHandleId(t),10)
call EnableTrigger(sounds)
call PauseTimer(t)
call DestroyTimer(t)
call FlushChildHashtable(udg_Hash,GetHandleId(t))
set sounds = null
set t = null
endfunction

function SingerOfDeathSounds takes nothing returns nothing
local timer t = CreateTimer()
local trigger sounds = GetTriggeringTrigger()

//Много звуков - лучше так - ПЯТИДЕСЯТИБЛОКАМИ И ДАЖЕ ЧЕРЕЗ ГЛОБАЛКУ В РЕДКОМ СЛУЧАЕ
if ( GetPlayerController(GetOwningPlayer(GetTriggerUnit())) == MAP_CONTROL_USER ) then
set udg_integer = GetRandomInt (1, 175)


//ОТКРЫТО

if (udg_integer == 1) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath1, 100, GetTriggerUnit() )
else
if (udg_integer == 2) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath2, 100, GetTriggerUnit() )
else
if (udg_integer == 3) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath3, 100, GetTriggerUnit() )
else
if (udg_integer == 4) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath4, 100, GetTriggerUnit() )
else
if (udg_integer == 5) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath5, 100, GetTriggerUnit() )
else
if (udg_integer == 6) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath6, 100, GetTriggerUnit() )
else
if (udg_integer == 7) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath7, 100, GetTriggerUnit() )
else
if (udg_integer == 8) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath8, 100, GetTriggerUnit() )
else
if (udg_integer == 9) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath9, 100, GetTriggerUnit() )
else
if (udg_integer == 10) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath10, 100, GetTriggerUnit() )
else
if (udg_integer == 11) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath11, 100, GetTriggerUnit() )
else
if (udg_integer == 12) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath12, 100, GetTriggerUnit() )
else
if (udg_integer == 13) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath13, 100, GetTriggerUnit() )
else
if (udg_integer == 14) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath14, 100, GetTriggerUnit() )
else
if (udg_integer == 15) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath15, 100, GetTriggerUnit() )
else
if (udg_integer == 16) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath16, 100, GetTriggerUnit() )
else
if (udg_integer == 17) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath17, 100, GetTriggerUnit() )
else
if (udg_integer == 18) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath18, 100, GetTriggerUnit() )
else
if (udg_integer == 19) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath19, 100, GetTriggerUnit() )
else
if (udg_integer == 20) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath20, 100, GetTriggerUnit() )
else
if (udg_integer == 21) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath21, 100, GetTriggerUnit() )
else
if (udg_integer == 22) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath22, 100, GetTriggerUnit() )
else
if (udg_integer == 23) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath23, 100, GetTriggerUnit() )
else
if (udg_integer == 24) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath24, 100, GetTriggerUnit() )
else
if (udg_integer == 25) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath25, 100, GetTriggerUnit() )
else
if (udg_integer == 26) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath26, 100, GetTriggerUnit() )
else
if (udg_integer == 27) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath27, 100, GetTriggerUnit() )
else
if (udg_integer == 28) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath28, 100, GetTriggerUnit() )
else
if (udg_integer == 29) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath29, 100, GetTriggerUnit() )
else
if (udg_integer == 30) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath30, 100, GetTriggerUnit() )
else
if (udg_integer == 31) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath31, 100, GetTriggerUnit() )
else
if (udg_integer == 32) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath32, 100, GetTriggerUnit() )
else
if (udg_integer == 33) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath33, 100, GetTriggerUnit() )
else
if (udg_integer == 34) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath34, 100, GetTriggerUnit() )
else
if (udg_integer == 35) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath35, 100, GetTriggerUnit() )
else
if (udg_integer == 36) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath36, 100, GetTriggerUnit() )
else
if (udg_integer == 37) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath37, 100, GetTriggerUnit() )
else
if (udg_integer == 38) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath38, 100, GetTriggerUnit() )
else
if (udg_integer == 39) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath39, 100, GetTriggerUnit() )
else
if (udg_integer == 40) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath40, 100, GetTriggerUnit() )
else
if (udg_integer == 41) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath41, 100, GetTriggerUnit() )
else
if (udg_integer == 42) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath42, 100, GetTriggerUnit() )
else
if (udg_integer == 43) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath43, 100, GetTriggerUnit() )
else
if (udg_integer == 44) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath44, 100, GetTriggerUnit() )
else
if (udg_integer == 45) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath45, 100, GetTriggerUnit() )
else
if (udg_integer == 46) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath46, 100, GetTriggerUnit() )
else
if (udg_integer == 47) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath47, 100, GetTriggerUnit() )
else
if (udg_integer == 48) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath48, 100, GetTriggerUnit() )
else
if (udg_integer == 49) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath49, 100, GetTriggerUnit() )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
if (udg_integer == 50) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath50, 100, GetTriggerUnit() )
else
endif

//ЗАКРЫТО


//ОТКРЫТО

if (udg_integer == 51) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath51, 100, GetTriggerUnit() )
else
if (udg_integer == 52) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath52, 100, GetTriggerUnit() )
else
if (udg_integer == 53) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath53, 100, GetTriggerUnit() )
else
if (udg_integer == 54) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath54, 100, GetTriggerUnit() )
else
if (udg_integer == 55) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath55, 100, GetTriggerUnit() )
else
if (udg_integer == 56) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath56, 100, GetTriggerUnit() )
else
if (udg_integer == 57) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath57, 100, GetTriggerUnit() )
else
if (udg_integer == 58) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath58, 100, GetTriggerUnit() )
else
if (udg_integer == 59) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath59, 100, GetTriggerUnit() )
else
if (udg_integer == 60) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath60, 100, GetTriggerUnit() )
else
if (udg_integer == 61) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath61, 100, GetTriggerUnit() )
else
if (udg_integer == 62) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath62, 100, GetTriggerUnit() )
else
if (udg_integer == 63) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath63, 100, GetTriggerUnit() )
else
if (udg_integer == 64) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath64, 100, GetTriggerUnit() )
else
if (udg_integer == 65) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath65, 100, GetTriggerUnit() )
else
if (udg_integer == 66) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath66, 100, GetTriggerUnit() )
else
if (udg_integer == 67) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath67, 100, GetTriggerUnit() )
else
if (udg_integer == 68) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath68, 100, GetTriggerUnit() )
else
if (udg_integer == 69) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath69, 100, GetTriggerUnit() )
else
if (udg_integer == 70) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath70, 100, GetTriggerUnit() )
else
if (udg_integer == 71) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath71, 100, GetTriggerUnit() )
else
if (udg_integer == 72) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath72, 100, GetTriggerUnit() )
else
if (udg_integer == 73) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath73, 100, GetTriggerUnit() )
else
if (udg_integer == 74) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath74, 100, GetTriggerUnit() )
else
if (udg_integer == 75) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath75, 100, GetTriggerUnit() )
else
if (udg_integer == 76) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath76, 100, GetTriggerUnit() )
else
if (udg_integer == 77) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath77, 100, GetTriggerUnit() )
else
if (udg_integer == 78) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath78, 100, GetTriggerUnit() )
else
if (udg_integer == 79) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath79, 100, GetTriggerUnit() )
else
if (udg_integer == 80) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath80, 100, GetTriggerUnit() )
else
if (udg_integer == 81) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath81, 100, GetTriggerUnit() )
else
if (udg_integer == 82) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath82, 100, GetTriggerUnit() )
else
if (udg_integer == 83) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath83, 100, GetTriggerUnit() )
else
if (udg_integer == 84) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath84, 100, GetTriggerUnit() )
else
if (udg_integer == 85) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath85, 100, GetTriggerUnit() )
else
if (udg_integer == 86) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath86, 100, GetTriggerUnit() )
else
if (udg_integer == 87) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath87, 100, GetTriggerUnit() )
else
if (udg_integer == 88) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath88, 100, GetTriggerUnit() )
else
if (udg_integer == 89) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath89, 100, GetTriggerUnit() )
else
if (udg_integer == 90) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath90, 100, GetTriggerUnit() )
else
if (udg_integer == 91) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath91, 100, GetTriggerUnit() )
else
if (udg_integer == 92) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath92, 100, GetTriggerUnit() )
else
if (udg_integer == 93) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath93, 100, GetTriggerUnit() )
else
if (udg_integer == 94) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath94, 100, GetTriggerUnit() )
else
if (udg_integer == 95) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath95, 100, GetTriggerUnit() )
else
if (udg_integer == 96) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath96, 100, GetTriggerUnit() )
else
if (udg_integer == 97) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath97, 100, GetTriggerUnit() )
else
if (udg_integer == 98) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath98, 100, GetTriggerUnit() )
else
if (udg_integer == 99) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath99, 100, GetTriggerUnit() )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
if (udg_integer == 100) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath100, 100, GetTriggerUnit() )
else
endif

//ЗАКРЫТО

//ОТКРЫТО

if (udg_integer == 101) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath101, 100, GetTriggerUnit() )
else
if (udg_integer == 102) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath102, 100, GetTriggerUnit() )
else
if (udg_integer == 103) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath103, 100, GetTriggerUnit() )
else
if (udg_integer == 104) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath104, 100, GetTriggerUnit() )
else
if (udg_integer == 105) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath105, 100, GetTriggerUnit() )
else
if (udg_integer == 106) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath106, 100, GetTriggerUnit() )
else
if (udg_integer == 107) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath107, 100, GetTriggerUnit() )
else
if (udg_integer == 108) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath108, 100, GetTriggerUnit() )
else
if (udg_integer == 109) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath109, 100, GetTriggerUnit() )
else
if (udg_integer == 110) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath110, 100, GetTriggerUnit() )
else
if (udg_integer == 111) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath111, 100, GetTriggerUnit() )
else
if (udg_integer == 112) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath112, 100, GetTriggerUnit() )
else
if (udg_integer == 113) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath113, 100, GetTriggerUnit() )
else
if (udg_integer == 114) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath114, 100, GetTriggerUnit() )
else
if (udg_integer == 115) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath115, 100, GetTriggerUnit() )
else
if (udg_integer == 116) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath116, 100, GetTriggerUnit() )
else
if (udg_integer == 117) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath117, 100, GetTriggerUnit() )
else
if (udg_integer == 118) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath118, 100, GetTriggerUnit() )
else
if (udg_integer == 119) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath119, 100, GetTriggerUnit() )
else
if (udg_integer == 120) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath120, 100, GetTriggerUnit() )
else
if (udg_integer == 121) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath121, 100, GetTriggerUnit() )
else
if (udg_integer == 122) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath122, 100, GetTriggerUnit() )
else
if (udg_integer == 123) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath123, 100, GetTriggerUnit() )
else
if (udg_integer == 124) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath124, 100, GetTriggerUnit() )
else
if (udg_integer == 125) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath125, 100, GetTriggerUnit() )
else
if (udg_integer == 126) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath126, 100, GetTriggerUnit() )
else
if (udg_integer == 127) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath127, 100, GetTriggerUnit() )
else
if (udg_integer == 128) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath128, 100, GetTriggerUnit() )
else
if (udg_integer == 129) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath129, 100, GetTriggerUnit() )
else
if (udg_integer == 130) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath130, 100, GetTriggerUnit() )
else
if (udg_integer == 131) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath131, 100, GetTriggerUnit() )
else
if (udg_integer == 132) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath132, 100, GetTriggerUnit() )
else
if (udg_integer == 133) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath133, 100, GetTriggerUnit() )
else
if (udg_integer == 134) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath134, 100, GetTriggerUnit() )
else
if (udg_integer == 135) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath135, 100, GetTriggerUnit() )
else
if (udg_integer == 136) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath136, 100, GetTriggerUnit() )
else
if (udg_integer == 137) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath137, 100, GetTriggerUnit() )
else
if (udg_integer == 138) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath138, 100, GetTriggerUnit() )
else
if (udg_integer == 139) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath139, 100, GetTriggerUnit() )
else
if (udg_integer == 140) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath140, 100, GetTriggerUnit() )
else
if (udg_integer == 141) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath141, 100, GetTriggerUnit() )
else
if (udg_integer == 142) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath142, 100, GetTriggerUnit() )
else
if (udg_integer == 143) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath143, 100, GetTriggerUnit() )
else
if (udg_integer == 144) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath144, 100, GetTriggerUnit() )
else
if (udg_integer == 145) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath145, 100, GetTriggerUnit() )
else
if (udg_integer == 146) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath146, 100, GetTriggerUnit() )
else
if (udg_integer == 147) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath147, 100, GetTriggerUnit() )
else
if (udg_integer == 148) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath148, 100, GetTriggerUnit() )
else
if (udg_integer == 149) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath149, 100, GetTriggerUnit() )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
if (udg_integer == 150) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath150, 100, GetTriggerUnit() )
else
endif

//ЗАКРЫТО


//ОТКРЫТО

if (udg_integer == 151) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath151, 100, GetTriggerUnit() )
else
if (udg_integer == 152) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath152, 100, GetTriggerUnit() )
else
if (udg_integer == 153) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath153, 100, GetTriggerUnit() )
else
if (udg_integer == 154) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath154, 100, GetTriggerUnit() )
else
if (udg_integer == 155) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath155, 100, GetTriggerUnit() )
else
if (udg_integer == 156) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath156, 100, GetTriggerUnit() )
else
if (udg_integer == 157) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath157, 100, GetTriggerUnit() )
else
if (udg_integer == 158) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath158, 100, GetTriggerUnit() )
else
if (udg_integer == 159) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath159, 100, GetTriggerUnit() )
else
if (udg_integer == 160) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath160, 100, GetTriggerUnit() )
else
if (udg_integer == 161) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath161, 100, GetTriggerUnit() )
else
if (udg_integer == 162) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath162, 100, GetTriggerUnit() )
else
if (udg_integer == 163) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath163, 100, GetTriggerUnit() )
else
if (udg_integer == 164) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath164, 100, GetTriggerUnit() )
else
if (udg_integer == 165) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath165, 100, GetTriggerUnit() )
else
if (udg_integer == 166) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath166, 100, GetTriggerUnit() )
else
if (udg_integer == 167) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath167, 100, GetTriggerUnit() )
else
if (udg_integer == 168) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath168, 100, GetTriggerUnit() )
else
if (udg_integer == 169) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath169, 100, GetTriggerUnit() )
else
if (udg_integer == 170) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath170, 100, GetTriggerUnit() )
else
if (udg_integer == 171) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath171, 100, GetTriggerUnit() )
else
if (udg_integer == 172) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath172, 100, GetTriggerUnit() )
else
if (udg_integer == 173) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath173, 100, GetTriggerUnit() )
else
if (udg_integer == 174) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath174, 100, GetTriggerUnit() )
else
if (udg_integer == 175) then
call PlaySoundOnUnitBJ( gg_snd_SingerOfDeath175, 100, GetTriggerUnit() )
else
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif


//ЗАКРЫТО


//ЗАКРЫТО



endif
call DisableTrigger(GetTriggeringTrigger())
call SaveTriggerHandle(udg_Hash, GetHandleId(t),10,sounds)
call TimerStart (t, 2.5, false, function SingerOfDeathSounds2)
//Много звуков - лучше так - закрыто.
set sounds = null
set t = null
endfunction
0
33
7 лет назад
Отредактирован Кет
0
Мб просто все эти звуки в массив пихать и выдавать нужный по индексу? Типа
call PlaySoundOnUnitBJ(SingerOfDeath[GetRandomInt (0, 174)], 100, GetTriggerUnit())
вместо всего этого ужаса. Впрочем не знаю, поможет ли это твоей проблеме, но делать столько проверок явно не айс.
0
21
7 лет назад
Отредактирован ClotPh
0
Кет, ну можно, просто тогда для каждого саундсета свой глобальный массив надо.
Это вообще само по себе "особое" решение, знаю, должны нормально быть кастомные саундсеты =/
Если кому не влом, киньте, плз, тут линки еще раз на то, как свои саундсеты делать, у меня будет уже по ссылкам прямо перебираться с блога сюда, а тут по линкам туда и постепенно мб раскурю.
//////////
Ну нихрена пока не понятно еще, короче, в тест-карте прописано при запуске проигрывать все звуки Картуса с громкостью 0, ВРОДЕ СЕЙЧАС КАЖЕТСЯ, что все отлично (тот триг, что был выше, абсолютно не изменился, ща отталкиваюсь от того, что задача - спрелоадить звуки), но это не показатель, потому что минимум 1-2 раза уже так точно "казалось" после экспериментов с параметрами, а потом снова замечались подлагивания, ладно, после импорта в основные карты этого "прелоада" будет видно.
/////////
Ага, вот про звуковые сеты
Когда-нить мб пригодится
////////////
ТАК! Ну расклад такой. Сейчас протестировалась уже оптимизированная карта.
В общем, дело такое: поставлено проигрывать все звуки Картуса в начале одного триггера (на старте буквально сразу). В этот момент ощущается четкий сильный лаг, а потом пока лагов замечено не было.
Так что да, ятп, суть в необходимости прелоада.
Офк один "типа лаг" вначале в тысячу раз лучше небольших лагов в процессе геймплея. Но проблема в том, что если дальше делать так, то он будет только расти и расти. Можно ли прелоадить без лага? Ну не нахожу ничего, кроме вот той ссылки, и там вроде не то. Или только дораскуривать создание своих саундсетов через потрошение варкрафта?
1
26
7 лет назад
1
и рыбку съесть, и на жопу сесть?
0
21
7 лет назад
0
А почему нет? Если это, конечно, возможно.
Показан только небольшой набор комментариев вокруг указанного. Перейти к актуальным.
Чтобы оставить комментарий, пожалуйста, войдите на сайт.