Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
RE: FORITEMS doesn´t work right?
I think the best way, without use foritems is something like this:
Code:
[DEFNAMES SHRINES_P]
SHRINES 5
SHRINE_1 100,100
SHRINE_2 200,200
SHRINE_3 300,300
SHRINE_4 400,400
SHRINE_5 500,500
[FUNCTION GOTONEARESTSHRINE]
LOCAL.SHRINEDIST 10000
FOR 1 <DEF.SHRINES>
IF <SRC.DISTANCE <DEF.SHRINE_<dLOCAL._FOR>> < LOCAL.SHRINEDIST>
LOCAL.SHRINEDIST <SRC.DISTANCE <DEF.SHRINE_<dLOCAL._FOR>>
LOCAL.SHRINE <dLOCAL._FOR>
ENDIF
ENDFOR
SRC.GO <DEF.SHRINE_<dLOCAL.SHRINE>>
SRC.FIX
RETURN 1
I didn't test it, but I think its okay.
STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
|
|
07-06-2012 07:25 AM |
|
|