Modding Discussion What's the lua function to let enemies chase dropped items?

Discussion in 'Starbound Modding' started by I_Beest_the_Canon, Apr 10, 2020.

  1. I_Beest_the_Canon

    I_Beest_the_Canon Master Chief

    Lessay I drop a meat on the ground. I want monsters to target the meat, approach it and consume it. Yummmm. How can I do that? I only find world.takeItemDrop.
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    Such a function itself doesn't exist.

    If you look through the Pet code - you will notice first a line is drawn between the character and object
    the object is then read
    Then assigned a random value.
    Then told to move to object
    then the object is removed.

    It isn't a simple straight forward operation.
    If you check pet code you will have a good idea on how its done.
     

Share This Page