[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - kickheads on & off?

kickheads on & off?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

kickheads on & off?

Postby smd » Fri Oct 12, 2007 11:59 am

i've tried out the kickheads tutorial from Ivana Gibson and it works great.
but i only want to kick these heads when i press the MOUSE2 button, so i have added the command

.float kickgibs; into the defs.qc

then

if (self.impulse == 25)
self.kickgibs = TRUE;
if (self.impulse == 26)
self.kickgibs = FALSE;


into weapons.qc

and this

alias +kickgibs_on "impulse 25"
alias -kickgibs_on "impulse 26"

bind MOUSE2 +kickgibs_on


into my autoexec.cfg

and finally


//**********************************************
//Kicking Gibs n Dead Heads
//**********************************************

void() kick_touch;

void() kick_touch =
{
local vector v;

if (self.kickgibs != TRUE)
return;


// only a player can kick it
if (other.classname != "player")
return;

//randomize sound
if (random()< 0.6)
sound(other, CHAN_ITEM, "zombie/z_hit.wav", 1, ATTN_NORM);
else
sound(other, CHAN_ITEM, "zombie/z_miss.wav", 1, ATTN_NORM);

//define velocity
//you can play with these formulas to adjust
//trajectory
v_x = (other.velocity_x*2+50*random());
v_y = (other.velocity_y*2+50*random());
v_z =250 + 160 * random()+(other.velocity_y+other.velocity_x)*0.30;

self.flags = self.flags - ( self.flags & FL_ONGROUND );
self.velocity = v;
};



but it doesnt work!!!

i hope someone knows whats wrong...
smd
 
Posts: 26
Joined: Sun Sep 23, 2007 2:58 pm

Postby Urre » Fri Oct 12, 2007 12:16 pm

At my first glance it looks like it should work (only looked at the code you added though), what happens? Does it kick it anyway, or does it not work at all?
I was once a Quake modder
User avatar
Urre
 
Posts: 1109
Joined: Fri Nov 05, 2004 2:36 am
Location: Moon

Postby smd » Fri Oct 12, 2007 1:37 pm

when i remove

if (self.kickgibs != TRUE)
return;
it works, but without pressing the MOUSE2 button.

with
if (self.kickgibs != TRUE)
return;
nothing happens!
smd
 
Posts: 26
Joined: Sun Sep 23, 2007 2:58 pm

Postby CocoT » Fri Oct 12, 2007 3:43 pm

Shouldn't it be other.kickgibs?
- New location: Update your bookmarks!
User avatar
CocoT
 
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum

Postby RenegadeC » Fri Oct 12, 2007 4:11 pm

User avatar
RenegadeC
 
Posts: 391
Joined: Fri Oct 15, 2004 10:19 pm
Location: The freezing hell; Canada

Postby smd » Fri Oct 12, 2007 4:51 pm

smd
 
Posts: 26
Joined: Sun Sep 23, 2007 2:58 pm

Postby CocoT » Tue Oct 16, 2007 2:38 pm

- New location: Update your bookmarks!
User avatar
CocoT
 
Posts: 695
Joined: Tue Dec 14, 2004 5:39 pm
Location: Belly-Gum

Postby Sajt » Wed Oct 17, 2007 3:01 am

F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Electro » Wed Oct 17, 2007 3:53 am

Benjamin Darling


Reflex - In development competitive arena fps combining modern tech with the speed, precision and freedom of 90's shooters.
Electro
 
Posts: 312
Joined: Wed Dec 29, 2004 11:25 pm
Location: Brisbane, Australia


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 3 guests