Adding general sound macros
Moderator: Forum Moderators
Adding general sound macros
Since some time ago, sounds such as attack, get_hit and death sounds have started accepting a comma-separated list of sounds from which one is randomly chosen every time. I've decided to attempt creating variations on the most commonly heard sounds, and simply for convenience I've come to think that it'd be best to encapsulate the sound variations inside simple macros, so that when a new sword-swish variation is added, only the contents of one macro need to be updated, instead of every unit .cfg that uses sword-swishes.
Unit .cfg's would use them like this:
And the macro itself would simply be defined like this:
I would update the relevant unit .cfg's as I add variations, and place all the macros in a new data/sound_utils.cfg. Any objections? Or any objections to having variations in the first place?
PS: I was thinking about doing some generic animation macros, too, since most unit animations are very simple (1-2 frames), but I'll leave that for another time.
Unit .cfg's would use them like this:
Code: Select all
[frame]
begin=-200
end=0
sound={SOUND_LIST:SWORD_SWISH}
[/frame]
Code: Select all
#define SOUND_LIST:SWORD_SWISH
sword-swish-1.ogg,sword-swish-2.ogg,sword-swish-3.ogg #enddef
PS: I was thinking about doing some generic animation macros, too, since most unit animations are very simple (1-2 frames), but I'll leave that for another time.
Is the character ":" allowed in macro names? Even if it is, it might be a good idea not to use it.
Sounds good otherwise.
Sounds good otherwise.
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
And I hate stupid people.
The World of Orbivm
- Eleazar
- Retired Terrain Art Director
- Posts: 2481
- Joined: July 16th, 2004, 1:47 am
- Location: US Midwest
- Contact:
I think it's a great idea.
Feel free to PM me if you start a new terrain oriented thread. It's easy for me to miss them among all the other art threads.
-> What i might be working on
Attempting Lucidity
-> What i might be working on
Attempting Lucidity