Set Item Position

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Jouki
Posts: 127
Joined: Fri Oct 24, 2014 12:57 pm

Set Item Position

Post 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 :)
Post Reply