Boss429
Joined: 03 Dec 2006 Posts: 22
|
Posted: Sun Mar 01, 2009 7:20 am Post subject: Animations in DarkPlaces |
|
|
I've been tearing my hair out trying to get quakec to use the correct frames for a different v_shotgun model.
I'm using that q3mdl mod as a base for my code.
The firing animation I want to use is from frame 14 to 17 but it keeps playing something like frame 2 instead.
Here's what the shotgun section of W_Attack Code: | else if (self.weapon == IT_SHOTGUN)
{
player_shot1 ();
W_FireShotgun ();
self.attack_finished = time + 0.5;
}
|
player_shot1:
Code: | void() player_shot1 = {W_FireShotgun(); self.torso.animation = 1;}; |
here's the player eachframe:
Code: | void() md3_player_eachframe =
{
local float r;
if (intermission_running)
return;
if (self.weapon == IT_AXE)
{
if (self.weaponframe > 0)
{
self.weaponframe = self.weaponframe + 1;
if (self.weaponframe == 4 || self.weaponframe == 8)
self.weaponframe = 0;
}
if (self.newattack)
{
r = random();
if (r < 0.25) {self.weaponframe = 1;}
else if (r < 0.5) {self.weaponframe = 5;}
else if (r < 0.75) {self.weaponframe = 1;}
else {self.weaponframe = 5;}
self.newattack = FALSE;
}
}
else if (self.weapon == IT_SHOTGUN)
{
if (self.weaponframe > 13)
{
self.weaponframe = self.weaponframe + 1;
if (self.weaponframe == 17)
self.weaponframe = 13;
}
if (self.newattack)
{
self.weaponframe = 14;
self.newattack = FALSE;
}
}
|
what am I missing? |
|