Destroyable object with sound


(Crocopep) #1

Hey all,

I’m making a map where the allies have to destroy an axis radio.

My question is:

How to let the destroyable-object make music?

And:

How to make that the music stops when the object is destroyed?

I hope you can help me =)

yes, I tried search, but I didn’t find anything


(-SSF-Sage) #2

With a ingame speaker or with a target_speaker. For both you specify a targetname. Then you can use setstate, disablespeaker or remove command in script to disable. Check for the scripting reference.


(Crocopep) #3

This noob needs some more help.

Ok, I have a target_speaker.

How can I set the name of the speaker?


(-SSF-Sage) #4

[QUOTE=Crocopep;176819]This noob needs some more help.

Ok, I have a target_speaker.

How can I set the name of the speaker?[/QUOTE]

Give it a key targetname with a value you want, for example myspeaker. Also you must give it a noise key with a value to your path. And probably tick the box looped_on (I understood this is what you wanted).

Then you have a death trigger of the dest. in your script. You can there put a line with for example

setstate myspeaker invisible

.


(Crocopep) #5

THANKYOU!

it’s so much fun to hear the a team!

I will put you in the readme when my map is finished!


(-SSF-Sage) #6

No problem. I’m glad to be helping.