One more Daemon Eyes topic...
Posted: Mon Nov 05, 2012 3:45 pm
Only a little question about multiple objects in one script:
So, I have a puzzle. Four heads of four gods. And there are gems of certain colors for each one. Two of gods are one-eyed, one is fully eye-capable, and one is blind. Only one combination of gems with heads activates the portal.
The problem is: which kind of function is needed? I've tried something like this:
function fourportalactivate()
if firegodright:hasred_gem() or
firegodleft:hasred_gem() and
///the same one with the ice one
earthgodright:hasgreen_gem() and
earthgodleft:hasgreen_gem()
///air god is the blind one, yeah
then
fourportal:activated()
end
end
And I'm getting an error of "unknown type of function". "Has" function, to be precise. Am I supposed to use item NAME, or ID is needed?
So, I have a puzzle. Four heads of four gods. And there are gems of certain colors for each one. Two of gods are one-eyed, one is fully eye-capable, and one is blind. Only one combination of gems with heads activates the portal.
The problem is: which kind of function is needed? I've tried something like this:
function fourportalactivate()
if firegodright:hasred_gem() or
firegodleft:hasred_gem() and
///the same one with the ice one
earthgodright:hasgreen_gem() and
earthgodleft:hasgreen_gem()
///air god is the blind one, yeah
then
fourportal:activated()
end
end
And I'm getting an error of "unknown type of function". "Has" function, to be precise. Am I supposed to use item NAME, or ID is needed?