Two sounds in one attack
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- Seylamander
- Posts: 30
- Joined: July 22nd, 2010, 3:06 am
- Location: We ALL live in The Matrix.
Two sounds in one attack
Hey! I'm back again, and I have yet another animation question.
Is it possible to have more than one sound in one attack hit/miss? I'm trying to create "holy lightning" which plays the "Holy" sound list at the same time as the lightning ones. Here is the code I have so far (mostly taken from the "LIGHTNING_ANIMATION NAME_STRING DIRECTION_NUMBER" macro).
Thanks!
Is it possible to have more than one sound in one attack hit/miss? I'm trying to create "holy lightning" which plays the "Holy" sound list at the same time as the lightning ones. Here is the code I have so far (mostly taken from the "LIGHTNING_ANIMATION NAME_STRING DIRECTION_NUMBER" macro).
Code: Select all
#define HOLY_LIGHTNING_ANIMATION NAME_STRING DIRECTION_NUMBER
[effect]
apply_to=new_animation
name={NAME_STRING}
[attack_anim]
[filter_attack]
name={NAME_STRING}
[/filter_attack]
{LIGHTNING_BOLT {DIRECTION_NUMBER}}
[if]
hits=no
[frame]
begin=-200
end=0
sound=lightning-miss.ogg,{SOUND_LIST:HOLY_MISS}
[/frame]
[/if]
[else]
hits=yes
[frame]
begin=-200
end=0
sound=lightning.ogg,{SOUND_LIST:HOLY}
[/frame]
[/else]
[/attack_anim]
[/effect]
#enddef
"There's no escaping reason, no denying purpose, because as we both know, without purpose, we would not exist. It is purpose that created us."
-Mr. Smith, The Matrix Reloaded
-Mr. Smith, The Matrix Reloaded
-
- Posts: 252
- Joined: March 30th, 2011, 8:38 pm
- Location: The UK
Re: Two sounds in one attack
I don't know how to do that with WML but you could download an install Audacity (free software) and open both files and save them as one, then use that sound file as both.
- DEATH_is_undead
- Posts: 960
- Joined: March 4th, 2007, 3:00 pm
- Location: Northern United States
Re: Two sounds in one attack
Problem with that is that users would have to have the map/era to play Multiplayer.blueknight1758 wrote:I don't know how to do that with WML but you could download an install Audacity (free software) and open both files and save them as one, then use that sound file as both.
If it is possible to play more then one sound track, I believe it would be a better alternative if it is a Multiplayer addon. If not, go ahead with the Audacity idea.
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
Re: Two sounds in one attack
Yes, it's possible. Examples: wolves, cavalry units, thrown spears. Look and learn.
- Seylamander
- Posts: 30
- Joined: July 22nd, 2010, 3:06 am
- Location: We ALL live in The Matrix.
Re: Two sounds in one attack
Got it. Thanks!
For future reference, I just looked at
For future reference, I just looked at
Examples: wolves, cavalry units, thrown spears.
"There's no escaping reason, no denying purpose, because as we both know, without purpose, we would not exist. It is purpose that created us."
-Mr. Smith, The Matrix Reloaded
-Mr. Smith, The Matrix Reloaded