Thread: testindex(x, y)
View Single Post
  #1  
Old 03-16-2003, 09:39 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
testindex(x, y)

This would be usefull as it could return the index number of a item (e.g. showpoly, showimg, showtext, showani, etc . . .) at the given X and Y.

Example:
NPC Code:

if (created) {
showimg 1,test.gif,130,130;
changeimgvis 1,5;
timeout = .05;
}

if (timeout) {
test = testindex(mousescreenx, mousescreeny)

if (test == 1) {
message Mouse is at index 1;
}
timeout = .05;
}



For this to work it would have to check the demensions of the item, such as the full demensions of an showimg.
__________________
new account: Trevor
Reply With Quote