New ubersound work-around!
Moderator: Moderators
Silly note
Oh one more thing I found out. Sometimes you'll want to use the local channel (no 3D localization) for your sounds. In this case 'local' has to be written within quotes, like "local", otherwise the game 'reads' local as the current thread (a bit like local.variable
) which results in loads of errors and the sound not working.
Example:
local.master aliascache soundalias wavfile soundparms numbers "local" loaded maps "mapname"
Note that any of the parameters may be variables, they don't have to be predefined like in ubersound.scr.
Here is a simple piece of code that can be used to retrieve the mapname. You can now use maps local.mapname instead of maps "giant list of map names here".
Example:
local.master aliascache soundalias wavfile soundparms numbers channel loaded maps local.mapname
Example:
local.master aliascache soundalias wavfile soundparms numbers "local" loaded maps "mapname"
Note that any of the parameters may be variables, they don't have to be predefined like in ubersound.scr.
Here is a simple piece of code that can be used to retrieve the mapname. You can now use maps local.mapname instead of maps "giant list of map names here".
Code: Select all
local.mapcvar = getcvar mapname
if(local.mapcvar[2] == "/" && local.mapcvar[0] == d) // dm/
local.mapname = dm
else if(local.mapcvar[3] == "/" && local.mapcvar[0] == o) // obj/
local.mapname = obj
else
local.mapname = local.mapcvar
Example:
local.master aliascache soundalias wavfile soundparms numbers channel loaded maps local.mapname
Re: New ubersound work-around!
Hi jv_map
This work if you put custom Music or Ambient Music
(EA GAMES\MOHAA\main\sound\music) to replace this folder into pk3 ?
Byes
jv_map wrote:Woohoo no more messing with TIKIs![]()
I found an easier way which seems to work on both client and server directly from the map script.
Here's how I did it (put this above level waittill spawn):Code: Select all
local.master = spawn ScriptMaster
local.master aliascache soundalias wavfile soundparms numbers channel loaded maps "mapname"
// local.master remove // me = confused about this
You can add a great number of aliases this way.
If there is a demand for it I can probably make a global script for it.
This work if you put custom Music or Ambient Music
(EA GAMES\MOHAA\main\sound\music) to replace this folder into pk3 ?
Byes

- small_sumo
- Lieutenant General
- Posts: 953
- Joined: Mon Jul 01, 2002 4:17 pm
- Contact:
I have an idea to help you and also some questions for jv.
idea: The other day I made an alias for an mp3 and it isplayed by the speaker or you know the script model fxdummy.tik. I did the alias (ooh I like saying that word Genifer Garner lol) auto loaded. Strange thing was when you arrived in the area the sound started then, and if you left the area when you return it would start at the start again?????? So my idea for you is to set it up as written above and write the alias so it plays far enough to cover the whole map.

And my Q for superman is, I want to script play a sound at start of round do I need the script model for this. I just have a funny oneliner to play at the start of each round for players to here, also would like to play a message (or sound) while the camera ending is on, and cos all the while the players are all over the map and botsare making noises....
Hmmmmm.
idea: The other day I made an alias for an mp3 and it isplayed by the speaker or you know the script model fxdummy.tik. I did the alias (ooh I like saying that word Genifer Garner lol) auto loaded. Strange thing was when you arrived in the area the sound started then, and if you left the area when you return it would start at the start again?????? So my idea for you is to set it up as written above and write the alias so it plays far enough to cover the whole map.
And my Q for superman is, I want to script play a sound at start of round do I need the script model for this. I just have a funny oneliner to play at the start of each round for players to here, also would like to play a message (or sound) while the camera ending is on, and cos all the while the players are all over the map and botsare making noises....
Hmmmmm.
small_sumo wrote:I want to script play a sound at start of round do I need the script model for this. I just have a funny oneliner to play at the start of each round for players to here, also would like to play a message (or sound) while the camera ending is on, and cos all the while the players are all over the map and botsare making noises....
Hmmmmm.
I think you need an alias on the local channel (remember to write "local"
- small_sumo
- Lieutenant General
- Posts: 953
- Joined: Mon Jul 01, 2002 4:17 pm
- Contact:
-
Bjarne BZR
- Site Admin
- Posts: 3298
- Joined: Wed Feb 05, 2003 2:04 pm
- Location: Sweden
- Contact:



