You could do with several workarounds or a mod...but honestly
---> this is a perfect example for trying to achive something with the vanilla editor, that its definitely not made for.
What you CAN do is:
1. label (lets say) a skull (which is a halloween mask for the game) as a KEY which opens the door
2. give the door a hud that says "In this house you'll only get trick or treat if you wear a proper Halloween mask"
That way the player finds the houses locked until he finds a mask which allows him to enter the house (but I guess he wont find treats inside
)
In case you find my grammar and spelling weird ---> native German speaker ^^