Add some new macros for greatly beautify the macroifying...

...of sounds in animations. For starters, converted all core units
using poison to use the new poison sound macro.
This commit is contained in:
Lari Nieminen 2007-12-05 23:02:45 +00:00
parent 5bf97deee2
commit a4cafbc997
8 changed files with 91 additions and 37 deletions

View file

@ -228,3 +228,75 @@
#define SOUND_LIST:ZOMBIE_STRONG_HIT
zombie-hit-1.ogg,zombie-hit-2.ogg,zombie-hit-3.ogg #enddef
#define SOUND:SLOW
# A convenient way to use the standard slowing sound in an attack
# animation. Put anywhere inside an attack animation block.
[if]
hits=hit
[secondary_unit_filter]
[not]
[wml_filter]
[status]
slowed="yes"
[/status]
[/wml_filter]
[/not]
[/secondary_unit_filter]
slowed_sound_start_time={TIME}
[slowed_sound_frame]
duration=-100
sound=slowed.ogg
[/slowed_sound_frame]
[/if]
#enddef
#define SOUND:POISON
# A convenient way to use the standard poison sound in an attack
# animation. Put anywhere inside an attack animation block.
[if]
hits=hit
[secondary_unit_filter]
[not]
[wml_filter]
[status]
poisoned="yes"
[/status]
[/wml_filter]
[/not]
[/secondary_unit_filter]
poisoned_sound_start_time={TIME}
[poisoned_sound_frame]
duration=-100
sound=poison.ogg
[/poisoned_sound_frame]
[/if]
#enddef
#define SOUND:HIT_AND_MISS HITSOUND MISSSOUND TIME
# A more convenient way of wiring in hit and miss sounds to an
# attack animation. Just specify the sounds to use and the time
# when they should trigger.
[if]
hits=yes
attack_sound_start_time={TIME}
[attack_sound_frame]
sound={HITSOUND}
[/attack_sound_frame]
[/if]
[else]
hits=no
attack_sound_start_time={TIME}
[attack_sound_frame]
sound={MISSSOUND}
[/attack_sound_frame]
[/else]
#enddef

View file

@ -77,14 +77,12 @@ Special Notes:"+{SPECIAL_NOTES_BACKSTAB}+{SPECIAL_NOTES_POISON}+{SPECIAL_NOTES_S
sound=throwing-knife-miss.ogg
[/frame]
[/else]
{FRAME_ON_POISON (
[frame]
begin=-100
end=50
image="units/human-outlaws/assassin-throwknife2.png"
sound=poison.ogg
[/frame]
)}
{SOUND:POISON}
[frame]
begin=50
end=50
@ -187,11 +185,9 @@ Special Notes:"+{SPECIAL_NOTES_BACKSTAB}+{SPECIAL_NOTES_POISON}+{SPECIAL_NOTES_S
image="units/human-outlaws/assassin+female-throwknife1.png"
[/frame]
[/else]
{FRAME_ON_POISON (
[frame]
image="units/human-outlaws/assassin+female-throwknife2.png"
[/frame]
)}
[frame]
image="units/human-outlaws/assassin+female.png"
[/frame]

View file

@ -128,14 +128,12 @@ Special Notes:"+{SPECIAL_NOTES_POISON}+{SPECIAL_NOTES_SLOW}
sound={SOUND_LIST:MISS}
[/frame]
[/else]
{FRAME_ON_POISON (
[frame]
begin=-50
end=100
image="units/monsters/cavespider-attack-melee.png"
sound=poison.ogg
[/frame]
)}
{SOUND:POISON}
[frame]
begin=100
end=175

View file

@ -111,14 +111,12 @@ Special Notes:"+{SPECIAL_NOTES_POISON}
sound={SOUND_LIST:MISS}
[/frame]
[/else]
{FRAME_ON_POISON (
[frame]
begin=-50
end=100
image="units/monsters/scorpion-sting-attack.png"
sound=poison.ogg
[/frame]
)}
{SOUND:POISON}
[frame]
begin=100
end=200

View file

@ -98,21 +98,18 @@ Special Notes:"+{SPECIAL_NOTES_POISON}
image="projectiles/dagger-n.png"
image_diagonal="projectiles/dagger-ne.png"
[/missile_frame]
{HIT_MISS_SOUNDS throwing-knife.ogg throwing-knife-miss.ogg (
{HIT_MISS_SOUNDS throwing-knife.ogg throwing-knife-miss.ogg -200}
[frame]
begin=-200
end=-100
image="units/orcs/assassin-ranged1.png"
[/frame]
)}
{FRAME_ON_POISON (
[frame]
begin=-100
end=0
image="units/orcs/assassin-ranged2.png"
sound=poison.ogg
[/frame]
)}
{SOUND:POISON}
[/attack_anim]
[attack_anim]
[attack_filter]
@ -123,13 +120,12 @@ Special Notes:"+{SPECIAL_NOTES_POISON}
end=-150
image="units/orcs/assassin-attack1.png"
[/frame]
{HIT_MISS_SOUNDS dagger-swish.wav {SOUND_LIST:MISS} (
{HIT_MISS_SOUNDS dagger-swish.wav {SOUND_LIST:MISS} -100}
[frame]
begin=-150
end=100
image="units/orcs/assassin-attack2.png"
[/frame]
)}
[frame]
begin=100
end=200

View file

@ -74,14 +74,12 @@ Special Notes:"+{SPECIAL_NOTES_POISON}
sound=throwing-knife-miss.ogg
[/frame]
[/else]
{FRAME_ON_POISON (
[frame]
begin=-100
end=0
image="units/orcs/slayer-ranged2.png"
sound=poison.ogg
[/frame]
)}
{SOUND:POISON}
[/attack_anim]
[attack_anim]
[attack_filter]

View file

@ -68,14 +68,12 @@ Special Notes:"+{SPECIAL_NOTES_POISON}
sound={SOUND_LIST:MISS}
[/frame]
[/else]
{FRAME_ON_POISON (
[frame]
begin=-50
end=50
image="units/undead/ghoul-attack-3.png"
sound=poison.ogg
[/frame]
)}
{SOUND:POISON}
[frame]
begin=-50
end=50
image="units/undead/ghoul-attack-3.png"
[/frame]
[frame]
begin=50
end=125

View file

@ -67,14 +67,12 @@ Special Notes: When this creature gains enough experience in combat, it renews i
sound={SOUND_LIST:MISS}
[/frame]
[/else]
{FRAME_ON_POISON (
[frame]
begin=-50
end=50
image="units/undead/necrophage-attack-4.png"
sound=poison.ogg
[/frame]
)}
{SOUND:POISON}
[frame]
begin=-50
end=50
image="units/undead/necrophage-attack-4.png"
[/frame]
[frame]
begin=50
end=125