How to ignore a certain entity in C_scan?!

Posted By: Mahdi

How to ignore a certain entity in C_scan?! - 03/06/09 11:12

Hi,
I am trying to c_scan from my player but it always returns the Weapon entity that is attached to his hand.

How can I tell the C_scan to ignore the weapon?!
Posted By: Mageron

Re: How to ignore a certain entity in C_scan?! - 03/06/09 11:50

make the weapon passable and set the c_scanflag IGNORE_PASSABLE

Hope I can help.
Posted By: Anonymous

Re: How to ignore a certain entity in C_scan?! - 03/06/09 12:22

There is no IGNORE_PASSABLE with c_scan.
Maybe (not tested) you can use SCAN_LIMIT and not use ENABLE_SCAN with the scanned entites?
Posted By: fogman

Re: How to ignore a certain entity in C_scan?! - 03/06/09 12:32

From the manual:

IGNORE_PASSABLE
A7.2 LC
Ignores entities with the PASSABLE flag; to be combined with SCAN_ENTS.

IGNORE_FLAG2
A7.2 LC
Ignores entities with FLAG2; to be combined with SCAN_ENTS.

Further:
"To prevent that a scanning entity triggers itself, set IGNORE_ME.
To ignore a certain entity, set me or you to the entity pointer."


Hope this helps.
Posted By: Anonymous

Re: How to ignore a certain entity in C_scan?! - 03/06/09 12:49

Would you be that kind to tell me what manual you're using?
My A7.70 did not specify IGNORE_PASSABLE nor IGNORE_FLAG2 for c_scan.

[edit] - i see the german manual is out of date...
Posted By: EvilSOB

Re: How to ignore a certain entity in C_scan?! - 03/06/09 13:36

I would go for what one point that fogman mentioned.
Set the YOU pointer to the players weapon entity before the scan,
and have IGNORE_YOU in the scan flags.
Posted By: fogman

Re: How to ignore a certain entity in C_scan?! - 03/06/09 14:21

This one is *nearly* actual:
http://manual.3dgamestudio.net/
Posted By: Mahdi

Re: How to ignore a certain entity in C_scan?! - 03/06/09 19:44

I don't know why non of them works?!

I tried whatever you mentioned even before I ask it here.

I mean when I c_scan and ignored the passable or flag2 or ignored the you entity this code still runs:
c_scan(my.x,my.pan,vector(180,0,1000),ignore_me|ignore_passable);
if (you==weapon)
{
exit;
}

But it shouldn't run.
Posted By: EvilSOB

Re: How to ignore a certain entity in C_scan?! - 03/06/09 20:11

try this.
Code:
you = weapon;
var dist = c_scan(my.x,my.pan,vector(180,0,1000),scan_ents|ignore_me|ignore_you|ignore_passable);
if(dist!=0)
{ 
   //do something cause "you" is NOW the closest entity, which isnt weapon.
}
if(dist==0)
{
   //do nothing, cause nothing was found and weapon is still in the "you" pointer.
}





© 2024 lite-C Forums