Sound looping

AkuShadow

Member
Is there a way to loop a sound at a specific point and have it stop looping only after a button release/animation change? :-\
Ex: Mega mans charge has a build into a higher pitch, but only the highest pitch is looped.
 
Sort of. You can't loop a sound effect, but you can cut off an effect currently playing. That means you could do this with two sound effects. One with start and loop, the other with loop only. When you release the button, the appropriate channel ID is cut off. Otherwise you play the start to its end, then switch to loop, and keep cycling until some interrupt occurs (player releases button for charging, character takes hit, etc.).

Here's the tricky part - there's no event feedback when a sound play completes. To work the loop you'll have to keep checking the channel ID with an update script after it starts playing, and start the loop sound as soon as the channel ID play check comes back false.

It's a little tedious, but will produce the effect you're asking for.

DC
 
So I could make the beginning of the animation have the startup sound and the loop be another part of the same animation. When the animation stops the sound will stop as well?
 
the only problem i see with that approach is that you have to stand still.
if anything breaks the animation your intention is broken

if you want the sound go & then loop  @ (while moving or running) like with the megaman x games, you have to use another approach.

unless it is an overlaying animation that is on top of your character - in the case of mega man x it could be  the spheres of energy that you "absorb" from the air around you

im not sure, but i think they change colors & the last color intensity animation loop is what could work as your cue.

the animation could be invisible or visible & on top of your character or behind (like the aura that forms in night slashers original arcade)
Frankenstein battle @ around 5:20
https://www.youtube.com/watch?v=r8j6u2GTkJw

i don't know how its done tho - since i had a bit of an issue with an entity that was supposed to be multilayered...

 
Fantastic news,  just be aware the lucky guess  of this solution is "brute" & in the long run using commands that depend or  based on entities saturates the models.txt  file,
(well , if you had to create another entity at all)

that is why if you manage - eventually -  to make a script-based solution, it is better in the long run
 
oldyz said:
Fantastic news,  just be aware the lucky guess  of this solution is "brute" & in the long run using commands that depend or  based on entities saturates the models.txt  file,
(well , if you had to create another entity at all)

that is why if you manage - eventually -  to make a script-based solution, it is better in the long run
"I" am totally useless with scripting so"I" will likely never make any scripting. Even with tutorials, I have tried many, I'm still lost.
 
i feel your pain, but try once on a while, at least a notion could help
&
Well, there is options - if you have no self imposed restrictions,  its even easier...

try to use social media -(discord, facebook,..) & have a credit card &/or online money (paypal, venmo)
you can use freelance apps like FIverr to hire coding help -
an optional step is to set up a gofund me or a patreon.
there are many offers out there including offers to create a whole video game for 200 dollars.

so you can finish your module as best as you can - take notes of what youare missing or needs polishing & hire someone to finish it.

be careful, make sure the terms are fair, & if it is an OPENBOR rule to share or report any changes to the engine, make sure the person knows that.
just look out that the hired help does no try & pull a fast one (like gain total control of your concept or something legal but shady)
 
I have tried here and there and  I got a healing script to work so that when the character charges mp they also regenerate hp slowly. But I didn't even think to get hired help.
 
Back
Top Bottom