Results 1 to 3 of 3

Thread: cloned object dose not know who it is.

  1. #1

    Question cloned object dose not know who it is.

    How do you get the GUID of a cloned Object?

    I found a way to give the object a unique name as it is spawned with

    local newObjectGUID = '00000'
    function dothing()
         local pos = player.getPosistion()
         local rot = player.getRotation()
        --clone the objectSpawned next to player
         local masterObject = getObjectFromGUID(objectSpawnedGUID)
         masterObject = setName('objectSpawnedName')
         -- Here I want to set newObjectGUID to the GUID of the object that is == newObjectName
         -- or another method more effictive if you know of one. Just trying to be able to do things with
         -- new object as i make and later destroy them
    Thanks in advance

  2. #2
    Ok figured out how spawnObject works despite it being a 404 in the api resource. Fortunately, the OLD help guide works just as well.

  3. #3
    when you clone() something you can store the object in a variable... then you can use any of the Get Functions on it...

    This is sudo code I am not sure it works or uses the correct things, I am pretty rusty
    local = clonedObject = bag.TakeObject{prams}.clone();
    local clonedGUID = clonedObject.getGUID()
    local clonedNAME = clonedObject.getName()
    loacl clonedDESCRIPTION = clonedObject.getDescription()
    My Boardgame uTube chan - Tragic's Table Top
    BGG Guild of BoardGame uTubers - Tube Tables

Similar Threads

  1. How exactrly dose Steam Upload Work?
    By Tragic in forum General Discussion
    Replies: 2
    Last Post: 02-20-2018, 03:51 PM
  2. How dose onSave() work?
    By Tragic in forum Scripting
    Replies: 11
    Last Post: 11-13-2017, 05:21 PM
  3. Cloned object has wrong guid
    By Banbury in forum Scripting Bug Reports
    Replies: 16
    Last Post: 08-04-2017, 05:42 AM
  4. Dose only the host need DLC or every player who joins?
    By Tragic in forum General Discussion
    Replies: 1
    Last Post: 06-22-2017, 05:20 PM
  5. Dose anyone know why snaps sometimes do not work?
    By Tragic in forum General Discussion
    Replies: 0
    Last Post: 05-27-2017, 07:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts