New ubersound work-around!

Post your scripting questions / solutions here

Moderator: Moderators

Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

DOH!! ok i will give that a go and see what it does for me.
Moderator
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

You need to type "local" (with quotes) when using the work-around.
Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

local.master = spawn ScriptMaster

local.master aliascache Mach_loop sound/amb/Amb_MachineLoop_02.wav soundparms 0.5 0.0 1.0 0.0 256 512 "local" loaded maps "obj dm"

Like this?

Cuz as i dig through the uberduber thingy it has it like this?


aliascache dm_hit_notify1 sound/null.wav soundparms 1.0 0.0 1.0 0.0 160 1600 local loaded maps "dm moh obj"

see no quotes? Now i am really con-fus-ed
Moderator
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Yup but when using the work-around you need to type it with quotes ;), otherwise the game will read 'local' as the current thread object (as in local.player).
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

min max

Post by tltrude »

Your min distance is very small (160). That means the volume will only be full for a radius of 160 units from the source, and it will fade untill you get to 1600 units away--where it cuts out.

If you set those values right, only one speaker entity will be needed for the room--unless it is a very long room.
Tom Trude,

Image
Random
Moderator
Posts: 401
Joined: Sun Jun 01, 2003 11:00 pm

Post by Random »

Remade LOL:V2 so yeah there are some big open spaces and turning down the volume as well as shortening the min distance seemed to be the only thing i could do to balance out the sounds in the room. Otherwise with larger min distances you would either be overwhelmed by the sounds or hit a dead spot between the sound origins and not hear it enough. BTW does the uber work around disable the cinemtatic command? If so i think thats great. Sounds are a big part of the ambience of the map and i think its a shame for peeps to turn them off.
Moderator
Image
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

I made this a sticky since it turns out to be a 'frequently asked question' :wink:
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

May I once again say how good it is thgat you sorted out our mohaa sound problems, my maps are so much more realistic with specially placed sounds now.

Thanks JV
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
Parts
Sergeant
Posts: 72
Joined: Thu Apr 10, 2003 12:35 pm
Location: UK
Contact:

Post by Parts »

Anyone ever got this to work with Spearhead? Just doesn't work for me at all.

Just get an error saying can't find alias in ubersound or uberdialog
[VS-UK]Capt.Parts[BnHQ]
WarTech
Colour Sergeant
Posts: 88
Joined: Mon May 05, 2003 3:15 am

Post by WarTech »

Parts wrote:Anyone ever got this to work with Spearhead? Just doesn't work for me at all.

Just get an error saying can't find alias in ubersound or uberdialog
I am having the same problem. I also justarted a thread on this for Spearhead and I am hoping someone comes up with a solution. Look for Spearhead / Ubersound Problem.

<TWZ>WarTech
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

Yeah um guys Mirek once stumbled onto something that seams to work for SH and that is you can write a scr of your map name into the ubersound folder with aliases you need and that worked. He did it for a card game ion my very first map hanger_se.
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
theMechanic
Lance Corporal
Posts: 15
Joined: Tue Jun 17, 2003 10:13 pm
Location: Ohio, USA
Contact:

Post by theMechanic »

Ok, can some one help a real uber noob here. This is my script, the plane flys fine, bombs fine, the whole bit, but i get this error in my log about the sound using this work around.

$pl1 playsound alarm_siren (maps/dm/mohdm1.scr, 88)
$pl1 ^

^~^~^ Script Error: command 'playsound' applied to NULL listener

ive tried loopsound also.


level waitTill prespawn

//*** Precache Dm Stuff
exec global/DMprecache.scr

//jv's sound workaround

local.master = spawn ScriptMaster

local.master alias alarm_siren sound/mechanics/Mec_Alarm_10.wav soundparms 1.2 0.0 1.0 0.0 300 12000 item streamed maps "dm obj"

level.script = maps/dm/mohdm1.scr
exec global/ambient.scr mohdm1

level waittill spawn

$pl1 playsound alarm_siren

thread plane
thread funstuff
thread lift1
thread lift2
thread upandaway1
thread upandaway2
//thread dogs
//thread teleport

end

//-----------------------------------------------------------------------------

plane:

// Plane 1
spawn script_object "targetname" "pl1" "classname" "info_splinepath"
$pl1.origin = ( 172 -758 761)
$pl1.angles = ( 20 90 0)
$pl1.model = "vehicles/p47fly.tik"

spawn script_object "targetname" "pl2" "classname" "info_splinepath"
$pl2.origin = ( 240 103 437)
$pl2.angles = ( 0 90 0)
$pl2.model = "vehicles/p47fly.tik"

spawn script_object "targetname" "pl3" "classname" "info_splinepath"
$pl3.origin = ( 323 854 821)
$pl3.angles = ( -20 89 0)
$pl3.model = "vehicles/p47fly.tik"

spawn script_object "targetname" "pl4" "classname" "info_splinepath"
$pl4.origin = ( 355 2487 1114)
$pl4.angles = ( -20 90 0)
$pl4.model = "vehicles/p47fly.tik"

spawn script_object "targetname" "pl5" "classname" "info_splinepath"
$pl5.origin = ( 235 4888 1716)
$pl5.angles = ( -20 90 0)
$pl5.model = "vehicles/p47fly.tik"

spawn script_object "targetname" "bomberpath" "classname" "info_splinepath" "target" $pl1 "origin" "237 -3603 921" "angles" "10 90 0" "model" "vehicles/p47fly.tik" "$mdl" "vehicles/p47fly.tik" "#set" "1" "speed" ".8"

// Speaker
spawn script_object "targetname" "bomberspeaker" "classname" "sound_speaker" "origin" $pl3.origin "#set" "1"

// Plane 1 Bomb 1
spawn script_origin "targetname" "bo111" "classname" "info_splinepath"
$bo111.origin = ( 199 -518 404)
$bo111.model = "ammo/us_bomb.tik"

spawn script_origin "targetname" "bo112" "classname" "info_splinepath"
$bo112.origin = ( 132 -288 52)
$bo112.model = "ammo/us_bomb.tik"

spawn script_object "targetname" "bomber" "classname" "info_splinepath" "origin" $pl1.origin "#set" "1" "model" "ammo/us_bomb.tik" "mdl" "ammo/us_bomb.tik" "target" $bo111

$bo111.target = $bo112

// Plane 1 Bomb 2
spawn script_origin "targetname" "bo121" "classname" "info_splinepath"
$bo121.origin = ( 240 160 300)
$bo121.model = "ammo/us_bomb.tik"

spawn script_origin "targetname" "bo122" "classname" "info_splinepath"
local.leftright = randomint(100)
if (local.leftright < 50)
{
local.xmove = 0
}
else
{
local.xmove = 440
}
$bo122.origin = ( local.xmove 270 80)
$bo122.model = "ammo/us_bomb.tik"

spawn script_object "targetname" "bomber" "classname" "info_splinepath" "origin" $pl2.origin "#set" "1" "model" "ammo/us_bomb.tik" "mdl" "ammo/us_bomb.tik" "target" $bo121

$bo121.target = $bo122

// Plane 1 Bomb 3
spawn script_origin "targetname" "bo131" "classname" "info_splinepath"
$bo131.origin = ( 386 1001 530)
$bo131.model = "ammo/us_bomb.tik"

spawn script_origin "targetname" "bo132" "classname" "info_splinepath"
$bo132.origin = ( 496 1127 395)
$bo132.model = "ammo/us_bomb.tik"

spawn script_object "targetname" "bomber" "classname" "info_splinepath" "origin" $pl3.origin "#set" "1" "model" "ammo/us_bomb.tik" "mdl" "ammo/us_bomb.tik" "target" $bo131

$bo131.target = $bo132

// Plane 1 Bomb 4
spawn script_origin "targetname" "bo141" "classname" "info_splinepath"
$bo141.origin = ( 430 2707 757)
$bo141.model = "ammo/us_bomb.tik"

spawn script_origin "targetname" "bo142" "classname" "info_splinepath"
$bo142.origin = ( 486 2892 385)
$bo142.model = "ammo/us_bomb.tik"

spawn script_object "targetname" "bomber" "classname" "info_splinepath" "origin" $pl4.origin "#set" "1" "model" "ammo/us_bomb.tik" "mdl" "ammo/us_bomb.tik" "target" $bo141

$bo141.target = $bo142

// connect up plane path
$pl1.target = $pl2
$pl2.target = $pl3
$pl3.target = $pl4
$pl4.target = $pl5

exec global/bomber.scr
wait 180

ord1agn:
local.planewait = randomint(120) + 40
wait local.planewait
iprintlnbold "!!! P47 FIGHTER/BOMBER APPROACHING !!!"
iprintlnbold "!!! INCOMMING FIRE - TAKE COVER !!!"
wait 10
thread global/bomber.scr::bomb 1
goto ord1agn
end
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

You are executing

Code: Select all

$pl1 playsound alarm_siren
before you run the plane thread... and $pl1 is created in the plane thread... Applied to NULL listerner means that the object you are trying to acces does not exist.
Admin .MAP Forums
Image
Head above heels.
theMechanic
Lance Corporal
Posts: 15
Joined: Tue Jun 17, 2003 10:13 pm
Location: Ohio, USA
Contact:

Post by theMechanic »

Well, i've had that issue before and did think that as a possibility, can you give me a heads up on where i might put it?
Bjarne BZR
Site Admin
Posts: 3298
Joined: Wed Feb 05, 2003 2:04 pm
Location: Sweden
Contact:

Post by Bjarne BZR »

After "thread plane" ( as it does not exist until you run the plane code ).
Admin .MAP Forums
Image
Head above heels.
Post Reply