Results 1 to 2 of 2

Thread: SpawnObject inline parameters for grid and scaling?

  1. #1

    SpawnObject inline parameters for grid and scaling?

    Hi all,

    I'm trying to apply image scaling to a new figure and not have it snap to grid. However, I've tried setting snap_to_grid=false, and it doesn't work, whether I add it to the SpawnObject call or the SetCustomObject call (where I apply the name). For image scaling (as in, not the base, just the image, I haven't found any parameter call for this. Does any one have any tips for this?

    This is the current code (it actives on button click):

    local toolPos = self.getPosition()
    local obj = spawnObject({type="Figurine_Custom",
    position={toolPos.x,toolPos.y+1,toolPos.z},
    rotation = {0, 0, 0},
    scale = {1, 1, 1}
    })
    obj.setName("Fig Name)")
    obj.setCustomObject({image="URL"})

  2. #2
    Join Date
    Sep 2017
    Posts
    397
    Only way I can think of, is to either adjust the image at the source, or scale the base to the actual image size at first, add the image, then scale the whole thing to the size you want. There might be a better way, though, I am only a beginner at working with custom objects. You can try the discord: https://discordapp.com/invite/tabletopsimulator to find more experienced content makers.

Similar Threads

  1. SpawnObject Sound
    By Ajkiger1 in forum Scripting
    Replies: 4
    Last Post: 01-21-2018, 06:10 PM
  2. [ADDED] [v8.7] Consistent Scaling + Advanced Scaling
    By Adventurer in forum Suggestions
    Replies: 3
    Last Post: 02-17-2017, 08:58 PM
  3. Add parameters.parameters to button parameters.
    By MrStump in forum Suggestions
    Replies: 0
    Last Post: 07-03-2016, 11:23 AM
  4. [SOLVED] In grid options, erasing last digit in grid size textbox leads to crash.
    By UltraBloxX in forum Technical Support
    Replies: 0
    Last Post: 06-05-2016, 05:25 AM
  5. v7.3 spawnObject scale problem
    By customKarma in forum Scripting
    Replies: 1
    Last Post: 05-29-2016, 02:41 AM

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
  •