Forum

Making a chainsaw, damage problems.

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Making a chainsaw, damage problems.

Postby Karall » Wed Jan 05, 2011 5:03 pm

So basicly im making a chainsaw in quake. So i switched the axe model with my chainsaw, and the i edited the time that it takes for the attack to be done on the axe from 0.5 to 0.1. The sound replays really fast, but the chainsaw only does damage when i release the attack button. What is failing?
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby Orion » Wed Jan 05, 2011 5:36 pm

If you see the (if (self.weapon == IT_AXE)) on W_Attack(), you'll see that there's no W_FireAxe(). Call it just before self.attack_finished. It only fires when you release the button because W_FireAxe() is called on the third frame of the 4 player's axe attack animations. Remove all W_FireAxe() in player_axe3() to player_axed3() in player.qc.

Hope it helps. :wink:
User avatar
Orion
 
Posts: 476
Joined: Fri Jan 12, 2007 6:32 pm
Location: Brazil

Postby Karall » Wed Jan 05, 2011 5:55 pm

I just placed the fireaxe function on every frame. Works great now. Thanks for the help man :D
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby Karall » Thu Jan 06, 2011 11:45 pm

I know im asking here all the freaking time. Ive finally realiced that i should stop being lazy. So this time i researched a bit. Anyway, i have another animation problem. Basicly i made an axe animation that has 6 frames. Quakes animation has 4 (correct me please). Ive tried adding more frames to stop the axe from glitching with the animation, but apparantley i need to define the frames first. Or something like that. How would i do this?
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby ceriux » Fri Jan 07, 2011 2:30 am

im not sure, but i believe thats the macros at the top.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Postby Karall » Fri Jan 07, 2011 9:31 pm

You mean:
$frame axatt1 axatt2 axatt3 axatt4 axatt5 axatt6
That?
Karall
 
Posts: 128
Joined: Thu Jul 15, 2010 5:23 pm

Postby ceriux » Fri Jan 07, 2011 9:42 pm

yup read through ur qc files and see how they're used.

also does your first person frame count match? im not sure if that matters but it might? i havnt messed around with any of it in a long time. i also prefer setting up animation with out the macros.
User avatar
ceriux
 
Posts: 2223
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest