creating a footkick in QC ??;)

Discuss programming in the QuakeC language.
Post Reply
dr_mabuse
Posts: 80
Joined: Sat Sep 03, 2011 6:07 pm

creating a footkick in QC ??;)

Post by dr_mabuse »

can you guys tell me how i can create a "footkick"??
the footkick should be activated by a seperate assigned button (like the knife in call of duty) and my equipped weapon should be still displayed...??
lets say my footkick is "IT_FOOT"...
thanks
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: creating a footkick in QC ??;)

Post by Nahuel »

To Assign a footkick you do not need to have any "IT_..." I guess the player does not need any new item to throw kicks, and no need to select the kicks (like a regular weapon). It would be like a secondary attack. You can call easily the function in impulse_commands for example.
But (sepaking about v_model) if you are not using darkplaces (to support veiwmodelforclient) you can´t show the weapon model and the leg model in the screen. You can´t call two "weaponmodel" in the screen, for example if your "leg model" has 4 frames, you need write in weapons, very above, something like:

Code: Select all

void ()player_kick;
void() FootKick =
{
self.weaponmodel = "progs/v_leg.mdl";

self.attack_finished = time + 1.5;
player_kick ();
}:
and in "impulsecommands" function:

Code: Select all

if (self.impulse == 14)
		FootKick  ();
After in player.qc, before the line "void() PainSound ="


Code: Select all

void()	player_kick =	[$axatt1, player_kick1 	] {self.weaponframe=1; };//i am using the axe frames of the player to test, use your custom frames :)
void()	player_kick1 =	[$axatt2, player_kick2 	] {self.weaponframe=2;};
void()	player_kick2 =	[$axatt3, player_kick3 	] {self.weaponframe=3; W_FireAxe();};//here you need to call your custom attack, i am using fireaxe to test the code :)
void()	player_kick3=	[$axatt4, player_run	] {self.weaponframe=4; W_SetCurrentAmmo(); };

This is just a idea to write something like you want, i didnt test it :)
hi, I am nahuel, I love quake and qc.
dr_mabuse
Posts: 80
Joined: Sat Sep 03, 2011 6:07 pm

Re: creating a footkick in QC ??;)

Post by dr_mabuse »

thanks, i will try it :D

my goal is to re-create the footkick from wolfenstein, or something like the knife in call of duty ;)
EDIT: Nice, works thanks for the little help ;)

http://www.moddb.com/games/wolfenstein- ... house-kick
Seven
Posts: 301
Joined: Sat Oct 06, 2007 8:49 pm
Location: Germany

Re: creating a footkick in QC ??;)

Post by Seven »

Hello dr_mabuse,

if you didnt see this thread before, be sure to read it carefully:
http://forums.inside3d.com/viewtopic.php?f=13&t=2969

It will give you additional ideas/codes/models.

Kind regards,
Seven
Post Reply