Firing Animations help
Moderator: InsideQC Admins
8 posts
• Page 1 of 1
Firing Animations help
Hi i've been searching for animation tutorials and i couldnt find one for firing. Basically what i wanna do is that when my gun shoots i want it to play my animation of the gun
- sniperz227
- Posts: 112
- Joined: Sat Apr 09, 2011 3:19 am
Re: Firing Animations help
the animations of the weapons are located in player.qc
basically you need to specific the frames of the gun like "weaponframe"
Look this code in the player.qc
I do not know why these functions are in player.qc
But there are the animations for the weapons!!!!!!!!!

basically you need to specific the frames of the gun like "weaponframe"
Look this code in the player.qc
- Code: Select all
void() player_shot1 = [$shotatt1, player_shot2 ] {self.weaponframe=1;
self.effects = self.effects | EF_MUZZLEFLASH;};
void() player_shot2 = [$shotatt2, player_shot3 ] {self.weaponframe=2;};
void() player_shot3 = [$shotatt3, player_shot4 ] {self.weaponframe=3;};
void() player_shot4 = [$shotatt4, player_shot5 ] {self.weaponframe=4;};
void() player_shot5 = [$shotatt5, player_shot6 ] {self.weaponframe=5;};
void() player_shot6 = [$shotatt6, player_run ] {self.weaponframe=6;};
I do not know why these functions are in player.qc
But there are the animations for the weapons!!!!!!!!!
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
Re: Firing Animations help
Nahuel wrote:I do not know why these functions are in player.qc
frame macros
and now you know why!
W_Attack() in weapons.qc call these. like
player_shot1();
makes the quakeguy flash dance
i should not be here
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
oh so if i was my m4a1 firing had 24 frames in total how would i right that ? would i make the weaponframe =24? for player_shot1?
- sniperz227
- Posts: 112
- Joined: Sat Apr 09, 2011 3:19 am
sniperz227 wrote:oh so if i was my m4a1 firing had 24 frames in total how would i right that ? would i make the weaponframe =24? for player_shot1?
[EDIT]
Sorry, since you can see my English is very bad.the answer is NO! but you can see the answer in my following answer!
Last edited by Nahuel on Sat Apr 30, 2011 3:06 am, edited 2 times in total.
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
ok so my code would be
void() player_shot1 = [$shotatt1, player_shot2 ] {self.weaponframe=24;
self.nextthink = time + 0.01;
thats all ?
void() player_shot1 = [$shotatt1, player_shot2 ] {self.weaponframe=24;
self.nextthink = time + 0.01;
thats all ?
- sniperz227
- Posts: 112
- Joined: Sat Apr 09, 2011 3:19 am
for example!
void() player_shot1 = [$shotatt1, player_shot2 ] {self.weaponframe=1;
self.nextthink = time + 0.01;
};
void() player_shot2 = [$shotatt1, player_shot3 ] {self.weaponframe=3;
self.nextthink = time + 0.01;
};
void() player_shot3 = [$shotatt1, player_shot4 ] {self.weaponframe=4;
self.nextthink = time + 0.01;
};
....
here you must write all the remaining animations
void() player_shot24 = [$shotatt6, player_run ] {self.weaponframe=24;
self.nextthink = time + 0.01;
};
with regard to the (yellow) frame macro,I believe that if the player.mdl has 6 frames for the shot and you have 24 for the weapon you should use 1 (frame of player) *4 (frame of weapon)
for example
from
player_shot1 to player_shot4
shotatt1
and from
player_shot5 to player_shot9
shotatt2
check the time of nextthink!!
void() player_shot1 = [$shotatt1, player_shot2 ] {self.weaponframe=1;
self.nextthink = time + 0.01;
};
void() player_shot2 = [$shotatt1, player_shot3 ] {self.weaponframe=3;
self.nextthink = time + 0.01;
};
void() player_shot3 = [$shotatt1, player_shot4 ] {self.weaponframe=4;
self.nextthink = time + 0.01;
};
....
here you must write all the remaining animations
void() player_shot24 = [$shotatt6, player_run ] {self.weaponframe=24;
self.nextthink = time + 0.01;
};
with regard to the (yellow) frame macro,I believe that if the player.mdl has 6 frames for the shot and you have 24 for the weapon you should use 1 (frame of player) *4 (frame of weapon)
for example
from
player_shot1 to player_shot4
shotatt1
and from
player_shot5 to player_shot9
shotatt2
check the time of nextthink!!
hi, I am nahuel, I love quake and qc.
-

Nahuel - Posts: 492
- Joined: Wed Jan 12, 2011 8:42 pm
- Location: mar del plata
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest