Page 2 of 3
'dead' doesn work
Posted: Sun Jun 06, 2004 1:21 pm
by Cigs
player_teams:
while (1)
{
for (local.playtm=1;local.playtm <= $player.size;local.playtm++)
{
if (($player[local.playtm].dmteam == "axis") && ($player[local.playtm].
dead == 0))
$player[local.playtm] german
$player[local.playtm] threatbias 1000
if (($player[local.playtm].dmteam == "allies") && ($player[local.playtm].
dead == 0))
$player[local.playtm] american
$player[local.playtm] threatbias 1000
if (($player[local.playtm].dmteam == "spectator") || ($player[local.playtm].
dead == 1))
$player[local.playtm] threatbias ignoreme
}
waitframe
}
end
something like this, using the
dead command - related to the player.
Called when the player is dead.
how can i use it right
Posted: Sun Jun 06, 2004 1:21 pm
by bdbodger
I just occured to me are you playing this as a Team deathmatch or free for all ? There are 4 values for dmteam , spectator , freeforall , allies and axis . This won't work if you run it in free for all mode . Make sure you play it as a team deathmatch or obj not sure about roundbased I don't play that .
Posted: Sun Jun 06, 2004 1:25 pm
by Cigs
ok, will do
only Team Deathmatch!

last post
how check if $player[local.playtm] is dead?
this is in g_allclasses.html:
Player (player) -> Sentient -> Animate -> Entity -> SimpleEntity -> Listener -> Class
dead
Called when the player is dead.
but how is it used ? it calls ....
cmon

if dreams can get scripted, this shouldn be so difficult
thanx
need experts on this little something
Posted: Sun Jun 06, 2004 9:12 pm
by Cigs
Command: waitTill
Syntax: waitTill ( String eventName )
Example: $vip_player waitTill death
Description: Wait until event of type eventName.
where can i find more eventNames ?
.. spawn is an eventName too ?
Script Errors
Posted: Mon Jun 07, 2004 3:27 pm
by Cigs
3 script errors.

i have no clue anymore
seems, waitTill & health commands are used wrong
Code: Select all
level waittill spawn ///////////////////////***********************************************************
thread player_teams
thread spawnalliesdog
thread spawnaxisdog
end
//-----------------------------------------------------------------------------
spawnalliesdog:
while(1)
{
local.spawnalliesdog = spawn models/animal/german_shepherd.tik "targetname" "allies_dog"
local.spawnalliesdog origin ( -292.00 -164.00 0.00 )
local.spawnalliesdog angle 15
local.spawnaxisdog health 155
$allies_dog american
local.spawnalliesdog waittill death
wait 6
}
end
//-----------------------------------------------------------------------------
spawnaxisdog:
while(1)
{
local.spawnaxisdog = spawn models/animal/german_shepherd.tik "targetname" "axis_dog"
local.spawnaxisdog origin ( -292.00 124.00 0.00 )
local.spawnaxisdog angle 345
local.spawnaxisdog health 155
$axis_dog german
local.spawnaxisdog waittill death
wait 6
}
end
//-----------------------------------------------------------------------------
player_teams:
while(1)
{
for (local.playtm=1;local.playtm <= $player.size;local.playtm++)
{
if ($player[local.playtm].dmteam == "axis")
{
$player[local.playtm] german
$player[local.playtm] threatbias 1000
$player[local.playtm] waitTill death
$player[local.playtm] threatbias ignoreme
$player[local.playtm] waitTill spawn
$player[local.playtm] threatbias 1000
}
if ($player[local.playtm].dmteam == "allies")
{
$player[local.playtm] american
$player[local.playtm] threatbias 1000
$player[local.playtm] waitTill death
$player[local.playtm] threatbias ignoreme
$player[local.playtm] waitTill spawn
$player[local.playtm] threatbias 1000
}
if ($player[local.playtm].dmteam == "spectator")
$player[local.playtm] threatbias ignoreme
}
waitframe
}
end
download the map:
alliesaxisdogs.rar
Posted: Tue Jun 08, 2004 2:58 am
by bdbodger
while(1)
{
for (local.playtm=1;local.playtm <= $player.size;local.playtm++)
{
if ($player[local.playtm].dmteam == "axis")
{
$player[local.playtm] german
$player[local.playtm] threatbias 1000
$player[local.playtm] waitTill death
$player[local.playtm] threatbias ignoreme
$player[local.playtm] waitTill spawn
$player[local.playtm] threatbias 1000
}
if ($player[local.playtm].dmteam == "allies")
{
$player[local.playtm] american
$player[local.playtm] threatbias 1000
$player[local.playtm] waitTill death
$player[local.playtm] threatbias ignoreme
$player[local.playtm] waitTill spawn
$player[local.playtm] threatbias 1000
}
if ($player[local.playtm].dmteam == "spectator")
$player[local.playtm] threatbias ignoreme
}
waitframe
}
end
$player[local.playtm] waitTill death
this stops the thread until that 1 player dies
$player[local.playtm] waitTill spawn
don't think you can do that I think it only applies to the level
You know my browser keeps poping up an error 550 cig files/cig files/????.jpg folder not found
Posted: Tue Jun 08, 2004 3:14 am
by bdbodger
Well I tried your map it must be because it is a spearhead map that it does not work . 1 more reason I don't do spearhead .
15 seconds total ignore
Posted: Wed Jun 09, 2004 8:56 pm
by Cigs
well, ok
i leave it like this then.
Code: Select all
player_teams:
while(1)
{
for (local.playtm=1;local.playtm <= $player.size;local.playtm++)
{
if ($player[local.playtm].dmteam == "axis")
$player[local.playtm] german
$player[local.playtm] threatbias 1000
if ($player[local.playtm].dmteam == "allies")
$player[local.playtm] american
$player[local.playtm] threatbias 1000
if ($player[local.playtm].dmteam == "spectator")
$player[local.playtm] threatbias ignoreme
if ($player[local.playtm].health == 0)
{
$player[local.playtm] threatbias ignoreme
wait 15 // :/
}
}
waitframe
}
end
dog ignore the specific player for 15 secs. as you know ..IF there has to be waited for an amount off seconds before you can spawn on a server it will also be 15 seconds maximum.
if you can spawn immediatly ...well yea, he'll be ignoring a while. though... he'll start sniffing again :p
and euhm,...

what you said about the Cigs files error, damn, im shocked aswell! I will not use that ftp for use of attaching files or pictures on the forum!(s)
ty for help B

:(
Posted: Tue Jun 15, 2004 4:46 pm
by Cigs
i made a pk3 to test the map, seems anyone who kills a dog gets disconnected (not for unknown reason!) & server crashes (one time it didn't, but as soon as the admin killed a dog, it crashed). the models/fx/dogsounds.tik
is cache in alliesaxisdogs_precache.scr & is in the pk3. every file that was in maps/dm is also in that dir in the pk3.
how did it get fixed spawning in stock maps, i mean, how can i fix it here

alliesaxisdogs.pk3
Posted: Tue Jun 15, 2004 6:27 pm
by Cigs
pk3 works fine, but
on server it crashes!
here it is:
alliesaxisdogs.pk3
Posted: Tue Jun 15, 2004 10:23 pm
by bdbodger
That is a bug in the dog_killed.scr copy this and make a anim/dog_killed.scr
// dog_killed.scr
// 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
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
should a worked
Posted: Wed Jun 16, 2004 9:31 am
by Cigs
anim/dog_killed.scr in pk3
exec anim/dog_killed.scr in allieasaxisdogs.scr
server still crashes
keep in mind: i don't use any of you sript accept for dog_killed.scr now & your player_teams thread!
SHOULD I change everything to eventually spawn my dogs just like your xdmdogs2.pk3 does ??
Posted: Wed Jun 16, 2004 1:59 pm
by bdbodger
you don't exec anim/dog_killed.scr you just have to have it in the anim directory
Posted: Wed Jun 16, 2004 3:35 pm
by Cigs
still cannot kill dogs
on server, crash
alliesaxisdogs.pk3
Posted: Thu Jun 17, 2004 2:11 am
by Cigs
Forget alliesaxisdogs.pk3, unless you know what's up
I made a NEW MAP WITH YOUR global/dmdog.scr. instead, you're more familiar with. I did this real nice and im sure everything is in order!! (exec global/dmdog.scr in script, ...::dogspawn ..., anim/dog_killed.scr in anim dir, cache models/fx/dogsounds.tik in *_precache.scr + in correct dir)
Everything works, up to crash again 
...
here's the NEW MAP:
dmdogsmap.pk3
WORKS - *when dir/files in mohaa/mainta dir*
CRASH - *once dir/files in pk3*
I MUST BE DOING SOMETHING WRONG
