It is currently Mon Dec 01, 2008 1:13 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: ListItemsIntorus
PostPosted: Wed Feb 22, 2006 3:32 am 
Offline

Joined: Sat Feb 04, 2006 9:14 am
Posts: 90
Location: Aman
something like
ListItemsNearLocation( x, y, z, range, realm := _DEFAULT_REALM );
but with two ranges
ListItemsInTorus ( x, y, z, range1, range2, realm := _DEFAULT_REALM );
where range1<=range2

what for?
for example we need all items wchich are in exact range from our character.

i know I can use twice listitemsnearlocation whit different range and then compare and use only those item wchich are in the bigger and not in smaller range.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 22, 2006 6:12 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 796
Location: Chicago, IL USA
Cant do?

foreach item in ListItemsNearLocation(x,y,z,max_range,realm)
if (Distance(who, item) > min_distance)
...
endif
endforeach


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 7:56 am 
Offline

Joined: Sat Feb 04, 2006 9:14 am
Posts: 90
Location: Aman
yes... but if:
max_range:=3000;
min_range:=2999;

in listitemsnearlocation we have very much things...
so foreach item in listitemsnearlocation will have many loops


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 11:03 am 
Offline

Joined: Tue Feb 21, 2006 5:08 pm
Posts: 38
or rather make it possible to have as many ranges as the developer wan'ts because otherwise someone will come up someday with the idea to have 3 or 4 or so...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 12:57 pm 
Offline
Certified POL Expert
User avatar

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 796
Location: Chicago, IL USA
I dont think its even possible to make it so open that you can put in as many ranges as you want... but what would you want to happen exactly 3000 tiles away and how often will it run? If you have specific items or other things happening so far away, you should add the serial number to a prop that can be accessed easily by the script (if its an item's script the item's props otherwise you can use it on a global prop) then find it by SystemFindObjectBySerial()...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 1:29 pm 
Offline

Joined: Sat Feb 04, 2006 9:14 am
Posts: 90
Location: Aman
that was example...
but better one function will be then listitemsoftypeinbox


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl