- Feb 20, 2012
- 16
- 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?
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?