Hoppa AGRIP readers,
I'm very confused. :-(
I want to put into random footsteps. This will be work, but I have one
problem.
When I put into the code from www.inside3d.com all works fine. But I
want to change between the aq original footsteps and the random
footsteps.
When I use the following Code in the player.qc, I hear the footsteps of the
bots and my own too:
void() player_run =[ $rockrun1, player_run ]
{
// begin aqtourn
// begin random footsteps by ze0
if (self.walkframe == 1 || self.walkframe == 4 )
{
if (checkbottom(self) == 1)
{
if (self.waterlevel == 0)
{
local float r;
r = rint(random() * 3);
if (r == 1)
sound (self, CHAN_AUTO,
"player/foot1.wav", 0.5, ATTN_NORM);
else if (r == 2)
sound (self, CHAN_AUTO,
"player/foot2.wav", 0.5, ATTN_NORM);
else if (r == 0)
sound (self, CHAN_AUTO,
"player/foot3.wav", 0.5, ATTN_NORM);
else
sound (self, CHAN_AUTO, "player/foot4.wav",
0.5, ATTN_NORM);
}
}
}
//}
// end random footsteps by ze0
self.weaponframe=0;
if (!self.velocity_x && !self.velocity_y)
{
self.walkframe=0;
player_stand1();
return;
}
if (self.weapon == IT_AXE)
{
if (self.walkframe >= 6)
self.walkframe = 0;
self.frame = $axrun1 + self.walkframe;
}
else
{
if (self.walkframe >= 6)
self.walkframe = 0;
self.frame = self.frame + self.walkframe;
}
self.walkframe = self.walkframe + 1;
#ifdef AGRIP
agh_player_footsteps();
#endif
}
But, I want to select between old version of footsteps, new version
and no footsteps.
In the player.qc I use the following:
void() player_run =[ $rockrun1, player_run ]
{
// begin aqtourn
// begin random footsteps by ze0
if( infokey(self, "t_footsteps") == "1" )
{
if (self.walkframe == 1 || self.walkframe == 4 )
{
if (checkbottom(self) == 1)
{
if (self.waterlevel == 0)
{
local float r;
r = rint(random() * 3);
if (r == 1)
sound (self, CHAN_AUTO,
"player/foot1.wav", 0.5, ATTN_NORM);
else if (r == 2)
sound (self, CHAN_AUTO,
"player/foot2.wav", 0.5, ATTN_NORM);
else if (r == 0)
sound (self, CHAN_AUTO,
"player/foot3.wav", 0.5, ATTN_NORM);
else
sound (self, CHAN_AUTO, "player/foot4.wav",
0.5, ATTN_NORM);
}
}
}
//}
// end random footsteps by ze0
// end aqtourn
self.weaponframe=0;
if (!self.velocity_x && !self.velocity_y)
{
self.walkframe=0;
player_stand1();
return;
}
if (self.weapon == IT_AXE)
{
if (self.walkframe >= 6)
self.walkframe = 0;
self.frame = $axrun1 + self.walkframe;
}
else
{
if (self.walkframe >= 6)
self.walkframe = 0;
self.frame = self.frame + self.walkframe;
}
self.walkframe = self.walkframe + 1;
#ifdef AGRIP
agh_player_footsteps();
#endif
}
--
The problem is, that I heare my own footsteps, but the footsteps of
the others doesn't work. :-(
When I use the
if( infokey(self, "t_footsteps") == "1" )
I hear only my own footsteps. When I use this not, I heare my own and
the other footsteps.
Can everybody tell me what happens?
Thanks and
Best regards Sebastian
ICQ: 264706583 / MSM: [EMAIL PROTECTED]
Yahoo: de_sebo / Skype: sebo_de
E-Mail: [EMAIL PROTECTED] / Web: www.aritamba.de
_______________________________________________
AGRIP-discuss mailing list
[email protected]
http://lists.agrip.org.uk/cgi-bin/mailman/listinfo/agrip-discuss