I am missing some hook on Button entity like "onActivate = function(self)......"
I need spawn some buttons "on-the-fly" in my script entity (after activate pressure plate) and these must be active - connected to doors.
- Or eventually How to I remove entity (button/lever) created by editor
- Or eventually How to I hide entity (button/lever) created by editor
- Or eventually How to I move entity (to wall) or change its facing
Code: Select all
-- first: clone new custom button in the objects.lua
cloneObject{
name = "Custom_wall_button",
baseObject = "wall_button",
-- need the onActivate hook
}
-- next in the lua script entity
function ActivatePressurePlate()
spawn("Custom_wall_button", 1, 10, 21, 2, "MyWallbutton1")
-- is there any way to connect MyWallbutton1 to the door?
end