1. These forums are archived and available in read-only format. No new accounts may be created and content may not be added or edited. This archive is dedicated to hoshiwara.t who tragically passed away in April of 2015. She will be forever missed.

Scripting Question

Discussion in 'General Discussion' started by DirtyGoblin, Apr 14, 2014.

  1. DirtyGoblin

    DirtyGoblin Guest

    So ive been dabbling. I have a series of spawnguns. I got the nonhostile part down pat and buffed health on the monsters that plop out. But Im trying to figure out the bit of script to make the monsters into pets because i want certain "unique" monsters to follow the person using the gun. If it works out, ill be stoked. Im VERY new to this btw. No codong experience, and this is day 2 of dabbling for me. So help/advice tutorial links or premade script lists are welcone. :)

    Also. Usual smarphone grammar disclaimer.
     
  2. DirtyGoblin

    DirtyGoblin Guest

    I partly need this, before Roomba earns the medal of honor :3
     
  3. TAP123

    TAP123 New Member

    Joined:
    Jan 5, 2014
    Messages:
    266
    Likes Received:
    0
    This would be fun for lab rp... have zero experience with monster training and breeding/raising myself
     
  4. DirtyGoblin

    DirtyGoblin Guest

    :) Im trying to get the "Avian Sentry" to follow the user after spawning. Basicly portable representation of a Guard Npc. plus avian sentry is sexy on his vanilla hoverbike/canon
     
  5. Twitch

    Twitch Wayward Star

    Joined:
    Dec 17, 2013
    Messages:
    0
    Likes Received:
    0
    Because bird is the word.
     
  6. Hawke

    Hawke ACK!

    Joined:
    Dec 17, 2013
    Messages:
    0
    Likes Received:
    0
    [​IMG]

    Word.​
     
  7. Sen

    Sen Guest

    You'll want to examine filled capture pods in StarCheat, as well as monsters/capturepod.lua. From what I recall capture pods store the owner's UUID and that's how it determines who owns the pet.
     
  8. The Grand Mugwump

    Joined:
    Dec 29, 2013
    Messages:
    0
    Likes Received:
    0
    Yes. Use your character's UUID inside the spawnmonster arguments object. Example "ownerUuid": "987017y990sf7y432fdsysdsdfa90"
    They will then follow the specified character and behave like creatures spawned from a filled capture pod. UNFORTUNATELY, they also drop filled capture pods on death and I have no idea how to get rid of this functionality.
     
  9. Sen

    Sen Guest

    monsters/ground/groundmonster.lua
    Looking at die(), it seems to check if the creature is a capture pod monster, then does stuff with it. I haven't looked too in-depth, but it could be possible to trick the script into not thinking the creature is a capture pod monster. Maybe.
     
  10. The Grand Mugwump

    Joined:
    Dec 29, 2013
    Messages:
    0
    Likes Received:
    0
    It will probably be trial and error until Chucklefish makes an AI or type of critter which follows the player, fights for them, and doesn't drop a filled capture pod.
     
  11. Sen

    Sen Guest

    Oh, right, I forgot; NPCs don't use the same AI as monsters - NPCs being humanoids (avian, glitch, floran, etc.) while monsters being creatures (bosses and so on).
     
  12. DirtyGoblin

    DirtyGoblin Guest

    I think I must've left a line out, I had a launcher without my tester's Uuid and one with. Both acted the same, wandering at random, not following, and basicallyjust frolicking everywhere, other than with me :(

    I'll definately poke around the capture pods some more. Thanks for the help ya'll :D
     
  13. The Grand Mugwump

    Joined:
    Dec 29, 2013
    Messages:
    0
    Likes Received:
    0
    NPC's might not have the same parameters as monsters. I can't think of a single one which follows the player, so a vanilla friendly example may be hard to come by.