Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Joey, flink, AndrewAMD, ozgur, Ayumi), 1,195 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Position to ENTITY* #354205
01/16/11 17:31
01/16/11 17:31
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Is there any function which gives a pointer to the entity on a known position?

I mean some function like this (which is not existing)?
you = entity_on_this_position(vector(0,50,0);


Thanks for reading, thinking, answering wink
Re: Position to ENTITY* [Re: Toryno] #354206
01/16/11 17:37
01/16/11 17:37
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline
Expert
Rei_Ayanami  Offline
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
c_scan

Re: Position to ENTITY* [Re: Rei_Ayanami] #354207
01/16/11 17:41
01/16/11 17:41
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
c_scan would be a solution but is there any faster function? wink


Thanks for reading, thinking, answering wink
Re: Position to ENTITY* [Re: Toryno] #354208
01/16/11 17:43
01/16/11 17:43
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
No. (You could iterate over all entities and check if the position intersects their bounding boxes but that would be slower than c_scan.)


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Position to ENTITY* [Re: Toryno] #354209
01/16/11 17:44
01/16/11 17:44
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
c_scan would be plenty fast if you use a very small scan radius and cone, and employ all the IGNORE_WHATEVERS as you can. If you know the exact location and the exact entity type, you could narrow it down enough so that c_scan is very fast.

Re: Position to ENTITY* [Re: Superku] #354210
01/16/11 17:45
01/16/11 17:45
Joined: Apr 2009
Posts: 138
Germany
T
Toryno Offline OP
Member
Toryno  Offline OP
Member
T

Joined: Apr 2009
Posts: 138
Germany
Ok thanks than i'll have to use c_scan.


Thanks for reading, thinking, answering wink
Re: Position to ENTITY* [Re: Toryno] #354223
01/16/11 20:31
01/16/11 20:31
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
or...

a) using nodes to store what is at each position

b) use ent_next to cycle through the entities to see if any are


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