Ru/Making GLaDOS speak

From Valve Developer Community
< Ru
Revision as of 02:47, 23 August 2008 by AtzaK (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Использование стандартных звуков

Это легко - создать голос компа GLaDOS, но легкий метод не так хорош. Можно использовать ambient_generic для создания голоса, но есть загвоздка: ambient_generic обьекты продолжают играть, даже если игра на паузе (во тебе и "ambient" в названии!).

На картах Valve используестся logic_choreographed_scene. Вот как сделать голос GLaDOS на своих картах с помощью logic_choreographed_scene:

  1. Создайте маленькую комнатку вне обычной зоны игрового процесса (типа туалет). Покройте стены текстурой "nodraw".
  2. Внутри комнатки создайте generic_actor энтити. Поставте модель models/props/metal_box.mdl' или что-то похожее. Моделька не очень подходит, но Valve использует metal_box потому, что на карте эта модель часто используется (для сохранения памяти).
  3. Поставте в generic_ai поле "Name" как Aperture_AI (можно ТОЛЬКО Aperture_AI, потому, что по-другому просто-напросто карты не будет работать). перевод в прогрессе.......
  4. Create a logic_choreographed_scene in your play area and set the Scene property to whatever scene you want to play.
Note.pngПримечание:If you are making a scene for cameras, you might want to try the following scenes out.

There are also many scenes that can be made for special use, including things like weighted storage cubes, and cameras.

Cameras

Note.pngПримечание:As soon as you put an Aperture_AI, GlaDOS will automatically play one of the following scenes when a camera gets detached.
* scenes\general\generic_security_camera_destroyed-1.vcd
* scenes\general\generic_security_camera_destroyed-2.vcd
* scenes\general\generic_security_camera_destroyed-3.vcd
* scenes\general\generic_security_camera_destroyed-4.vcd
* scenes\general\generic_security_camera_destroyed-5.vcd

Storage Cubes

* general\ai_box_fried.vcd
* general\ai_box_lost.vcd

Now, just trigger the logic_choreographed_scene entity and listen to GLaDOS speak!

Custom sounds

You can put in your own sounds for GLaDOS's voice if you like - just follow these steps:

Note.pngПримечание:You should know about making triggers, inputs and outputs already before trying this!
  1. Create your sound and place it in "~/USERNAME/portal/portal/sound/MAPNAME/"
  2. Place an ambient_generic anywhere in your map - preferably near the trigger that will activate it.
  3. Open the "Sound Name" field in the ambient_generic's properties and browse for your sound name.
  4. Make a name for your ambient_generic, trigger it with a PlaySound input from somewhere, and it should work.

Important notes

  • Your audio file needs to be a .wav file, preferably 22050 Hz Sample Rate and Playback Rate.
  • When distributing the map, you will need to either package the sound with the map or use bspzip to add the files to your .bsp if you want the sounds to be heard by recipients of your map.
    • If you use bspzip, make sure to use all lowercase letters on everything and to use the .bsp internal sound folder of "/sound/MAPNAME/sound.wav"
  • If things don't work correctly, try to trigger the sound in-game, then look at the developer's console and see if it gives you an error; this can be a valuable troubleshooting tool.

See also