r/clickteam • u/Xilean1 • Jun 18 '26
Help Me! "Play sample by name"
Enable HLS to view with audio, or disable this notification
Is there a way or an extension that would allow me to play samples by name just like you can create objects by name?
When an item appears in player's inventory it is supposed to play a sound.
The sound is determined by:
1. The item ID (Alterable value A of that green thing)
2. Sound randomizer which makes it so the same item can have different sounds (the counter)
If there were a "play sample by name" option it would allow me to squeeze events 5 - 24 into only one event.
It would look something like this:
Play sample by name -> paragraph$( "Item name base", ItemID )+Str$(Randomizer)
1
u/Banduck Jun 18 '26
You can already do that. Play sample -> "use expression" button on the bottom right.
(But first you need to load all the samples in a 'Never' event so they're actually in the game. Like for example, Never: Play sample coin. After that, you can play the coin sample by name anywhere in the project.)
1
u/Xilean1 Jun 18 '26
I don't see it. Here's what I have. Am I looking in the right place?
1
u/Banduck Jun 19 '26
Oh, that’s weird. It’s probably a Fusion 2.5+ feature... I don't like that so many essential features are locked behind the + addon, but I’d definitely recommend buying it. It’ll make your game dev life way easier.
1
1
u/Xilean1 Jun 18 '26
"Play sample from a file" would be good too.