GDevelop-extensions icon indicating copy to clipboard operation
GDevelop-extensions copied to clipboard

Sound namer

Open github-actions[bot] opened this issue 1 year ago โ€ข 5 comments

Description

The sound namer extension

This extension allows you to manage sounds by using names (strings) instead of channels, allowing to do things like: -Play 1 sound multiple times and manage the last one played -Play 1 sound multiple times without stopping latest sounds played -Get and manage the current timestamp of the sounds playing

How to use the extension

Play sounds with a name: -Use the "Play a sound on channel" action. -In the channel identifier field, use the SoundNamer::GiveName("InsertName") expression. -Inside the expression, put the name you want to identify this name with.

Manage the sounds with a name: -You can either use the actions, expressions and conditions that come with the extension. -Or use the SoundNamer::Name("SoundName") expression. This expression returns the channel of the sound identified with this name.

Checklist

  • [X] I've followed all of the best practices.
  • [X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
  • [X] I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?

Community (Unreviewed)

Example file

SoundNamer.zip

Extension file

SoundNamer.zip

github-actions[bot] avatar Jun 13 '23 18:06 github-actions[bot]

Hello @Kennoir thank you for submitting this awesome extension โค๏ธ

What cases you think the players will be using this extension for ? Why they would go with sound name, not sound channel (number) ?

Few things require fix: 1- I noticed few events that are disabled in the extension, can you please delete any disabled events. 2- Please follow the best extension practices rules, for example: the variable AudiPlayAudioExt.AudioName should be __AudioNamer.AudiPlayAudioExt.AudioName (__AudioNmaer.your variable name) same thing apply to all variables in the extension.

Let me know when you fix this issues so I can review the extension ๐Ÿ‘

VegeTato avatar Mar 22 '24 13:03 VegeTato

Hello @Kennoir thank you for submitting this awesome extension โค๏ธ

I surely abandoned this project but i took it back and here we go.

Kennoir avatar Jul 09 '24 20:07 Kennoir

What cases you think the players will be using this extension for ? Why they would go with sound name, not sound channel (number) ?

1 - Let's say, in a way this extension mixes the advantages of Play a sound action and Play a sound on a channel in a pretty cool way.

If someone wants to make enemies do a sound, like a "roar" when getting nearby the player, they use Play a sound action, this helps for easy sound playing for any enemy instance, but you're not able to manage the sound after playing it, you can't change it's volume, unless you change global volume, you can't stop the sound, unless you stop all sounds using said action, and you can't change it's pitch or fade it out.

These disavantages are gone when using Play a sound on a channel, but the only thing Play a sound has that Play a sound on a channel doesn't, is the freedom of playing the sound without caring of overriding already playing sounds, therefore, this extension cleans out that disavantage by giving an identifier that uses a "name" instead of a channel, we still use channels, but the channel of the sound is accessed through the identifier.

So every enemy can play the roar sound, without overriding other roar sounds from other enemies, and even better, they can stop it when getting killed or getting far away, without stopping the other sounds.

2 - This helps in revoking the effect of "what channel should i use to play this sound?" and "is this channel already used by another sound i forgot?!"

Few things require fix: 1- I noticed few events that are disabled in the extension, can you please delete any disabled events. 2- Please follow the best extension practices rules, for example: the variable AudiPlayAudioExt.AudioName should be __AudioNamer.AudiPlayAudioExt.AudioName (__AudioNmaer.your variable name) same thing apply to all variables in the extension.

!update SoundId.zip

Kennoir avatar Jul 09 '24 20:07 Kennoir

โ— No updates found. Please check your file.

github-actions[bot] avatar Jul 09 '24 20:07 github-actions[bot]

oh yeah, i changed the extension's name

Kennoir avatar Jul 09 '24 20:07 Kennoir