1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Copy Constructors?

Discussion in 'Developer Support' started by Taarun, Jul 30, 2019.

  1. Taarun

    Joined:
    Aug 11, 2018
    Messages:
    4
    Likes Received:
    1
    Do the GameObjects, Npcs and other entities have copy constructors? I tried, couldn't find.

    If not, is there a way to save query results permanently? Or at least for the duration of the bot?

    So that the branches/leaves don't have to constantly query the exact same object everytime. Because their attributes don't change, so why search over and over... CPU and time waste.
     
  2. Savior

    Savior Java Warlord

    Joined:
    Nov 17, 2014
    Messages:
    4,906
    Likes Received:
    2,748
    You won't get around frequently querying for game information including entities like game objects because of the lifecycle of the game's objects.
    But it's not really that big of a problem for the CPU
     
  3. Taarun

    Joined:
    Aug 11, 2018
    Messages:
    4
    Likes Received:
    1
    Sorry dude, I didn't understand that. Is object lifecycle long or short? Or are you saying that frequent queries are a bad practice?

    Or you saying it's good either way, because it doesn't put load on the CPU.
     

Share This Page

Loading...