Modding Help (Solved) How does one use world.placeObject in 1.4?

Discussion in 'Starbound Modding' started by That1Rand0mChannel, Aug 24, 2021.

Tags:
  1. That1Rand0mChannel

    That1Rand0mChannel Industrial Terraformer

    I've been stumped over the use of world.placeObject, all of the forum threads i've seen mentioning this have been from 2016 and earlier, and they do not work at all. The starbound docs do say, but they do not work too. Not even the starbound.log helped, no errors popup. Even though the lua script has been activated, the lua script passes except for world.placeObject, not sure why world.placeObject does nothing at all, usually an error should be reported in the log.

    Here's the part of the lua containing the world.placeObject:
    Code:
    function test()
      animator.setAnimationState("light", "on")
      world.placeObject("inventorstable", object.toAbsolutePosition({ 0.0, 10.0 }));
    end
    I would like to see an example of world.placeObject shown in a way such as "world.placeObject("torch")"
     
    Last edited: Sep 18, 2021
  2. That1Rand0mChannel

    That1Rand0mChannel Industrial Terraformer

    Problem is semi-solved, modified the Lua script to use the color variable (<color>) with a new custom sprite accompanying that color to give the illusion of the object changing its sprite.

    I am still awaiting help regarding the world.placeObject function however, since that function can be useful in some instances, such as changing the default torch object to a default campfire.
     
    Last edited: Aug 26, 2021
  3. That1Rand0mChannel

    That1Rand0mChannel Industrial Terraformer

    New Bump, where's help when you need it?
     
  4. Lemon drops

    Lemon drops Scruffy Nerf-Herder

    I don't know for certain, but I think maybe the semicolon is the issue? Try without it and say if it works.
     
    That1Rand0mChannel likes this.
  5. That1Rand0mChannel

    That1Rand0mChannel Industrial Terraformer

    Tried without the semicolon, still yielded the same unsuccessful results, but I am glad that help finally came.
     

Share This Page