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_hot()</b> c_demo http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
OBJ_HOT()                                                           C_DEMO
   Finds the closest object and makes it 'hot'.

   Syntax
         nObjNumber = OBJ_HOT()

   Arguments
         None

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

   Description
         OBJ_HOT() finds the closest object, makes it the 'hot' object, and
         returns its number. It returns 0 if no object was close enough to be
         found. The function will find objects according to their search
         method. 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.

         Before trying to find any objects with a mouse, a HOT_VIEW() must be
         called.
   Examples

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

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

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

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