I am trying to update the alert_message of a programmable speaker within a mod.
Will use that later on when I create an "own entity" based on the speaker.
When running this code with a speaker selected I always get the current value, it never updates.
Code: Select all
/c
s = game.player.selected
if s.name == "programmable-speaker" then
game.player.print("am = " .. s.alert_parameters.alert_message)
s.alert_parameters.alert_message = "mytest"
game.player.print("am1 = " .. s.alert_parameters.alert_message)
end
Any hint on what I am missing ?