Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
0 registered members (), 938 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
C_Scan returning all entitys scanned? #186689
03/02/08 12:29
03/02/08 12:29
Joined: Nov 2006
Posts: 193
England
RyuShinji Offline OP
Member
RyuShinji  Offline OP
Member

Joined: Nov 2006
Posts: 193
England
Is there any way to scan all entitys and check their skills rather then stopping at the closest one?

here is my code:

__________________________________________________________________________________
if(my.player_lock_on == 1)
{
c_scan(my.x,my.pan,vector(360,180,250),scan_ents | scan_limit | ignore_me);
IF (you != null) {
IF (you.entity_type == 2 && you.player_number == my.target_num)
{
my.targete_x = you.x;
my.targete_y = you.y;
my.targete_z = you.z;

send_skill(my.targete_x,SEND_ALL);
send_skill(my.targete_z,SEND_ALL);
send_skill(my.targete_y,SEND_ALL);
}
else
{
my.player_lock_on = 0;
my.target_num = 0;
send_skill(my.player_lock_on,SEND_ALL);
send_skill(my.target_num,SEND_ALL);
}
}
else
{
my.player_lock_on = 0;
my.target_num = 0;
send_skill(my.player_lock_on,SEND_ALL);
send_skill(my.target_num,SEND_ALL);
}
}
_______________________________________________________________________________

you can see why only scanning the fist enemy might be a problem...

Re: C_Scan returning all entitys scanned? [Re: RyuShinji] #186690
03/02/08 16:09
03/02/08 16:09
Joined: Feb 2002
Posts: 357
Florida
Zelek Offline
Senior Member
Zelek  Offline
Senior Member

Joined: Feb 2002
Posts: 357
Florida
It sounds like you need to set the entity doing the scanning to have ENABLE_DETECT. From the manual under c_scan:

Quote:


If the my entity has ENABLE_DETECT set, it's event function is triggered once for every detected entity. During the event, event_type is set to EVENT_DETECT and you is set to the detected entity. This way all detected entities can be enumerated.





Check out the description for EVENT_DETECT to see an example of what you would need to do.


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