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?
dogs in snowy park
Moderator: Moderators
-
smartaiguy
- Brigadier General
- Posts: 512
- Joined: Tue Jul 08, 2003 2:52 pm
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
Fallschirmjager in europe(FIE)! (Mapper/Webmaster)
.Map map reviewer
Look up in the sky! Its a bird its a plane, oh wait its a bird.
.Map map reviewer
Look up in the sky! Its a bird its a plane, oh wait its a bird.
-
panTera
- Brigadier General
- Posts: 573
- Joined: Wed Jan 29, 2003 11:46 pm
- Location: The Netherlands
- Contact:
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.
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.
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
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
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
endbark 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
-
echo_rancid
- Captain
- Posts: 264
- Joined: Sat Jan 31, 2004 4:31 pm
-
echo_rancid
- Captain
- Posts: 264
- Joined: Sat Jan 31, 2004 4:31 pm
