Announcement

Collapse
No announcement yet.

Need help with play sound notifier in my animation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Well it could be bug but maybe there's workaround.
    Create a new bool variable in your AnimBP and call it for example "IsFootStepPlaying".
    On your notify event connect "IsFootStepPlaying" to false with Playsound function and set bool to true. Use delay or timer, for example, 0.2 sec or so and set bool to false again, so it will play only one sound every 0.x seconds.

    Leave a comment:


  • replied
    Originally posted by Mr. Wood View Post
    Also maybe you can try this:

    Set it to Highest Weighted Animation
    well no luck :3 i tried doing it on thirdperson template. add the play sound notifier on running. still plays double on client 1 and client 2 :3 maybe its a bug? i guess XD
    Last edited by Fruity Friend; 11-13-2019, 02:50 PM.

    Leave a comment:


  • replied
    Also maybe you can try this:

    Set it to Highest Weighted Animation

    Leave a comment:


  • replied
    Are you using blendspace for walking? Maybe this is just a theory but when you mix 2 animations (walk, run/sprint) and you have notifiers in both animations they will trigger when blended between.
    Try to remove notifications from run (for example) and test it.
    Also, use print in notifier event to debug. Make one step and see how many times it will output. I think I have similiar problem long time ago (could not remember what I did) and footsteps are almost always echoing (like trigger twice in short time for one step).
    If all of these does not help remove all notifiers in animation, add one by one and always test when you add new notifier (so you can potencially notice where's the problem).

    Leave a comment:


  • replied
    Originally posted by Mr. Wood View Post
    Use "New notify" in AnimBP. You do not need to multicast or replicate anything because it will trigger every time when animation "hit" notifier on all clients by default.
    You probably have different problem. Have you tested with compiled version of the game. Maybe when you test with 3 windows, you focus on one window and hear sound from other clients.
    However, try to debug - print some message on notifiy event and see how many times it prints for one client.
    also i did the new notify. its the first thing i did. but same results

    Leave a comment:


  • replied
    Originally posted by Mr. Wood View Post
    Use "New notify" in AnimBP. You do not need to multicast or replicate anything because it will trigger every time when animation "hit" notifier on all clients by default.
    You probably have different problem. Have you tested with compiled version of the game. Maybe when you test with 3 windows, you focus on one window and hear sound from other clients.
    However, try to debug - print some message on notifiy event and see how many times it prints for one client.
    i think i only did the 3 windows. well in server when i click on its window, doesnt mix up with therest. only when i did the client. also i place a music cue in the scene with two music and randomize playing either of the two.

    so far its the same. server is all good. and client 1 and 2 music are mixing up together

    Leave a comment:


  • replied
    Use "New notify" in AnimBP. You do not need to multicast or replicate anything because it will trigger every time when animation "hit" notifier on all clients by default.
    You probably have different problem. Have you tested with compiled version of the game. Maybe when you test with 3 windows, you focus on one window and hear sound from other clients.
    However, try to debug - print some message on notifiy event and see how many times it prints for one client.

    Leave a comment:


  • replied
    Your approach only is for client setup, remove the sounds and add a 'New Notify', call it Steps, see attached image, just use Multicast. Then add Event Notify Steps.... see image.

    However, if you hear the sound multiple times, then this suggest that the player is replicated too fast, or too often... but I am really just guessing here, it depends on your network code, how the player is replicated.

    Click image for larger version  Name:	animnotify.jpg Views:	0 Size:	127.5 KB ID:	1685506

    Leave a comment:


  • replied
    Originally posted by unit23 View Post
    If the sound is played multiple times on your client side, then the function calling the footstep is called too often.

    The notify event is only run from the animation blueprint? Sorry I cannot say more without knowing the code.

    Basically you just need to run a function with the sound on Multicast, there is no other code needed to replicate a sound. Multicast replicates to all clients.
    well in the first place i only use this. play sound. i didnt do any code on animation blueprint

    Click image for larger version

Name:	asdasdw.JPG
Views:	190
Size:	96.8 KB
ID:	1685491

    Leave a comment:


  • replied
    Originally posted by Fruity Friend View Post

    no luck still multiple sounds
    If the sound is played multiple times on your client side, then the function calling the footstep is called too often.

    The notify event is only run from the animation blueprint? Sorry I cannot say more without knowing the code.

    Basically you just need to run a function with the sound on Multicast, there is no other code needed to replicate a sound. Multicast replicates to all clients.

    Leave a comment:


  • replied
    Originally posted by unit23 View Post

    You need to add another Custom Event, set it to Multicast, then call that event from the Notify Event.
    no luck still multiple sounds

    Leave a comment:


  • replied
    Originally posted by Fruity Friend View Post

    i didnt use any event for that. well i use the anim notifier playsound.

    like this.
    https://sta.sh/016atpqkr0d0
    You need to add another Custom Event, set it to Multicast, then call that event from the Notify Event.

    Leave a comment:


  • replied
    Originally posted by unit23 View Post
    you are multicast'ing the sounds reliable?
    i didnt use any event for that. well i use the anim notifier playsound.

    like this.
    https://sta.sh/016atpqkr0d0

    Leave a comment:


  • replied
    Originally posted by Fruity Friend View Post
    is there something im missing?
    you are multicast'ing the sounds reliable?

    Leave a comment:


  • Need help with play sound notifier in my animation

    hi. i did my playsound footsteps in my animation of my game. its a multiplayer. then i tried to test game with 3 player windows. server and client. server is all normal. but when i try with my client it sounds like it plays two or 3 footstep sounds. then i did the same for client 2. same thing. only server is normal. is there something im missing?
Working...
X