testobj = game.CurrentScene.Objects["xyz"]
testobj = getObject("Game.GameCurrentScene.SceneObjects[xyz]")
1
2
3
if "xyz" in game.CurrentScene.Objects then
testobj = game.CurrentScene.Objects["xyz"]
blabla....
end
1
2
3
4
5
testobj = game.CurrentScene.Objects["xyz"]
if testobj ~= nil then
end
1
2
3
4
5
testobj = game.CurrentScene.Objects["xyz"]
1
2
function contains(arr, name)
for i = 1, #arr do
if arr[i]:getName()==name then
return true
end
end
return false
end
print(contains(game.CurrentScene.Objects, "Objekt7"))
1
2
3
4
5
6
7
8
9
10
11
print( type(var) )
1
2