Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-22-2003, 04:03 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
onImage(filename,x,y)

Returns true if the point you specified is on the image and false if it falls on one of the transparent regions. I guess there are multiple this could be implemented:

1) The coordinates are given relative to the top-left corner of the image so the image doesn't need to be shown to be checked.
2) Instead of 'filename', the function takes image index (as used in showimg) and subsequently interprets the x and y as level or screen coordinates (depending on the draw layer of the given image).

Good for inventory systems - I can check if the player clicked on the apple rather than just checking against its bounding box. It opens up a few possibilities (systems like Ultima's, for example) and refines others. Let me know if the description wasn't clear enough.
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.