dogs

Post your scripting questions / solutions here

Moderator: Moderators

User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

TIKI

setup
{
path models/fx/dummy
skelmodel dummy3.skd
}

init
{
server
{
classname ScriptModel
rendereffects +dontdraw
notsolid
}
client
{
settiki none

//==========================================================
// DOG SOUNDS- cleaned up and ready for MOHTA - 6/11/02 - JG
//==========================================================

aliascache dog_bark1 sound/characters/dog_bark_1.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj "
aliascache dog_bark2 sound/characters/dog_bark_2.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj "
aliascache dog_bark3 sound/characters/dog_bark_3.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj "
aliascache dog_sniff sound/characters/dog_bark_4.wav soundparms 1.5 0.0 0.8 0.4 160 4000 voice loaded maps "t dm obj "

aliascache dog_pain1 sound/characters/dog_growl_1.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_pain2 sound/characters/dog_growl_2.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_pain3 sound/characters/dog_growl_3.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_pain4 sound/characters/dog_growl_4.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_pain5 sound/characters/dog_growl_5.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "

aliascache dog_death1 sound/characters/dog_growl_1.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_death2 sound/characters/dog_growl_2.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_death3 sound/characters/dog_growl_3.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_death4 sound/characters/dog_growl_4.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_death5 sound/characters/dog_growl_5.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "

aliascache dog_bite1 sound/characters/dog_bite_1.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_bite2 sound/characters/dog_bite_2.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_bite3 sound/characters/dog_bite_3.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "
aliascache dog_bite4 sound/characters/dog_bite_4.wav soundparms 1.5 0.0 0.8 0.4 500 4000 voice loaded maps "t dm obj "

aliascache dog_collar1 sound/characters/dog_collar_1.wav soundparms 0.8 0.2 0.8 0.3 160 2000 auto loaded maps "t dm obj "
aliascache dog_collar2 sound/characters/dog_collar_3.wav soundparms 0.8 0.2 0.8 0.3 160 2000 auto loaded maps "t dm obj "
aliascache dog_collar3 sound/characters/dog_collar_4.wav soundparms 0.8 0.2 0.8 0.3 160 2000 auto loaded maps "t dm obj "

aliascache dog_fs1 sound/characters/dog_footstep_1.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "
aliascache dog_fs2 sound/characters/dog_footstep_2.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "
aliascache dog_fs3 sound/characters/dog_footstep_3.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "
aliascache dog_fs4 sound/characters/dog_footstep_4.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "
aliascache dog_fs5 sound/characters/dog_footstep_5.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "
aliascache dog_fs6 sound/characters/dog_footstep_6.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "
aliascache dog_fs7 sound/characters/dog_footstep_7.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "
aliascache dog_fs8 sound/characters/dog_footstep_8.wav soundparms 0.5 0.25 0.8 0.3 160 4000 auto loaded maps "t dm obj "

aliascache dog_growl1 sound/characters/dog_growl_1.wav soundparms 1.0 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_growl2 sound/characters/dog_growl_2.wav soundparms 1.0 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_growl3 sound/characters/dog_growl_3.wav soundparms 1.0 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_growl4 sound/characters/dog_growl_4.wav soundparms 1.0 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_growl5 sound/characters/dog_growl_5.wav soundparms 1.0 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "

aliascache dog_pant1 sound/characters/dog_pant_1.wav soundparms 0.6 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_pant2 sound/characters/dog_pant_2.wav soundparms 0.6 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_pant3 sound/characters/dog_pant_3.wav soundparms 0.6 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_pant4 sound/characters/dog_pant_4.wav soundparms 0.6 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_pant5 sound/characters/dog_pant_5.wav soundparms 0.6 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_pant6 sound/characters/dog_bark_4.wav soundparms 0.6 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "
aliascache dog_pant7 sound/characters/dog_bark_5.wav soundparms 0.6 0.2 0.8 0.3 320 2000 voice loaded maps "t dm obj "


}
}

animations
{
idle dummy3.skc
}
king_of_hi_ping
Corporal
Posts: 30
Joined: Wed Feb 05, 2003 7:17 pm

thanks

Post by king_of_hi_ping »

thanks .. this is a great help.... also my dogs came back to life today ...didnt change anything so ???? but it gives great smiles to my players...so thank you so much for posting it ... by the way the random spawn points ... anyway to re activate that ..
king_of_hi_ping
Corporal
Posts: 30
Joined: Wed Feb 05, 2003 7:17 pm

still have problems with sound

Post by king_of_hi_ping »

ok JV what am i doing wrong

have a copy of the tik file above... and still having trouble to make this work...

have made a pk3 with the following...

global/mysounds.scr
models/sounds/dog.tiki
and maps/DM/mohdm7.scr


at the top of the mohdm7.scr i have added this...

level waittill prespawn

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

now mysounds reads like this ....

cache models/sounds/dog.tik

and dog.tik is the same posted above....


I have also tried to add cache models/sounds/dog.tik to DMPreache

as well as the MAM files that over ride the normal DMpreache..

but still no sounds client side... ??? clieants all get sound errors ..

anyone???
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

this is a link the jv posted to fix the dogs crashing the game when they die , put the fix into your main directory http://modtheater.com/pafiledb.php?action=file&id=540

my script dosen't need it but will after I fix my xdmdogs.scr and add it to it .
If you use one of the mohaa dm maps that uses exec dm_precache you need to put cache models/sound/dog.tik in there .

If you put exec global/mydog.scr or what ever you called the dog script , at the top of the dm_precache you will get dogs in every map that uses dm_precache I did that for a while I t works good for round based play that loads all the dm maps one after another , or you can just put the exec global/mydog.scr in the mohaa script file for the game you want to play the way you did it for the sounds script . The game reads pk3's alphabeticly so if your pk3 starts with a letter that is before pak0.pk3 the game pk3 will overwrite your pk3
Bouncer
Corporal
Posts: 28
Joined: Mon May 12, 2003 10:57 pm
Contact:

Post by Bouncer »

That dog script works great in Spearhead and dont need the dog fix for it. The only problem is that sometimes when the dog spawns....he spawns inside a player and they get stuck together. Is there any way to fix that so they dont get stuck together?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

yes I found a fix for that . At the top of the script change
if ($dog1.size < 1)
{
to
if ($dog1.size < 1)
{
for(local.i=1;local.i<$player.size+1;local.i++)
{
while (vector_within( level.dogorigin, $player[local.i].origin, 128 )) //returns 1 if the two points are <= distance apart, or 0 if they are greater than distance apart
{
wait 2
}
}
this should make the script wait until the $players are at least 128 units away from the dog spawn point
Bouncer
Corporal
Posts: 28
Joined: Mon May 12, 2003 10:57 pm
Contact:

Post by Bouncer »

Nice, good work! :P

Is there anyway of getting the sounds in so the clients can hear them? Also what values could be edit to make the dog respond quicker and become more agressive?

Right now I have it setup so all I do is put in "exec scripts/dog.scr" above level waittil spawn and it works perfect.
User avatar
mohaa_rox
Field Marshal
Posts: 2760
Joined: Mon Nov 11, 2002 7:05 am
Contact:

Post by mohaa_rox »

Maybe someone should write a tut. :wink:
Live to map, not map to live.
-mohaa_rox, .map
moderator
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

the only way for the clients to have the sounds is if they have the sounds fixed on thier computer . You can send them the tiki but it is a client side thing unless hmm I am wondering if you define the alias in your level.script if that may work hmm . One other trick you can do is put
exec global/mydog.scr
cache models/sound/dogsounds.tik
in the dmprecache.scr , so any map that calls the dmprecache.scr ( like the stock maps ) will automaticaly run the dog script but only you will hear the dog sounds unless they have the dogsounds.tik
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

I think I found a sytax error in my post above
vector_within( level.dogorigin, $player[local.i].origin, 128 ))
take out the comma's should be
vector_within( level.dogorigin $player[local.i].origin 128 ))
Bouncer
Corporal
Posts: 28
Joined: Mon May 12, 2003 10:57 pm
Contact:

Post by Bouncer »

Cool, cause I was just about to ask....lol. Thanks
Bouncer
Corporal
Posts: 28
Joined: Mon May 12, 2003 10:57 pm
Contact:

Post by Bouncer »

Turns out the dog got caught up spawning in someone agian. Is there a way to adjust the values so that it takes longer for the dog to spawn and become solid and attatched to a player?
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

Just change the distanace players must be from the spawn point for the dog to spawn
vector_within( level.dogorigin $player[local.i].origin 256 ))


I wanted to make a global script that is why I used player origins .If it is not a stock map but one you create it is easier to do , make a dog house and spawn the dog there or at a few different locations . I think you can type something like cood into the console and get your coordinates where you are at the time to find coordinates to spawn at .
switch ((randomint 4)+1)
{
case 1:
$dog1.origin = ( -977.48 -1404.28 -39.99) //place the dog in the correct spot by coordinates
break
case 2:
$dog1.origin = ( -3368.60 -1562.27 -28.57)
break
case 3:
$dog1.origin = ( -2447.87 -471.22 16.13)
break
case 4:
$dog1.origin = ( -1631.67 1408.06 70.65)
break

}
instead of
$dog1.origin =level.dogorigin
and then get rid of the dog origin thread another way is to use a trigger_multiple . Make a trigger_multiple and use a key:setthread and value: global/mydog.scr::dogspawn and create a script_origin where you want the dog to spawn . Have the trigger target the origin then change the dog script like this .
$dog1.origin = self.target.origin
Bouncer
Corporal
Posts: 28
Joined: Mon May 12, 2003 10:57 pm
Contact:

Post by Bouncer »

Thanks
User avatar
bdbodger
Moderator
Posts: 2596
Joined: Tue Feb 25, 2003 7:34 am
Location: canada
Contact:

Post by bdbodger »

By the way it is type coord into the console not cood .
Post Reply