I have Tile Map name “item” and I want to check.
First I do this.
function on_input(self, action_id, action)
if action_id == hash("space") then
local item = go.get_id("item")
print(item)
end
end
DEBUG:SCRIPT: hash: [10046918326113036017 (unknown)]
Now, I try to change the position.
function on_input(self, action_id, action)
if action_id == hash("space") then
local item = go.get_id("item")
print(item)
go.set_position(vmath.vector3(0,123,0),item)
end
end
DEBUG:SCRIPT: hash: [10046918326113036017 (unknown)]
ERROR:SCRIPT: /main/Test.script:30: Instance (null) not found
stack traceback:
[C]: in function ‘set_position’
/main/Test.script:30: in function </main/Test.script:24>