PDA

View Full Version : Target Speakers and Objectives


The Old Man
2002-09-01, 00:06
Author Message
greekdish



Joined: 04 Aug 2002
Posts: 31

Posted: 19 Aug 2002 08:25 am Post subject: Target Speakers and Objectives

--------------------------------------------------------------------------------

Hi, I was just wondering. After reading the tutorial about making a breakable radio with a target speaker, Im trying to have a target speaker linked to an objective. Is this possible, and if so, can I have 2 different target speakers linked to it??? I followed the directions according to the tutorial, and I did get the two links ot each other, but it doesnt seem to work. Does that tutorial work for objectives?

Back to top


Detoeni



Joined: 04 Aug 2002
Posts: 29
Location: U.K.
Posted: 19 Aug 2002 10:49 am Post subject:

--------------------------------------------------------------------------------

Good Day All
Two ways of doing this, by script, see the beach map script or have the objective target a relay then as many speakers as you want.
Dt

Back to top


greekdish



Joined: 04 Aug 2002
Posts: 31

Posted: 19 Aug 2002 11:34 am Post subject:

--------------------------------------------------------------------------------

Hi DT..thanks for responding....can u go into more detail about either of the two?? What do u mean by making the objective target a relay? As it is right now, I have a trigger brush linked to my objective brush, and I was able to link 2 target speakers to my objective brush as well. Only thing is its not working. LOL

So what is your way in more detail?? Thanks

Nick

Back to top


Detoeni



Joined: 04 Aug 2002
Posts: 29
Location: U.K.
Posted: 19 Aug 2002 11:51 am Post subject:

--------------------------------------------------------------------------------

Don't know about how to make the script way work, but its in beach, I found this way easier.

function_exsplosive
(all the bits that make it go bang)
target klaxon_sound

target_relay
targetname klaxon_sound
target klaxon

target_speaker
loop_off
targetname klaxon
noise sound/world/klaxon.wav

You dont realy need the relay, but in my map, when testing had a button added so I turn off the noise.
ope this helps
Dt

Back to top


greekdish



Joined: 04 Aug 2002
Posts: 31

Posted: 19 Aug 2002 11:02 pm Post subject:

--------------------------------------------------------------------------------

Hmm, still not working DT...maybe I should explain better what I need done. One of my objectives is the radar/radio room...what I need is, BEFORE obj is blown up, I want 2 different sounds to be playing (radar ping and radio static)...I want the sounds (which are looped constantly) to STOP after objective is blown, cuz obviously no signals can be sent/received with no radar console.

Back to top


Detoeni



Joined: 04 Aug 2002
Posts: 29
Location: U.K.
Posted: 20 Aug 2002 12:57 am Post subject:

--------------------------------------------------------------------------------

Good Day All
Speakers dont have to all play the same sound just link them to the same relay.
This wont work if you loop the sound, once triggered, the relay will keep firing at its targets.
To get the affect you want add a timer.

func_timer
start_on
target sound_klaxon

This will fire at the ralay at spawn, then blowing the oblect will turn off the sound.
Dt

Back to top


greekdish



Joined: 04 Aug 2002
Posts: 31

Posted: 20 Aug 2002 03:11 pm Post subject:

--------------------------------------------------------------------------------

Thank you very much DT...the func_timer worked great....had to figure out how to link all the entities to make it work the way I want, but it worked. Any chance I can bother you again?? Seems you know this stuff pretty good.

Anyways....In my map, if you saw it, there is an objective that is a drill bit/head down underground. I rebuilt the one that was previously there on the map I posted. It now is actually a rotating drill which I made out of func_rotate. Basically, built it like a fan. LOL. Well, being that its a roate entity, its not a func_explosive entity anymore. I searched 2 other forums for this info, and nothing comes up. Is it possible to have a func_rotate entity be a func_explosive/objective so when it blows up, the rotating not only stops, but the entity disappears. My first idea would be to make a func_static of the stopped/damaged drill bit, but how would I go about making that rotation entity a func_explosive???

Thanks in advance
Nick

Back to top


Detoeni



Joined: 04 Aug 2002
Posts: 29
Location: U.K.
Posted: 21 Aug 2002 12:43 am Post subject:

--------------------------------------------------------------------------------

Good Day All
Had a quick play with the functon_rotate entity. Could not make it work like you want.
Then I had another looking at your map and had an idea, don’t rotate the objects, animate the textures to make them look as if they’re rotating. You will have to remove the md3 models and make brush models to replace them.
This will allow you to make the drill function_exsplosive.
For an example of an animated texture open the liquids.shader and look at texture/liquids/water_beach3.
You will need to make up a shader and textures to do this but It will give you the affect that you want.
Dt

After thought.
If its just the drill shaft you want to rotate, find the texture you want for the drill shaft and make up a shader that will scroll the texture across the brush(probly look better on a cylinder patch). Most water shaders have this feature.
Dt

Back to top


greekdish



Joined: 04 Aug 2002
Posts: 31

Posted: 21 Aug 2002 05:11 am Post subject:

--------------------------------------------------------------------------------

Thats a great idea DT.....It cool because I had already replaced the md3 with a gear type brush to rotate anyways. So now I just need to make the texture itself rotate...well, some redesigning of the gear itself to make it a viable option of just a moving texture will need to be done. But thanks for the input!!!

Nick

Back to top


krekits



Joined: 04 Aug 2002
Posts: 33

Posted: 21 Aug 2002 05:55 am Post subject:

--------------------------------------------------------------------------------

Quote:
how would I go about making that rotation entity a func_explosive???



You can't, it's impossible. One entity can only have one function, it can't be combined into two or more functions.

Back to top


greekdish



Joined: 04 Aug 2002
Posts: 31

Posted: 25 Aug 2002 01:00 am Post subject: YAY!!!!

--------------------------------------------------------------------------------

YAY!!! Just wanted to say I figured out how to make the drill bit head rotate, and still have the drill column a func_explosive, as well as all my target_speakers stopping after explosion. yay!! Im so happy today!!!

greekdish
2003-09-02, 03:03
Wow...I cant believe im still working on this map...damn I need to get working and release this sucker!! LOL

Anyways.....Detoeni.....if ya can still help me out on this.....obviously, im trying to make my map ET friendly.....and from what I see, there are no target_relays available in the source code. I can add a target_relay in Radient, but when I bring up the Entity box, it says Not Available in SOurce.

How can I accomplish my old, past objective here by hacing multiple linked target speakers tied to the destruction of my drill bit head???

Thanks in advance :)

Detoeni
2003-09-02, 10:42
Got a bit of a shock seeing this old post.

In Et you can script entities to turn on and off.
From the manual:

"Scripting
There are three trigger types available to trigger sound events from map scripts. Every speaker that is supposed to be executed via a script needs a unique targetname. The triggers are:

togglespeaker <targetname>: plays a speaker on execution
enablespeaker <targetname>: turns on a looped speaker on execution (speaker's looped flag must be 'off' or it will play)
disablespeaker <targetname>: turns off a looped speaker on execution

togglespeaker will switch the speaker from one state to another. If toggling a looped sound it will start or stop playing. A non-looped sound will play once and then stop.

enablespeaker and disablespeaker can be used to switch on and off a looping sound, e.g. the Morse code sound for the command posts).


Its also worth reading the "speaker editor" section as you now have a lot more control of the sounds playing in your map.

greekdish
2003-09-02, 18:34
Thanks for responding Det....I knew you would have flashbacks after seeing this post come back. hehehe

So in otherwords.....I should use the togglespeaker?? Here is my specifics in case you forgot...=)

I have a radar, and a drill....both have sounds playing right now while not blown....the objectives work great, but my sounds still play. My question is.....can I have multiple target speakers with the same name and have the one script activate/toggle all of them??? And would I be correct in saying I use just a togglespeaker since I want the sounds to stop upon objective being destroyed??

Thanks for the help again. =)

BTW....I plan on releasing the ET beta of this map Thursday is all goes well with the sounds and textures. =)

Detoeni
2003-09-02, 22:27
disablespeaker <targetname>: turns off a looped speaker on execution is the one you want.

Your speaker will need the "looped on" flag checked then "disablespeaker <targetname>" in the script will turn it off.

togglespeaker may work.

Mapping for ET is a bit of a gray area for me as at this time I have no intention for mapping for it (having too much fun with wolf SP), so Iv not tested stuff to see how it works. So you might have to play with this a little to get it to work in the way you want.

Good Luck with the map, it about time it was finished.

Quick tip: lattest version of q3map2 can be used to decompile maps, see here:

http://splashdamage.com/forums/viewtopic.php?t=3646&sid=fd64e29cb592d6e9f9ac26542fab1d2b

Take a look at "Battery" decompiled, look at the way the water has been made, some of the effects used would work well in your map;)

greekdish
2003-09-02, 23:59
Thanks for the help Det....yes, I already decompiled the ET maps about two weeks ago with q3map2 off the SPlash Damage forums. hehehe.....didnt think about the water, I thought it actually looked nice the way it is right now (not last beta i released)...but i will look into that. Thanks for the tip on the sound..I will get to that ASAP and let you know how it goes. :)

greekdish
2003-09-04, 03:42
ok, none of the speaker setups are working the way I want them too.....the speakers are working on startup...but I cant get them to stop on objective being destroyed. HELP!!! :(

greekdish
2003-09-04, 19:55
Hey Det....just to let ya know....I was able to solve my speaker problem not through the "new and improved" ET way, but through the tried and true classic RTCW way....I just made the func_obj target the speakers, and vice versa.....I had a func_static invisible to show a blown up objective, so I didnt know if I could do it....but I just renamed those target_speakers the same as that func_static...and it worked like a charm. Woot!! :)

Detoeni
2003-09-04, 22:26
The target speaker needs a scriptname and it own section of scripting to work, if you look in goldrush there is only one speaker, its attached to the truck scriptmover, but has its own section of scripting.
entity needs:
key "targetname" value "#"
key "scriptname" value "#"

Did a bit of digging myself;)

greekdish
2003-09-05, 09:39
I didnt need any scriptname, or any scripting for my target speakers to work.....I just made sure the func_explosive, and the target speakers, each had a line in the entity window which read "target", and that they targeted each other, with the target speaker looped on.....the sounds are on when the map starts, and the sound shuts down when the objective is destroyed....all without scripting. woot. :D