Page 1 of 1

Set Item Position

Posted: Mon Nov 17, 2014 2:24 pm
by Jouki
Hey guys sorry if it's already here (didn't see that before)

for those who didn't make this I've made a simple function with setting up a custom position

function

Code: Select all

function setItemPosition(sender,a,b,c,d)
	local pos = sender:getWorldPosition()
	sender:setWorldPosition(pos[1]+a,pos[2]+b,pos[3]+c,pos[4]+d)
end
for example you can easily move the dungeon wall latnern pretty easily (the offset of the lantern is about 0.2)

example

Code: Select all

setItemPosition(dungeon_wall_lantern_1,0,0.2,0,0)
You can do it with anything what you want, just put it to your "initial" script

Hope that helps :)