I’ve been experimenting with doors, following various tutorials and then freestyling myself to try and learn more. The door I got working was using the Level Blueprint and when I tried replicating the door and trigger as a blueprint it either opened every door on the level when triggering one of the doors, or I had to replicate the script in its entirety for every door I want in the level.
Obviously I want to make a blueprint of a door mesh and a trigger and have it so I can copy paste it around the level and each one just works nicely and individually.
I thought I had gotten this but what this door does now is opens, and then the reverse node fires at the same time, and then the original node, then the reverse etc etc.
So the door goes up, then starts coming down straight away, then goes back up, then goes down and so on.
This didn’t happen when it was in the Level Blueprint so I think I am not accounting for something that is different because it’s in a blueprint.
Here’s a shot of the script. If you need more details let me know.
I guess the main thing that is going wrong is I don’t see why the ‘OnComponentEndOverlap’ node is firing?
Oh Hang on. Could it be that the Trigger box is moving up with the Door mesh?? So it triggers the end overlap, which then makes it drop back down, which then triggers it to go back up etc etc.
I bet if I check my hierarchy it will be nested as a child of the static mesh component, what do u think? If that’s the case can I just move it from being a child and it will act independently again?
So I was right, it was the fact that they are scene components in a blueprint and the trigger moves with the door mesh.
No matter what I do, I can’t separate them!?
I honestly don’t see why this is the case. I should be able to have them not nested in a parent/child relationship but even if they have to be linked, why I can’t have one as static and one as moveable I don’t know?
Can anyone help me out. Can’t find anything through the searches on here.
I’ve tried setting a new object the root object, and that didn’t work either.
In the graph view of the BP do you have the trigger as a parent (nested under) the mesh component? In that case, the trigger will follow the static mesh. They do not need to be nested in order for the trigger to function. Also, ensure that the triggers is set to Static and not Movable in the details panel.
One of them has to be the parent in this case, or I create another component such as ‘Scene’ and make this the root. Whichever way I try it doesn’t work. It won’t let me not have a parent.
If the Trigger is parent and I set it to Static, then the child gets set to Static too and vice versa if I have the Door Mesh as the parent and set it to moveable, the trigger becomes moveable. Either way the trigger either follows the door, or the door doesn’t move!
I might be wrong but can’t you unhook the inherited properties in the construction script?
I’ve had similar problems before and I forget what I did to fix it - Blast my horrible memory!!!