HLFX.Ru Forum (https://hlfx.ru/forum/index.php)
- Half-Life SDK (https://hlfx.ru/forum/forumdisplay.php?forumid=8)
-- Помогите с ученым (https://hlfx.ru/forum/showthread.php?threadid=2529)
Отправлено Alex_Gordon 06-01-2011 в 08:46:
 Помогите с ученым
Решил сделать монстра - копию ученого. Все скомпилилось отлично, но при входе в игру идет просто вылет, без всяких ошибок. В чем дело? не пойму. Прикладываю исходник.
Добавлено 06-01-2011 в 13:46:
Монстр - ученый-женщина
__________________
Ха, тюремный автомобиль!!!
Ιερά λάμδα
Quisque moritur Gordon sinistram. Alex Gordon.
 
Отправлено Ku2zoff 06-01-2011 в 08:52:
 
C++ Source Code:
| 1 | void CScientistWoman :: Precache( void ) | 
| 3 |   [u]PRECACHE_MODEL("models/scientist.mdl");[/u] | 
| 4 |   PRECACHE_SOUND("scientist/sci_pain1.wav"); | 
| 5 |   PRECACHE_SOUND("scientist/sci_pain2.wav"); | 
| 6 |   PRECACHE_SOUND("scientist/sci_pain3.wav"); | 
| 7 |   PRECACHE_SOUND("scientist/sci_pain4.wav"); | 
| 8 |   PRECACHE_SOUND("scientist/sci_pain5.wav"); | 
| 10 |   // every new scientist must call this, otherwise | 
| 11 |   // when a level is loaded, nobody will talk (time is reset to 0) | 
| 14 |   CTalkMonster::Precache(); | 
 
В спавне назначил новую модель, а прекэшируешь старую.
Вообще сделай этого монстра хаком, как ДМ в блушифт-патче Розенберга сделал. Или наследованием класса.
Отправлено Alex_Gordon 06-01-2011 в 12:14:
 
Ku2zoff да, прямо детские ошибки делаю)
Спасибо)
Добавлено 06-01-2011 в 15:37:
Еща какая-то фигня со звуками... записал новые, добавил из в sentenses, изменил в коде... все равно мужским голосом разговаривает)
Добавлено 06-01-2011 в 17:14:
Никто не знает, в чем дело?
__________________
Ха, тюремный автомобиль!!!
Ιερά λάμδα
Quisque moritur Gordon sinistram. Alex Gordon.
 
Отправлено Дядя Миша 06-01-2011 в 12:18:
 
Цитата:
Alex_Gordon писал:
да, прямо детские ошибки делаю)
детские ошибки проще исправлять =)__________________
My Projects: download page
F.A.Q по XashNT
Блог разработчика в телеграме
Цитата:
C:\DOCUME~1\C4C5~1\LOCALS~1\Temp\a33328if(72) : see declaration of 'size_t'
Отправлено Ku2zoff 06-01-2011 в 12:25:
 
>>все равно мужским голосом разговаривает
А новые фразы женским записаны? А то вдруг нет  А по правде говоря, либо ты в коде что-то упустил, либо в sentences.txt пути неправльные или названия предложений.
 А по правде говоря, либо ты в коде что-то упустил, либо в sentences.txt пути неправльные или названия предложений.
Отправлено Alex_Gordon 06-01-2011 в 17:36:
 
не знаю.... вот на всякий случай из sentences.txt:
C++ Source Code:
| 3 | WSC_OK0 wscientist/excellentteam | 
| 4 | WSC_OK1 wscientist/fellowscientist | 
| 6 | WSC_OK3 wscientist/leadtheway | 
| 7 | WSC_OK4 wscientist/yesletsgo | 
| 8 | WSC_OK5 wscientist/alright | 
| 10 | WSC_WAIT0 wscientist/beenaburden | 
| 11 | WSC_WAIT1 wscientist/illwaithere | 
| 12 | WSC_WAIT2 wscientist/istay | 
| 13 | WSC_WAIT3 wscientist/illwait | 
| 15 | // fail to follow player any more | 
| 16 | WSC_STOP0 wscientist/stop1 | 
| 17 | WSC_STOP1 wscientist/stop3 | 
| 18 | WSC_STOP2 wscientist/stop4 | 
| 20 | // player is staring at scientist | 
| 21 | WSC_STARE0 wscientist/areyouthink | 
| 23 | WSC_HELLO0 wscientist/afellowsci | 
| 24 | WSC_HELLO1 wscientist/hello | 
| 26 | WSC_ANSWER0 wscientist/absolutely | 
| 27 | WSC_ANSWER1 wscientist/yes | 
| 28 | WSC_ANSWER2 wscientist/absolutelynot | 
| 29 | WSC_ANSWER3 wscientist/completelywrong | 
| 30 | WSC_ANSWER4 wscientist/cantbeserious | 
| 32 | WSC_QUESTION0 wscientist/areyouthink | 
| 33 | WSC_QUESTION1 wscientist/cantbeworse | 
| 34 | WSC_QUESTION2 wscientist/waithere | 
| 35 | WSC_QUESTION3 wscientist/catchone | 
| 36 | WSC_QUESTION4 wscientist/alientrick | 
| 37 | WSC_QUESTION5 wscientist/alienappeal | 
| 38 | WSC_QUESTION6 wscientist/announcer | 
| 40 | WSC_IDLE0 wscientist/containfail | 
| 41 | WSC_IDLE1 wscientist/chaostheory | 
| 42 | WSC_IDLE2 wscientist/bloodsample | 
| 43 | WSC_IDLE3 wscientist/administrator | 
| 45 | WSC_NOGO wscientist/dontgothere | 
| 47 | WSC_HEAR0 wscientist/didyouhear | 
| 49 | WSC_PLFEAR0 wscientist/canttakemore | 
| 51 | WSC_FEAR0 wscientist/startle1 | 
| 52 | WSC_FEAR1 wscientist/startle2 | 
| 54 | WSC_SCREAM0 wscientist/bn_die1 | 
| 56 | WSC_SCARED0 wscientist/stopattacking | 
| 58 | // predisaster scientist | 
| 60 | WSC_PHELLO0 wscientist/hellofreeman | 
| 61 | WSC_PHELLO1 wscientist/hello | 
| 62 | WSC_PHELLO2 wscientist/freeman | 
| 64 | WSC_PQUEST0 wscientist/beverage | 
| 65 | WSC_PQUEST1 wscientist/correcttheory | 
| 66 | WSC_PQUEST2 wscientist/analysis | 
| 67 | WSC_PQUEST3 wscientist/purereadings | 
| 68 | WSC_PQUEST4 wscientist/delayagain | 
| 69 | WSC_PQUEST5 wscientist/checkatten | 
| 71 | WSC_PIDLE0 wscientist/runtest | 
| 72 | WSC_PIDLE1 wscientist/asexpected | 
| 73 | WSC_PIDLE2 wscientist/allnominal | 
| 75 | //If you use Scientists before the disaster | 
| 77 | WSC_POK0 wscientist/sci_alone | 
| 78 | WSC_POK1 wscientist/sci_busy | 
| 79 | WSC_POK2 wscientist/sci_aftertest | 
 
И в аттаче исходник
Добавлено 06-01-2011 в 22:36:
Может я что-то упустил? Посмотрите плз, мне очень надо!__________________
Ха, тюремный автомобиль!!!
Ιερά λάμδα
Quisque moritur Gordon sinistram. Alex Gordon.
 
Отправлено Ku2zoff 06-01-2011 в 23:41:
 
Alex_Gordon в коде не все предложения поменял, некоторые с префикса sc_ начинаются.