Hello,
function class:CreateObject(model)
local object=self.super:CreateObject(model)
...
function object:Init()
class.sound=LoadSound('abstract::sound1.wav')
end
...
function object:Update()
value = object.model:GetSourceState(class.sound)
end
end
When I try to run the script I get "Index for object is not a valid field or method". According to documentation, GetSourceState will return the enumeration SourceState::Stopped/Playing/Paused.
I've tried "tonumber", with no success. How do you deal with enumerations in Lua?
Thanks,
Blue