Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (Dico), 16,767 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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