raymond
New Member
Posts: 47
Posts: 47
|
Post by raymond on Sept 17, 2016 22:07:28 GMT
Hello,
I am finally utilizing Master Audio. I am attaching Event Sounds to my game objects and would like to know if it is a ok to use 2 Event Sounds on the same Game Object.
Does it cause much more overhead to process or have any greater chance to conflict with each other? My market is smart phones.
Here is the scenario:
In the game there are coins. If the coin is triggered by the Player it makes a collect sound. If it gets triggered by the enemy it makes a destruct sound. So I need two trigger events.
If there is another way to have two different sounds triggered by different tags on the same game object I would love to know.
Thanks, Raymond
|
|
|
Post by DarkTonic Dev on Sept 17, 2016 22:11:24 GMT
Yes it's ok, there won't be any performance implications since it's totally event-based.
However, you can add as many actions as you like to a single event.
Also you could fire a Sound Group that has a Linked Sound Group (you set these up on the Sound Group) so it plays 2 every time the one is played.
|
|
raymond
New Member
Posts: 47
Posts: 47
|
Post by raymond on Sept 17, 2016 22:29:01 GMT
I realize you can have multiple actions on a single event but not 2 of the same action (at least when I tried to another action of "Trigger" to same Event Sound). I figure because I was already using it. Therefore I added another Event Sound to the same game object.
Thanks for the quick reply.
|
|
|
Post by DarkTonic Dev on Sept 17, 2016 22:49:11 GMT
Why would you need 2 of the same event? I can't imagine a single scenario. That should be the same as putting 2 actions on the same single event.
|
|
raymond
New Member
Posts: 47
Posts: 47
|
Post by raymond on Sept 17, 2016 23:38:11 GMT
The scenario above with the coin triggered by 2 different tags and having a specific sound depending on the tag that triggered it. Adding two event sound scripts(both are using trigger) to the coin did the trick.
Thanks
|
|
|
Post by DarkTonic Dev on Sept 18, 2016 5:57:05 GMT
You can actually just add the 2 tags to the tag filter in the same EventSounds component if it's to play the same sound for both tags. If not, yes, you'd need 2. The tag filter will pass if *any* of the tags you specify is what you hit (I assume you're doing collision / trigger stuff).
|
|
raymond
New Member
Posts: 47
Posts: 47
|
Post by raymond on Sept 18, 2016 6:28:20 GMT
Yes, Thanks for you confirmation. Nice to know I am doing it the right way for my scenario. There are indeed two different sounds depending on what tag triggers it.
|
|
|
Post by DarkTonic Dev on Sept 18, 2016 7:39:26 GMT
Ok cool. Carry on!
|
|
EarlOfSandwich
Guest
Posts: 0
|
Post by EarlOfSandwich on Apr 13, 2017 10:27:45 GMT
Hi there, I am also wanting to do this - to have a clang sound when a weight collides with the floor, and a ping sound when a weight collides with a bullet. (And no I don't want the ping on the bullet as it changes depending on the object it hits)
In Event To Activate I can only choose one 2D Collision Enter event. Is there any way to add a second collision event?
|
|
|
Post by DarkTonic Dev on Apr 13, 2017 10:56:57 GMT
You can do that only if you add a 2nd EventSounds component. Or you could write your own script instead of using that to handle multiple.
Actually...I believe the footstep sounds script will do that with a single component. Try that and let me know if it works for you.
|
|
EarlOfSandwich
Guest
Posts: 0
|
Post by EarlOfSandwich on Apr 13, 2017 11:39:39 GMT
Ah of course, a second component! Was trying to do it with one. Thanks for the fast feedback.
|
|
EarlOfSandwich
Guest
Posts: 0
|
Post by EarlOfSandwich on Apr 13, 2017 11:44:51 GMT
Have just tested it out and both methods work beautifully - so either 2 event sound components or a single footsteps component.
|
|
|
Post by DarkTonic Dev on Apr 13, 2017 15:26:14 GMT
Awesome.
|
|
Teri Paras
Guest
Posts: 0
|
Post by Teri Paras on Feb 17, 2023 14:25:57 GMT
To the freeforums.net admin, You always provide great information and insights.
|
|
|
Post by DarkTonic Dev on Feb 17, 2023 15:46:32 GMT
Thank you.
|
|