home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Changing a sound for a map?

by PugSchnizzle on 12/09/2007 01:55, 13 messages, last message: 12/18/2007 00:10, 1451 views, last view: 04/24/2024 01:21

Can someone please tell me how to change a sound, but just for one map? I don't know what to type in the configuration file.
To be more specific, i want to change the health boost to something, but just for one map.

   Board Index   

#1: n/a

by MeatROme on 12/09/2007 13:08

this should've gone in "Map Editing"

pick-up sounds (among others) are hard-coded - no way to change them than replacing the files,
which would be a content MOD and change it for every map - not just one.

so. this is currently not an available option.

reply to this message

#2: Re: n/a

by PugSchnizzle on 12/09/2007 16:10, refers to #1

Okay, so then an alternative method for me would be to make a sound in the spot of the healthboost...then make a timer on the sound? any way to do that that you know of?

reply to this message

#3: You could...

by steve_e on 12/09/2007 16:17

Use a audio sample in addition to the healthboost audio - attach it to an invisible mapmodel and time it to play after the healthboost:

alias level_trigger_1 [
sleep 1500 [
music "yoursounds/yourfile.ogg" [
what you want to happen when sound finishes playing
]
]
]

Doesn't remove the healthboost audio, but might do the trick for a single map.

reply to this message

#4: Re: You could...

by steve_e on 12/09/2007 16:23, refers to #3

Oh, and place the invisible next to the healthboost and set its type to 12 so it dissapears once used

reply to this message

#5: Re: You could...

by PugSchnizzle on 12/09/2007 18:41, refers to #3

what do you mean by "what you want to happen when sound finishes playing" ? and how do i make an invisible map model, and how could I attach it?

reply to this message

#6: ..

by Q009 on 12/09/2007 19:11

alias_level_trigger_1 [
mapsound xxx/xxx
]

reply to this message

#7: Re: ..

by PugSchnizzle on 12/09/2007 20:38, refers to #6

...what? please can you guys be more elaborate? I really don't know what any of this means.

reply to this message

#8: Re: You could...

by steve_e on 12/10/2007 01:21, refers to #5

Read this:
http://sauerbraten.org/docs/editref.html#music

and read this:
http://sauerbraten.org/docs/editref.html#sound

You have two options - play a music file which you can trigger via a trigger/mapmodel, or play a registered sound.

Both options will have their limitations - you need to figure out what will best work for you.

To create an invisible trigger:
Go into edit mode - 'E'
Press TAB
Press Help
Select Ent
Select Trigger
Select Invisible

(Or read up how you can create one via the prompt.) You attach your script to the mapmodel/trigger via cube script in your map's .cfg file. It is referenced via an alias such as:

alias level_trigger_1 [
cube script goes here
]

reply to this message

#9: /soundreset

by SheeEttin on 12/10/2007 01:59

Hmm... Maybe a /soundreset would be useful...

reply to this message

#10: Re: You could...

by PugSchnizzle on 12/10/2007 16:30, refers to #8

After i select invisible, what is the next option? theres one more.... but i've tried them all...and nothing happens when i run into the trigger..... where you said "cubescript here", that meant mapsound xxx/xxx right?

reply to this message

#11: trigger/sound mixing ...

by MeatROme on 12/10/2007 16:39

Take a look at the bottom of the page
http://cube.wikispaces.com/Map+Config+and+Scripting

In any case - for triggers to work you must be running in "/mode -2;map MAPNAME" or shortcut "/sp MAPNAME" !!

mapsounds can have volume set in the CFG and definitely need a RADIUS and optionally a FALLOFF in their entity attributes!

for triggering sounds you need to use registersound and remember the returned index - then play it via "/sound INDEX".

HTH :)

reply to this message

#12: Long question.....

by PugSchnizzle on 12/10/2007 18:13

"for triggering sounds you need to use registersound and remember the returned index - then play it via "/sound INDEX".

HTH :)"

okay first of all...whats that mean... and second...if triggers dont work in multiplayer, i dont really want to use that.... i just want a sound that will play when you go near it, but only can play once per whatever the time it takes for the health boost to spawn. Can someone please like.... just tell me what to type in the CFG for this? because i really don't know much about cubescript.... here is what i typed so far... i dont know if this makes sense, but i just looked at the help link someone put up and thats what i came up with... (its the heart container sound for zelda :P)


60 = registersound "asdfT/HeartContainer" 100

mapsound "asdfT/HeartContainer" 100 1

alias level_trigger_1 [
mapsound "asdfT/HeartContainer" 100 1
]


Does this make any sense? O_o the only thing ive been able to do is place a sound ent, and it replays over and over.. for some reason i cant even type /sound 60 and play it anymore.... im so confused ><

reply to this message

#13: .

by PugSchnizzle on 12/18/2007 00:10

if this question can't be answered here, can someone please tell me where i can find one...? Or can someone help?

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53870784 visitors requested 71645986 pages
page created in 0.020 seconds using 10 queries
hosted by Boost Digital