Page 1 of 1
dogs in snowy park
Posted: Mon Nov 10, 2003 8:51 am
by wacko
wanted to let some dogs bark in my map and thought it to be a good idea to take a look in the script of mohdm5 (snowy park) where there are some barks
problem is i do not find anything doggy in this script nor in ambience.scr.
where/how do they let the dogs out?
Posted: Mon Nov 10, 2003 1:43 pm
by smartaiguy
I believe dogs work just like human ai, just they can't drive and man machineguns (OH NO a dog is driving, look out!

) Thats my guess
Posted: Mon Nov 10, 2003 4:02 pm
by panTera
Alright, take a look at the music files in pak0 => mohdm5.mus:
path sound/amb_stereo
normal Amb_M6_ParkAreaExt.mp3 // Plays over entire level
!normal volume 1
!normal loop
The mp3 is in sound\amb_stereo. So my guess is when you put in "exec global/ambient.scr mohdm5", this part of the ambient.scr: -> local.string = ("music/" + local.music + ".mus") executes the mohdm5.mus file and it starts playing the Amb_M6_ParkAreaExt.mp3 with the howling dog sounds in it. So it's not a random dogbark script or anything like that, just a mp3.
Posted: Mon Nov 10, 2003 7:17 pm
by wacko
thanks pantera, this is how it must have be done.
unfortunately not really what i was hoping to find, i wanted rather the scripted random dogbark coming from a speaker. The barking mustn't be heard from inside the building (snowy park has none), so this probably won't work for me.
Posted: Tue Nov 11, 2003 10:07 pm
by wacko
Hurray, I built a BARK-O-MAT!
In the map, there's now a script_model with
targetname/bark_o_mat
model/fx/dummy.tik
always_draw checked
just where the dog shall bark.
In the script, I did
Code: Select all
main:
local.master=spawn ScriptMaster
local.master aliascache b_1 sound/characters/dog_bark_1.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "dm "
local.master aliascache b_2 sound/characters/dog_bark_2.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "dm "
local.master aliascache b_3 sound/characters/dog_bark_3.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "dm "
local.master aliascache b_4 sound/characters/dog_bark_4.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "dm "
local.master aliascache b_5 sound/characters/dog_bark_5.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "dm "
level waittill spawn
thread dog_bark
end
dog_bark:
//by wacko (woof, woof)
level.bark_times=(randomint(11)+1)
wait (randomint(20) + 20)
for (level.times_barked=1;level.times_barked<=level.bark_times;level.times_barked++)
{
level.bark_num=(randomint(5)+1)
level.bark_style="b_"+level.bark_num
$bark_o_mat playsound level.bark_style
level.bark_wait=(randomfloat(1)+.5)
wait level.bark_wait
}
goto dog_bark
end
This bark-o-mat can
bark in 5
randomized ways
with a
randomized waittime between the single barks
for a
randomized number of times, then
wait a
randomized time until it starts again
Posted: Wed Nov 12, 2003 3:59 am
by nuggets

i knew we'd make a scripter out of ya
good work matey

Posted: Sat Feb 21, 2004 10:01 pm
by echo_rancid
Hey wacko, first of all Can I use this in a map I made, since you did make it I thought I should ask. Ive been playing with it but no sound. I have a scr file in my pk3, does this script go in there or can I make a seperate script just for the dog bark?
Posted: Sun Feb 22, 2004 1:36 pm
by wacko
why, of course you can!
put that script into the existing script. u also could take a look at that decalattack map (->recyclingbin) where those dogs are barking.
Thanks
Posted: Sun Feb 22, 2004 5:20 pm
by echo_rancid
Thanks Wacko, Ill take a look.