Play Hurt Effect

Discussion in 'Plugin Development' started by desup, Jan 25, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    desup

    Hi, I know there is playEffect(), but that cant play sound of mob hurt.
    Do you know what i mean? Like zombie - Grraaw! :D
    Is there is something that can do that?
    Thank you
     
  2. So like faking mob damage?
     
  3. Offline

    desup

    Something like that, but i need just that sound ;)
     
  4. Offline

    Fuzzwolf

    This can be done via the Spout API. Sound effect enumerators include the following:

    Code:
    BOW
             
    BOW_STRING
             
    BREATH
             
    CAVE_DARK_MYSTERIOUS
             
    CAVE_DARK_SHADOW
             
    CAVE_DEEP
             
    CAVE_FEAR
             
    CAVE_LARGE_FEAR
             
    CAVE_LIGHT_MYSTERIOUS
             
    CAVE_MONSTER_ROAR
             
    CAVE_MYSTERIOUS
             
    CAVE_NEW_PASSAGE
             
    CAVE_PASSING_SHADOW
             
    CAVE_RUMBLE
             
    CAVE_SHADOW
             
    CAVE_SHORT_MYSTERIOUS
             
    CHICKEN
             
    CHICKEN_HURT
             
    CLICK
             
    CLOTH
             
    COW
             
    COW_HURT
             
    CREEPER
             
    CREEPER_HURT
             
    CUSTOM_EFFECT
             
    DOOR_CLOSE
             
    DOOR_OPEN
             
    EXPLODE
             
    FALL_1
             
    FALL_2
             
    FALL_3
             
    FIRE
             
    FIRE_IGNITE
             
    FIZZ
             
    FUSE
             
    GHAST_CHARGE
             
    GHAST_DEATH
             
    GHAST_MOAN
             
    GHAST_SCREAM
             
    GLASS_BREAK_1
             
    GLASS_BREAK_2
             
    GLASS_BREAK_3
             
    GRASS
             
    GRAVEL
             
    HURT
             
    HURT_1
             
    HURT_2
             
    HURT_3
             
    LAVA
             
    LAVA_POP
             
    PIG
             
    PIG_HURT
             
    POP
             
    PORTAL
             
    PORTAL_TRAVEL
             
    PORTAL_TRIGGER
             
    SAND
             
    SHEEP
             
    SKELETON
             
    SKELETON_HURT
             
    SLIME
             
    SLIME_ATTACK
             
    SNOW
             
    SPIDER
             
    SPIDER_HURT
             
    SPLASH
             
    STONE
             
    WATER
             
    WATER_SPLASH
             
    WEATHER_RAIN_1
             
    WEATHER_RAIN_2
             
    WEATHER_RAIN_3
             
    WEATHER_RAIN_4
             
    WEATHER_THUNDER_1
             
    WEATHER_THUNDER_2
             
    WEATHER_THUNDER_3
             
    WOLF_BARK
             
    WOLF_DEATH
             
    WOLF_GROWL
             
    WOLF_HOWL
             
    WOLF_HURT
             
    WOLF_PANTING
             
    WOLF_SHAKE
             
    WOLF_WHINE
             
    WOOD
             
    WOOD_CLICK
             
    ZOMBIE
             
    ZOMBIE_HURT
             
    ZOMBIEPIG
             
    ZOMBIEPIG_ANGRY
             
    ZOMBIEPIG_HURT 
     
  5. Offline

    desup

    Thank zou, can you please give me an example, i didnt ever worked with Spout API
     
  6. Would this require SpoutCraft or just the Spout Plugin?
     
  7. Offline

    desup

    Oh, hope its just Plugin. I hate SpoutCraft
     
  8. Offline

    tomjw64

    If you can stand having the hurt animation as well (entity turns red+knockback), then it's possible without spout. But for only the sound, I have no clue.
     
  9. Offline

    Fuzzwolf

    desup
    Uhh, I think you would need the client as well for sounds, but I could be wrong. The sounds are built-in after all. I've never coded using Spout :(
     
  10. Offline

    desup

    Tried playSoundEffect, but I need t execute it in Delayed task, and it will throw error:
     
  11. Offline

    Technius

    Code:java
    1. Player player = //your player
    2. ((LivingEntity)player).damage(0);
     
  12. Offline

    desup

    Technius
    Umm, don't uderstand your post.
    Maybe this will play player hurt sound, but actually, i need ghast sound, without that ghast
     
  13. Offline

    tomjw64

    Oh! Ghast! You should have said so before! Here:
    Code:java
    1. world.playEffect(location,Effect.GHAST_SHRIEK,0);

    That will work hopefully!
     
  14. Offline

    desup

    Yeah, tried it, but its a bad sound :D , its not scary :D
     
Thread Status:
Not open for further replies.

Share This Page