Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>obj_hotpnt()</b> c_demo http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
OBJ_HOTPNT()                                                        C_DEMO
   Finds the closest object's nearest point and makes it 'hot'.

   Syntax
         nObjNumber = OBJ_HOTPNT()

   Arguments
         None

   Returns
         nObjNumber  Returns the object number or a 0 if no object was close
                     enough to be found.

   Description
         OBJ_HOTPNT() finds the closest object's nearest point, makes it the
         'hot' object, and returns its number. It returns a 0 if no object was
         close enough to be found. The function will find objects according to
         how the search method was set. The search method is set in
         LAYER_OPEN() and can be changed with HOT_METHOD() and LAYER_ON().

         The 'hot' object is the one currently identified for action by many
         of the other functions. This 'flagging' is required for certain
         object related functions such as moving, deleting, marking and
         copying.

   Examples

         This code fragment will make the closest object hot and, if found,
         will move the object's nearest point with the mouse.

         DO WHILE .T.
            KEY_PRESS()
            IF KP_MSTATE(2) = 1
               IF OBJ_HOTPNT() > 0
                  OBJ_MOVPNT(KP_ITEM_NO())
                  EXIT
               ENDIF
            ENDIF
         ENDDO

See Also: HOT_INFO() HOT_METHOD() HOT_VIEW() OBJ_HOT()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson