Hi Sebastian, I'm still looking this over, but I wanted to let you know, that with the } that you have commented out, in your code, you have an uneven number of braces so you should uncomment this for the if statement to work properly. Part of what I think might be happening, is that the line just after your if statement with your infokey is may not be being run so that might be part of the reason why you're not hearing the footsteps.

Now, as I said, I'm still reading this over, so this is just a first observation. <smile> Talk with you soon...

Smiles,

Cara

At 10:56 PM 7/30/2006 +0200, you wrote:

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



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.5/403 - Release Date: 7/28/2006


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.5/407 - Release Date: 8/3/2006


_______________________________________________
AGRIP-discuss mailing list
[email protected]
http://lists.agrip.org.uk/cgi-bin/mailman/listinfo/agrip-discuss

Reply via email to