User Tools

Site Tools


adding_new_sounds_via_new_sound_definitions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

adding_new_sounds_via_new_sound_definitions [2018/08/16 00:01]
phanjam created
adding_new_sounds_via_new_sound_definitions [2018/08/16 02:03] (current)
phanjam [Overview]
Line 39: Line 39:
  
  
-=== Use it in the game (under construction) ​===+=== Use it in the game ===
  
 There'​s 2 ways I know of to call a sound in the game. There'​s 2 ways I know of to call a sound in the game.
  
-1. Calling a sound in a .LAYOUT file+==1. Calling a sound in a .LAYOUT file==
  
-in skillsthe layouts will call it by GUID (altho in GUTS u just select it from dropdown+Without this becoming a tutorial for .LAYOUT file editingi'​ll ​just say that .LAYOUTs call sounds with DESCRIPTOR block like this...
  
-2. Calling a sound via the .ANIMATION file+<​code>​ 
 + [BASEOBJECT] 
 + [PROPERTIES] 
 + <​STRING>​DESCRIPTOR:​Sound 
 + <​STRING>​NAME:​Sound0 
 + <​INTEGER64>​PARENTID:​-1 
 + <​INTEGER64>​ID:​1996780824375005662 
 + <​BOOL>​START ON ACTIVATE:​false 
 + <​FLOAT>​RADIUS:​14 
 + <​STRING>​GUID:​156804347996279262 
 + [/​PROPERTIES] 
 + [/​BASEOBJECT] 
 +</​code>​ 
 +  
 +That last <​STRING>​GUID:​ line is the GUID of whatever sound it's calling, as defined in the sound'​s SOUNDDATA. You can actually just substitute the GUID of your new sound and that's what will play. This will be true whether it's a [Layout] or a [Particle Creator] .LAYOUT file. 
 + 
 +If the timing of your sound is important, you can call it from within a [Layout] (the .LAYOUT files called within skill .DATs) so that you can set it on the layout'​s timeline (assuming there is one). 
 + 
 +Particle .LAYOUT files can have timelines too, but usually don't. So you can call your sound from a particle .LAYOUT too, if timing is not important. 
 + 
 + 
 +==2. Calling a sound via the .ANIMATION file== 
 + 
 +You can also call a sound as part of an animation. Here are some code examples of that... 
 + 
 +<​code>​ 
 + [ANIMATION] 
 + <​STRING>​FILE:​attack3.skeleton 
 + <​STRING>​NAME:​Attack3 
 + <​FLOAT>​DURATION:​1.33333 
 + [KEY] 
 + <​STRING>​NAME:​HIT 
 + <​FLOAT>​FRAME:​24.086 
 + [/KEY] 
 + [KEY] 
 + <​STRING>​NAME:​PLAYSOUND 
 + <​FLOAT>​FRAME:​7.31181 
 + <​STRING>​SOUND:​ARMADAXSNORT 
 + [/KEY] 
 + [KEY] 
 + <​STRING>​NAME:​PLAYSOUND 
 + <​FLOAT>​FRAME:​21.8494 
 + <​STRING>​SOUND:​ARMADAXROLL 
 + [/KEY] 
 + [/​ANIMATION] 
 +</​code>​ 
 + 
 +That last [KEY] block has a PLAYSOUND command set to go off on FRAME 21.8494 and it calls the "​ARMADAXROLL"​ sound by its NAME from the sound'​s SOUNDDATA definition. 
 + 
 +The way those grunting sounds are called when your character attacks is a little different - the [KEY] for it just mentions the name directly, so like "<​STRING>​NAME:​EFFORT"​ (instead of a PLAYSOUND command). Also I think you can do it this way __only__ for sounds which have been defined in the .DAT of the class. This all gets murky so let's not go there atm. Suffice it to say, using the PLAYSOUND key should give you what you wnat 90% of the time. 
 + 
 +Calling a sound via a .ANIMATION file is useful for when you want the sound used to be gender-specific,​ since you've got both a male and a female .ANIMATION file so you can specify different sound NAMEs for eaach one.
  
-animations call sounds directly by NAME from within the .ANIMATION files of the model in question. See those [KEY] lines with like NAME:EFFORT in them? "​Effort"​ is the NAME of that grunting sound your char makes and the animation [KEY] is calling for that sound to play at certain frames of the animation. 
adding_new_sounds_via_new_sound_definitions.txt · Last modified: 2018/08/16 02:03 by phanjam