I fixed it by following the thread here: Accessing internal state (self) of another game object? (SOLVED)
I created a gop.lua file and use the gop method to pull up the object properties for each instance and then read the objtype property from that.
EDIT: I modified the gop.lua file suggested as such btw:
local M = {}
local gop_tables = {}
function M.get(url)
url = url or msg.url(".")
if type(url) == "string" then url = msg.url(url) end
if gop_tables[url.path] == nil then gop_tables[url.path] = {} end
return gop_tables[url.path]
end
function M.final(url)
url = url or msg.url(".")
if type(url) == "string" then url = msg.url(url) end
gop_tables[url.path] = nil
end
gop = M
Thanks for the help everyone