0 registered members (),
548
guests, and 2
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
How to ignore a certain entity in C_scan?!
#254913
03/06/09 11:12
03/06/09 11:12
|
Joined: Aug 2007
Posts: 74
Mahdi
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2007
Posts: 74
|
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?!
I don't care!
|
|
|
Re: How to ignore a certain entity in C_scan?!
[Re: Mageron]
#254918
03/06/09 12:22
03/06/09 12:22
|
mercuryus
Unregistered
|
mercuryus
Unregistered
|
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?
|
|
|
Re: How to ignore a certain entity in C_scan?!
[Re: Mageron]
#254919
03/06/09 12:32
03/06/09 12:32
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
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.
no science involved
|
|
|
Re: How to ignore a certain entity in C_scan?!
[Re: fogman]
#254920
03/06/09 12:49
03/06/09 12:49
|
mercuryus
Unregistered
|
mercuryus
Unregistered
|
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...
Last edited by mercuryus; 03/06/09 12:52.
|
|
|
Re: How to ignore a certain entity in C_scan?!
[Re: ]
#254926
03/06/09 13:36
03/06/09 13:36
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
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.
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Re: How to ignore a certain entity in C_scan?!
[Re: fogman]
#254976
03/06/09 19:44
03/06/09 19:44
|
Joined: Aug 2007
Posts: 74
Mahdi
OP
Junior Member
|
OP
Junior Member
Joined: Aug 2007
Posts: 74
|
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.
I don't care!
|
|
|
Re: How to ignore a certain entity in C_scan?!
[Re: Mahdi]
#254978
03/06/09 20:11
03/06/09 20:11
|
Joined: Feb 2008
Posts: 3,232 Australia
EvilSOB
Expert
|
Expert
Joined: Feb 2008
Posts: 3,232
Australia
|
try this.
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.
}
"There is no fate but what WE make." - CEO Cyberdyne Systems Corp. A8.30.5 Commercial
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|