Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Ayumi, howardR, Quad), 509 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
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 Offline OP
Junior Member
Mahdi  Offline 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: Mahdi] #254916
03/06/09 11:50
03/06/09 11:50
Joined: Aug 2008
Posts: 43
Germany, Baden-Württemberg
M
Mageron Offline
Newbie
Mageron  Offline
Newbie
M

Joined: Aug 2008
Posts: 43
Germany, Baden-Württemberg
make the weapon passable and set the c_scanflag IGNORE_PASSABLE

Hope I can help.

Re: How to ignore a certain entity in C_scan?! [Re: Mageron] #254918
03/06/09 12:22
03/06/09 12:22

M
mercuryus
Unregistered
mercuryus
Unregistered
M



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
F
fogman Offline
Expert
fogman  Offline
Expert
F

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

M
mercuryus
Unregistered
mercuryus
Unregistered
M



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 Offline
Expert
EvilSOB  Offline
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: ] #254933
03/06/09 14:21
03/06/09 14:21
Joined: Apr 2005
Posts: 4,506
Germany
F
fogman Offline
Expert
fogman  Offline
Expert
F

Joined: Apr 2005
Posts: 4,506
Germany
This one is *nearly* actual:
http://manual.3dgamestudio.net/


no science involved
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 Offline OP
Junior Member
Mahdi  Offline 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 Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
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.
}







"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1