posted 01-10-2002 03:29 PM
Hmmmh...i think this will take a long post.First, note that trviewer work with already compiled TR4 files, so you can only assign sounds that was included in the level when was compiled, this mean that you can't assign the wave sound suppling the name in trviewer.
Extract your working Raptor/T-rex to *.trmvb file format, then using the level editor build any level editing the sound script for include your raptor/-trex sounds so they will be compiled in the TR4.
Then use trviewer for import the raptor/t-rex from the *.trmvb file, and assing the sound to the animations.
check this post where a explain how to assing sounds to the animations.
http://pub19.ezboard.com/ftreditingzonefrm2.showMessage?topicID=493.topic
There are two ways to find out what is the ID sound that you need:
1.- Looking the sound Id from others enemies and using that value in your custom enemy.
2.- Go to the trviewer "SOUNDs" list where you will see all the sounds availible in the level, they are well rotuled and even you can press the "play" button the hear the sound.
When you select a sound take note the "internal sound index" value info.
Now, before use this sound index value in the play_sound comamnd you need to enable the 15th bit if the enemy is in the Land and the 16th bit if the enmey is in the water, This is a litle tricky If you don;t know anything about "Bits", "bytes" and "words", but furtunately i think that you can do it using the Calc program included in Windows:
1.- go to start, programs, accesories, calculator
2.- select the "sciencie" view way.
3.- Select the DEC mode
4.- Type the sound index value (for exaple "80" for the croc attack sound)
5.- now select the BIN mode, the calc program will show you how is your value in "bits" way, you will see some "1"s and "0"s for example for value 80 you will see 1010000. write in a paper this value.
6.- count how much digits you binary value is, (for my example there are 7 digits)
7.- Now you need to "make" a value using 16 digits so complete with "0" the missing digits for your binary sound index value but using a "1" in the 16th digit. example:
80 = 1010000 (7 digist)
= 100000000 (9 missing digis, 16th=1)
----------
1000000001010000 = New binary value
8.- Now type your new binary value in the calc and select back the DEC mode, you will see the sound index value that you need to use in the play_sound command. (in my example is 32848).
**************************************
If you want to try to port a enemy or build a new one using 3d stidio max, then i suggest to read carefuly this thread:
http://pub19.ezboard.com/ftreditingzonefrm2.showMessage?topicID=465.topic
Realy, TRviewer is the mother of all programs, and E.Popov is one of the best programer in the world.
Good luck.
Turbo Pascal