Hi,
How would I iterate over my table and then change the sprite of each gameobject in my table?
local function glow_all_chips(self)
for index, value in ipairs(self.chips) do
msg.post("#sprite", "play_animation", {id = hash.ATLAS[4].sprite})
end
end
function on_message(self, message_id, message, sender)
if message_id == hash.MSG_CHIP_REPORT then
table.insert(self.chips, sender)
end
end
How does it post the message to each gameobject to change the sprite?