Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,498 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
c_scan #216154
07/15/08 13:09
07/15/08 13:09
Joined: Dec 2003
Posts: 1,225
germany
gri Offline OP
Serious User
gri  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,225
germany
hi,

I made 2 enemy groups.
Their entities scanning with c_scan for the next one of the other group to attack.

note: .....
(besides I store all fighting entities in an array, so the c_scan function runs only once a time for performance reasons)

.... lets go ahead


C_SCAN delivers the entity standing next to the searcher even if it is a friendly entity.

#1:
When I set ENABLE_SCAN only for one group then they got found by the others but cannot self find the others.

#2:
IGNORE_YOU can only be set to 1 unit, what if 2 or more friends staying between the searcher and the next enemy ?

Now how to find only the enemy units with c_scan and ifnore all friendly ones?




greetings,
maik


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
Re: c_scan [Re: gri] #216313
07/16/08 12:48
07/16/08 12:48
Joined: May 2007
Posts: 185
Netherlands
SurudoiRyu Offline
Member
SurudoiRyu  Offline
Member

Joined: May 2007
Posts: 185
Netherlands
#define Team, skill50;

if team = 1 the entity is friendly
if team = 2 the entity is agressive

Like this it works smile

Just scan and check what his skill is

Hope it helps u on the way


-The Dragon's Eye is alway's watching you!-
Re: c_scan [Re: SurudoiRyu] #216328
07/16/08 14:07
07/16/08 14:07
Joined: Dec 2003
Posts: 1,225
germany
gri Offline OP
Serious User
gri  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,225
germany
hi,

I dont think that this works like I needs.

What if 2 or more "friendly" units standing between the Searcher and the enemy ?

c_scan delivers the "friendly" as next closest entity here.

I can set the "you" pointer to this entity and c_scan(...with IGNORE_YOU) again but there is another friendly one I have to ignore.
How to do that ?

As an workaround I could do the following:

1. If a unit of group-A want "c_scanning" I have to go through the array of group-A and reset(ENABLE_SCAN) for
each unit.

2. Now the unit can scan the area without getting a friendly one.

3. After that set(ENABLE_SCAN) is to do for the whole group again to gettn detected by the other group.

This is to make for the other group too if a member of them scan the area.

Yes I know the logic could be packed in a nice, litte function, but I cant believe that this is the right way.
There must be an easier way for that.


,gri


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
Re: c_scan [Re: gri] #216332
07/16/08 14:43
07/16/08 14:43
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
nope thats the only way unles you want to use ignore_flag2
but you still would have a problem for the other teams

i once requested for ingore_list but that was to usles and havy


"empty"
Re: c_scan [Re: flits] #216333
07/16/08 15:04
07/16/08 15:04
Joined: Dec 2003
Posts: 1,225
germany
gri Offline OP
Serious User
gri  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,225
germany
hi,

Originally Posted By: flits
nope thats the only way unles you want to use ignore_flag2
but you still would have a problem for the other teams
...


yes your'e right.

Beside that I thought that IGNORE_FLAG2 doesnt work in c_scan only in in c_trace (in manual c_scan doesnt list IGNORE_FLAG2).

,gri


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)
Re: c_scan [Re: gri] #216336
07/16/08 15:32
07/16/08 15:32
Joined: Jul 2007
Posts: 959
nl
F
flits Offline
User
flits  Offline
User
F

Joined: Jul 2007
Posts: 959
nl
Quote:
New flags IGNORE_FLAG2 and ACTIVATE_PUSH are added to the c_trace and c_move parameters for ignoring certain groups of entities on collision detection.


its was in beta 7.05


"empty"
Re: c_scan [Re: flits] #216503
07/17/08 11:15
07/17/08 11:15
Joined: Dec 2003
Posts: 1,225
germany
gri Offline OP
Serious User
gri  Offline OP
Serious User

Joined: Dec 2003
Posts: 1,225
germany
hi,

Great news folks!

God(or maybe JCL) seems to heared my call.

On the Beta page I've read the following lines.


V7.20.0b beta - in development
Quote:

...
Several mode flags were added to limit the entities detected by c_scan.
...



Sounds very usefull for my needs. Yeah!

,
gri


"Make a great game or kill it early" (Bruce Shelley, Ensemble Studios)

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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