[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/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 - Unknown Command

Unknown Command

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Unknown Command

Postby smd » Sat Oct 06, 2007 4:10 pm

hi!

is there such a command in dp?
i highlighted it red, cause i dont want that the grunt gib a corpse.


if (killed or shoot by a grunt)
self.health=0;
else if (killed or shoot by the player)
self.health=25;

self.th_stand = SUB_Null;
self.th_walk = SUB_Null;
self.th_run = SUB_Null;
self.th_pain = SUB_Gib;
self.th_die = army_really_die;
self.th_melee = SUB_Null;
self.th_missile = SUB_Null;
self.takedamage= DAMAGE_YES;
self.flags = self.flags &! FL_MONSTER;
smd
 
Posts: 26
Joined: Sun Sep 23, 2007 2:58 pm

Postby Dr. Shadowborg » Sun Oct 07, 2007 3:59 pm

If what you're asking is for the grunt to lose interest in a corpse, then all you have to do is set the classname of whatever's become a corpse to well, "corpse" and then have a check in ai_run() (it's in ai.qc) to make sure that what it's attacking is NOT a corpse.
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1120
Joined: Sat Oct 16, 2004 3:34 pm

Postby smd » Sun Oct 07, 2007 8:20 pm

worksssssss :lol:

thank u very much!!!


great forum

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

Postby leileilol » Sun Oct 07, 2007 8:24 pm

Don't just thank 'u'. Also thank 'y' and 'o'.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Unknown Command

Postby Sajt » Sun Oct 07, 2007 9:36 pm

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 smd » Mon Oct 08, 2007 3:55 pm

sorry, but i need your help again :?

i have gibbable corpses, so i can also walk through them and gib them.

all works good, but sometimes suddendly all corpses become solid and i cant walk through them anymore and also all the teleporters in the map dont work then. So i cant finish shub-nigguraths pit for example, cause the teleport dont work. thats really weird!

i hope for a little help 8)
smd
 
Posts: 26
Joined: Sun Sep 23, 2007 2:58 pm

Postby smd » Mon Oct 08, 2007 8:39 pm

i found out that it has something to do with the w_fireaxe


void() W_FireAxe =
{
local float oldsolid;
local vector source;
local vector org;

makevectors (self.v_angle);
source = self.origin + '0 0 16';
if (ext_solidcorpse == TRUE)
{
oldsolid = self.solid;
self.solid = SOLID_BBOX;
}

traceline (source, source + v_forward*64, FALSE, self);
if (trace_fraction == 1.0)
return;

org = trace_endpos - v_forward*4;

if (trace_ent.takedamage)
{
trace_ent.axhitme = 1;
SpawnBlood (org, '0 0 0', 20);
T_Damage (trace_ent, self, self, 20);
}
else
{ // hit wall
sound (self, CHAN_WEAPON, "player/axhit2.wav", 1, ATTN_NORM);
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_GUNSHOT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
}
if (ext_solidcorpse == TRUE)
self.solid = oldsolid;

};


wihtout the red code pieces = its the original fireaxe, i cant gib the corpses.


with the red code = i can gib with the axe, but after one slash with the axe, the corpses are all solid and the teleporters dont work!
smd
 
Posts: 26
Joined: Sun Sep 23, 2007 2:58 pm

Postby Sajt » Mon Oct 08, 2007 11:12 pm

Put the second red bit before the 'if (trace_fraction == 1) return;' bit.

Otherwise, everytime you miss, the player is stuck as SOLID_BBOX forever.

It's customary to reset the solid right after the traceline. I usually make a function called traceline_hitcorpse to make this easy.
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 smd » Tue Oct 09, 2007 4:46 am

1000 thanks again, works perfect now


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


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 3 guests