Feature Request: Select "PlaySound" using Expression Editor
Hymloe
Member Posts: 1,653
Hi,
I would like to request that Game Salad support the use of the Expression Editor to select the NAME of the sound file to play.
So for example, I could have sounds called "StoryIntro1", "StoryIntro2", "StoryIntro3", "StoryIntro4", ...etc... "StoryIntro386".
And then have an attribute that tracks which story element the player is up to, such as "StoryIntroNum".
Then when a level begins, have a PlaySound rule that uses the Expression Editor to select the sound name:
Play Sound ["StoryIntro"..StoryIntroNum].
And when the player finished a mission, it increments which mission they're up to:
Change Attribute StoryIntroNum = StoryIntroNum +1
This feature can be used in many ways throughout a game to use sound in a more powerful and economical manner. It makes creating the game far easier, and also makes more advanced use of sound possible, rather than impossible.
My main reason for the request - besides the fact that many users have also expressed their desire for this feature - is that it makes everyday implementation of common sound functionality so much easier and neater.
I'd love to see this in the next release of Game Salad Creator. Please click AGREE or AWESOME below if you want it, too.
(And please, no "Blah blah, there's much higher priorities, like putting out the Native Code Engine version of Game Salad, or support for 3D goggles and mind-warp-expansion-ultra". That's all well and good, everyone has priorities. But let's just see who else is waiting for this added Play Sound functionality, and let those other issues reside elsewhere.)
Thanks.
I would like to request that Game Salad support the use of the Expression Editor to select the NAME of the sound file to play.
So for example, I could have sounds called "StoryIntro1", "StoryIntro2", "StoryIntro3", "StoryIntro4", ...etc... "StoryIntro386".
And then have an attribute that tracks which story element the player is up to, such as "StoryIntroNum".
Then when a level begins, have a PlaySound rule that uses the Expression Editor to select the sound name:
Play Sound ["StoryIntro"..StoryIntroNum].
And when the player finished a mission, it increments which mission they're up to:
Change Attribute StoryIntroNum = StoryIntroNum +1
This feature can be used in many ways throughout a game to use sound in a more powerful and economical manner. It makes creating the game far easier, and also makes more advanced use of sound possible, rather than impossible.
My main reason for the request - besides the fact that many users have also expressed their desire for this feature - is that it makes everyday implementation of common sound functionality so much easier and neater.
I'd love to see this in the next release of Game Salad Creator. Please click AGREE or AWESOME below if you want it, too.
(And please, no "Blah blah, there's much higher priorities, like putting out the Native Code Engine version of Game Salad, or support for 3D goggles and mind-warp-expansion-ultra". That's all well and good, everyone has priorities. But let's just see who else is waiting for this added Play Sound functionality, and let those other issues reside elsewhere.)
Thanks.
Comments
But I can clearly see a system using the Expression Editor that would have just a few simple Play Sound rules, that then piece together the filename using Attributes to bring my game to life easily and powerfully.
I have different human survivors the player can pickup in their car.
YoungBoy
YoungGirl
Woman
Man
OldMan
OldLady
I then have various different things for them to say...
PickMeUp
TheCarIsFull
LetsGetOutOfHere
ThankYou
With multiple versions of each of those, for variety.
PickMeUp1
PickMeUp2
PickMeUp3
PickMeUp4
Therefore I end up with a bunch of files such as...
YoungBoyPickMeUp1
YoungBoyPickMeUp2
YoungBoyPickMeUp3
YoungBoyPickMeUp4
YoungBoyTheCarIsFull1
YoungBoyTheCarIsFull2
YoungBoyTheCarIsFull3
YoungBoyTheCarIsFull4
YoungBoyLetsGetOutOfHere1
YoungBoyLetsGetOutOfHere2
YoungBoyLetsGetOutOfHere3
YoungBoyLetsGetOutOfHere4
YoungBoyThankYou1
YoungBoyThankYou2
YoungBoyThankYou3
YoungBoyThankYou4
That's an example of the set of sounds for one character.
A quick example of how this would be used is...
I could have Attributes such as RandomCallNum which could be random(1,4).
And an Attribute such as CharacterType which could be YoungBoy, or YoungGirl, etc.
And an attribute for VoiceOverEvent, which could be PickMeUp, TheCarIsFull, etc.
And when I want to play sound for the event, I'd simply say:
Play Sound "CharacterType".."VoiceOverEvent".."RandomCallNum"
And it plays the appropriate sound from that one behaviour. Rather than having to pile tons of IF RULES inside one another, and selecting all the sounds from a drop down menu, which is really cumbersome and slow, and has to be copied and pasted every time a sound call needs to be made, so it ends up appearing over and over in the code, and if it needs to be changed or updated, it has to be updated in many places.
If I wanted to then add a 5th variant for each of the above calls, I'd just record them, put them in the game, and change the rules that makes RandomCallNum = random(1,5), and it's done!
Hi @Hymloe I don't know if it was your good self who suggested this a while back, and I disagreed with you, saying I didn't think the feature you're suggesting is needed.
But I guess I can sometimes only see the benefit of something when I need it myself, and that happened not long ago!
So now I've changed my mind, and agree with you that it'd be useful to have the ability to call up a sound using a text attribute. :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I still have to deal with the story system, the tips system, and objectives system.
All these things would work a charm with the added ability of being able to use the Expression Editor with the Play Sound behaviour.