I don't know if it is a bug but it is very anoying for me that activating the checkbox "disableSelf" for buttons in Grimrock 2 editor does not work/has no effect.
Example: Take a lever and a door, activte the checkbox "disableSelf" of the lever-component and it works, it opens or closes the door and after that it has itself deactivted and no function anymore.
But, when you do the same with any button, activating the checkbox "disableSelf" has no effect. The button never deactivates itself.
Is this a bug or do I miss something? I really would like to have this function enabled for buttons because I need it for my custom dungeon.
Grimrock 2 editor: Button disableSelf has no function!
Re: Grimrock 2 editor: Button disableSelf has no function!
You're right, it doesn't work. Fortunately, this is very easy to fix. Just define all your buttons with this onActivate hook:
Then disableSelf will have the desired effect.
Code: Select all
defineObject{
name = "wall_button",
baseObject = "wall_button",
components = {
{
class = "Button",
sound = "button",
onActivate = function(self)
return self:isEnabled()
end,
},
}
}
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: Grimrock 2 editor: Button disableSelf has no function!
Great, works like a charm!
Thank you for the help and fast reply!
Thank you for the help and fast reply!