Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop sounds when emote ends #4155

Open
4 tasks done
mario638 opened this issue Nov 20, 2024 · 12 comments
Open
4 tasks done

Stop sounds when emote ends #4155

mario638 opened this issue Nov 20, 2024 · 12 comments
Labels
type: enhancement Make a feature better. type: feature request New feature request.
Milestone

Comments

@mario638
Copy link

Terms

  • I'm using the very latest version of ItemsAdder and its dependencies.
  • I already searched on this Github page to check if the same suggestion was already reported.
  • I already searched on the plugin wiki to know if the feature is already implemented.
  • I already searched on the Discord server to know if anyone already has a solution for this or if the feature was already suggested.

Discord tag (optional)

No response

Describe the solution you'd like

If emote is stopped, stop the sound too
This could help by doing emote packs because I am doing like dances with music and it repeats if you stop

Is your feature request related to a problem?

No

Describe alternatives you've considered

Using the command /stopsound @e[type=minecraft:player,sort=nearest,distance=10] for example

Additional context

No response

@mario638 mario638 added the type: feature request New feature request. label Nov 20, 2024
@LoneDev6 LoneDev6 moved this to New in ItemsAdder Nov 28, 2024
@mario638
Copy link
Author

mario638 commented Jan 4, 2025

I have seen that distance doesn't work in stopsound so here it would be the command updated stopsound @a[dx=10,dy=10,dz=10,sort=nearest]
Here is a code that I have made in CE (Conditional Events) for making this to work

  event1:
    type: custom
    custom_event_data:
      event: dev.lone.itemsadder.api.Events.PlayerEmoteEndEvent
      player_variable: getPlayer()
    actions:
      default:
      - 'to_range: 10;true: stopsound: all'

@LoneDev6 LoneDev6 moved this from New to Todo in ItemsAdder Jan 13, 2025
@LoneDev6 LoneDev6 added the type: enhancement Make a feature better. label Jan 13, 2025
@LoneDev6 LoneDev6 added this to the 4.0.8 milestone Jan 13, 2025
@mario638
Copy link
Author

@LoneDev6 Bump

@Andre601
Copy link
Collaborator

@LoneDev6 Bump

Don't bump issues, or else you will be punished.

@mario638
Copy link
Author

mario638 commented Jan 24, 2025

@LoneDev6 Bump

Don't bump issues, or else you will be punished.

Image

Image

@mario638
Copy link
Author

This could be added using the api or the example I gave

@LoneDev6
Copy link
Collaborator

I can add it to the emote yml configuration.
For example something like that:

on_stop:
  stop_sounds: true

@LoneDev6 LoneDev6 changed the title Suggestion for player emotes Stop sounds when emote ends Jan 24, 2025
@LoneDev6 LoneDev6 moved this from Todo to In Progress in ItemsAdder Jan 24, 2025
@mario638
Copy link
Author

mario638 commented Jan 24, 2025 via email

@LoneDev6 LoneDev6 moved this from In Progress to New in ItemsAdder Jan 30, 2025
@LoneDev6
Copy link
Collaborator

info:
  namespace: iatest
emotes:
  test_emote:
    id: test_emote
    can_player_move: false  # fixed
    hide_equipment:
      helmet: true
      mainhand: true
      offhand: true
    cancel_conditions:
      sneak: true
      deal_damage: true
      in_air: true
      take_damage: true
    on_stop:
      stop_sounds: true  # new option: stops all played sound on emote cancel
      skip_emote_end: true  # new option: interrupts the emote on cancel

@LoneDev6 LoneDev6 moved this from New to Done in ItemsAdder Jan 31, 2025
@mario638
Copy link
Author

What is skip_emote_end for? (any example)

@mario638
Copy link
Author

I have found that if you are doing an emote and if you use /emote (otheremote) it doesn't cancel so it doesn't stop sound but at the moment it works really great if you could fix/add that to the code

2025-01-31.17-29-56.mp4

@LoneDev6
Copy link
Collaborator

Will be fixed, thanks!

@LoneDev6 LoneDev6 moved this from Done to In Progress in ItemsAdder Jan 31, 2025
@LoneDev6
Copy link
Collaborator

What is skip_emote_end for? (any example)

To avoid the last emote part and directly skip the emote on cancel.
For example if you want to cancel the emote immediately after you press shift instead of showing the last emote part after the loop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Make a feature better. type: feature request New feature request.
Projects
Status: In Progress
Development

No branches or pull requests

3 participants