dogs
Moderator: Moderators
I thought I fixed that anyway look in the script for the line
and try to change the distance from 128 to a longer distance should work and yes the dogs bite .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
hmm don't know why that is happening the script is suppose to not spawn a dog if a player is within 256 units of the spawn point . The script is made this way to be able to be used in any map by useing player origins . I will think about it but for now .
level.dogorigin.origin = $player[local.p].origin
Change to
level.dogorigin.origin = $player[local.p].origin + ( 0 0 160 )
and the dog will spawn 10 feet in the air and drop down . he he he
maybe if the script was changed so you could call the script and set the origin when you called it instead of running all the time let you call it when you want a dog spawned . You will still need to set where to spawn either by coordinates or an origin of something . You could maybe spawn it on a roof somewhere and let it drop down on the players ? hmm any suggestions ?
level.dogorigin.origin = $player[local.p].origin
Change to
level.dogorigin.origin = $player[local.p].origin + ( 0 0 160 )
and the dog will spawn 10 feet in the air and drop down . he he he
maybe if the script was changed so you could call the script and set the origin when you called it instead of running all the time let you call it when you want a dog spawned . You will still need to set where to spawn either by coordinates or an origin of something . You could maybe spawn it on a roof somewhere and let it drop down on the players ? hmm any suggestions ?
dogs
Unzip this and check it out. Just trying to help.
http://www.angelfire.com/dragon/cobra1/dogs.zip
http://www.angelfire.com/dragon/cobra1/dogs.zip

Well I have metioned about spawning dogs at coordinates before and if you downloaded my script you would see this
local.origin = ( -1631.67 1408.06 70.65)
exec global/mydog.scr::dogspawn local.origin
or use something like I did above and choose coordinates at random . The problem with the script is not the dog actions but haveing the dog spawn inside players unless you choose spawn points wisely you may have the same problem . Not as likely but possible and you will have to run the map and find coordinates first and write scripts for each map etc . The way I did it all you had to do was run the script nothing else and by putting exec global/mydog.scr into the dmprecache it ran everytime you ran a stock map but the spawn inside thing hmm mainly caused by players not moveing around enough . I tried the vector_within thing don't know why its not working .
this commented out part is an example of what I said about setting the coordinates for each map but this is a bad example because it is in the script . A better idea is to do what you did and I did . For example a person could call this script and pass the coordinates to it .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
}
}
spawn models/animal/german_shepherd "targetname" ("dog1")"type_idle" "dog_idle" "type_attack" "dog_attack"
// Set the AI properties
//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
//
// }
local.origin = ( -1631.67 1408.06 70.65)
exec global/mydog.scr::dogspawn local.origin
or use something like I did above and choose coordinates at random . The problem with the script is not the dog actions but haveing the dog spawn inside players unless you choose spawn points wisely you may have the same problem . Not as likely but possible and you will have to run the map and find coordinates first and write scripts for each map etc . The way I did it all you had to do was run the script nothing else and by putting exec global/mydog.scr into the dmprecache it ran everytime you ran a stock map but the spawn inside thing hmm mainly caused by players not moveing around enough . I tried the vector_within thing don't know why its not working .
Re: dogs
Check my server and tell me what you thing of my dogs in SpearHead:goanyx wrote:i want to have 3 dogs in my SP map
what do i have to ad in the script ?
they should die and not respawn .
At this moment, the dogs can kill you , they don't bark ( no sound ) and if you kill the dogs the game returns to the main menu .
can someone help me with this ?
<TWZ>FragZone=Custom Maps=Extreme Play=SuperComboMod=2.15=
IP(66.68.171.117)
Cya around
Yes, using the cordinates was going to be my next suggestion on how to set that up. By just using
Would the dogs be spawning radomly as well. What I mean is, is there a part of the script that needs to be disabled so the dogs only spawn according to the origin I create.....so they dont spawn on thier own where the player spawns too?local.origin = ( -1631.67 1408.06 70.65)
exec global/mydog.scr::dogspawn local.origin
I suppose I could do a rewrite of the script so that you can do both spwawn at coordiantes you choose and / or spawn at random but the thing is you need somewhere to spawn that is not inside a wall or on a roof so just chooseing spawn coordinates at random won't work . Either way someone will have to tell the map where the spawn points are . This script was originaly made to spawn dogs into stock mohaa dm maps that have no info pathnodes or support for dogs like the single player levels . Maybe I could make it so that you spawn 5 or 6 scipt_origins and choose one at random to spawn at . There is a dogfix for spearhead . You make a directory anim in a pk3 and you name the script dog_killed.scr
local.randnum = randomint 100
You can thank vonderbakluft for that fix . Any way I will work on it and see what I can come up with .
not sure why this line is in there though// dog_killed.scr
// Sprearhead Hotfix for the german dog (FIFI) Also usable for other scripted/static dogs.
// Vonderbakluft 2002 Q's @ Nemesis form or vonderbakluft@hotmail.com
// Location values:
// -2 false positive: should return a miss
// -1 General
// 0 head
// 1 helmet
// 2 neck
// 3 upper torso
// 4 middle torso
// 5 lower torso
// 6 pelvis
// 7 right upper arm
// 8 left upper arm
// 9 right upper leg
// 10 left upper leg
// 11 right lower arm
// 12 left lower arm
// 13 right lower leg
// 14 left lower leg
// 15 right hand
// 16 left hand
// 17 right foot
// 18 left foot
local.yaw = self GetLocalYawFromVector self.fact.direction
self.blendtime = 0.3
local.randnum = randomint 100
switch(self.fact.location)
{
// headshot
case 0: // head
case 1: // helmet (head)
case 2: // neck
// println "headshot"
self setmotionanim dog_death
break
// Stand Straight
case 3: // upper torso
case 4: // middle torso
case 5: // lower torso
case 6: // pelvis
// println "body"
self setmotionanim dog_death2
break
// Stand Knees
case 9: // right upper leg
case 13: // right lower leg
case 17: // right foot
case 10: // left upper leg
case 14: // left lower leg
case 18: // left foot
// println "legs"
self setmotionanim dog_death
break
// Stand Left
case 8: // left upper arm
case 12: // left lower arm
case 16: // left hand
// println "what's this?"
self setmotionanim dog_death2
break
// Stand Right
case 7: // right upper arm
case 11: // right lower arm
case 15: // right hand
// println "and what's this?"
self setmotionanim dog_death
break
default:
// println "dog pain in unknown location " self.fact.location "."
self setmotionanim dog_death
break
}
self waittill flaggedanimdone
end
local.randnum = randomint 100
You can thank vonderbakluft for that fix . Any way I will work on it and see what I can come up with .
Well I did a rewrite of the script to allow you do choose the spawn point when you run the script . I also took some inspiration from jv and added some DM support . What I did is allow you to now make the dog allied or axis and I spawned a little light to help you tell which is which . It cracked me up when I seen the dogs fighting each other
. It is still untested that is where you ppl come in . Here is the link to the pk3 read the readme.txt for usage instructions . http://members.shaw.ca/bdbodger/xdmdogs2.pk3 and here is a screenshot of a nasty dog fight in progress I have put a custom mohaa2.scr and precache in the pak as well as a dogsounds.tik . Let me know what you think . 

-
Desert Eagle
- Captain
- Posts: 237
- Joined: Mon Jan 13, 2003 1:05 am
- Location: Mapping Bunker
- Contact: