I have a door, with two associated switches, that are activated OnComponentBeginOverlap. This works and the door lerps to the end location. All good.
But I also want the door to stop, and lerp back to its start location if one of the switches is deactivated (leaves the box collision)
If you could please take I look, it would be highly appreciated!
you have two switches that both need to be activated on overlap but you want them to deactivate on end overlap? that doesnt make a lot of sense unless your switches are overlapping.
in any event though to have the door stop midway open and go back to closed all you need to do is run the reverse pin. you already have all the basic functionality here, you essentially just need to combine your two scripts. in your door, in the top section of code (door_open/close) create a second custom event that will be called anytime a switch is deactivated. then get your switch activated variable and decrement it (-1 set) then attach the decrement node to the branch you already have and connect the false pin to the reverse pin of the timeline.
yes, I want both objects to be overlapped on the switches for the door to open. Like two pressure plates that needs to be triggered for another to be activated. Your solution works, thanks! It only works once though, is there a way to go around this?
ok so its not the character but other objects that makes more sense.
what do you mean it only works once? its mean to work that if theres not enough switches activated the door will be closed. its more of a state based thing that a x number of times thing.