Results 1 to 3 of 3

Thread: Passing variable from callback into conditional.

  1. #1

    Passing variable from callback into conditional.

    Trying to place some tokens from a bag 1 by 1, but can't seem to pass the spawned obj in the callback into the conditional. Any ideas?


    Code:
    function setup ()
      chest.randomize(); chest.randomize(); chest.randomize();
      local chestitems = getObjectFromGUID('1e66e7').getObjects()
      local objn
          for k, v in pairs (betloc) do
            betchest.takeObject({
              position = v,
              smooth = true,
              callback_function = function(obj) store_guid(obj) callback_owner = Global end,})
              local tokenmove = function() return getObjectFromGUID(objn).resting end
              local tokenset = function() print(objn) end
              Wait.condition(tokenset,tokenmove)
          end
          function store_guid(object_spawned)
            local guid = object_spawned.getGUID()
            guid = objn
          end
      for c, d in pairs (getSeatedPlayers()) do
        findDeckInZone(acz).shuffle()
        findDeckInZone(acz).deal(5, d)
      end
    end

  2. #2
    Are you still working on this? I wrote some answers but it looks like they got lost. I'll reply if you're still interested. --

  3. #3
    Quote Originally Posted by MikeBlyth View Post
    Are you still working on this? I wrote some answers but it looks like they got lost. I'll reply if you're still interested. --
    yup got it working, thanks

Similar Threads

  1. Passing index to functions with Inputs and Buttons
    By Unreal_Ed in forum Scripting Suggestions
    Replies: 2
    Last Post: 05-25-2018, 04:23 PM
  2. Passing functions between scripts?
    By dzikakulka in forum Scripting
    Replies: 7
    Last Post: 07-20-2017, 06:56 PM
  3. Passing parameters to a coroutine
    By Tanners in forum Scripting
    Replies: 3
    Last Post: 04-04-2017, 09:19 AM
  4. Passing parameters to button's click_function
    By Didero in forum Scripting Suggestions
    Replies: 2
    Last Post: 03-24-2017, 11:09 AM
  5. Replies: 1
    Last Post: 08-07-2016, 07:12 PM

Posting Permissions

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