Empty ambient_generic?

Discussion in 'Mapping Questions & Discussion' started by SV_CHEATS 1, Feb 20, 2012.

  1. SV_CHEATS 1

    SV_CHEATS 1 L1: Registered

    Messages:
    16
    Positive Ratings:
    0
    I spawned an ambient generic, set the keyvalues correctly and executed the playsound input but it said "empty ambient_generic" and the sound will not play. Is this code correct?


    ent_create ambient_generic
    ent_fire ambient_generic addoutput "targetname sound"
    ent_fire sound addoutput "classname sound"
    ent_fire sound addoutput "target music\HL2_song15.mp3"
    ent_fire sound addoutput "health 10"
    ent_fire sound addoutput "volstart 10"
    ent_fire sound addoutput "fadein 0"
    ent_fire sound addoutput "fadeout 0"
    ent_fire sound addoutput "spawnflags 1"
    ent_fire sound playsound

    how do I get the sound to correctly play?
     
  2. Seba

    aa Seba DR. BIG FUCKER, PHD

    Messages:
    2,363
    Positive Ratings:
    2,365
    Create the ambient_generic in Hammer instead of spawning it in-game?