Greetings,
In my project, I have a complex keycard system which checks if you have the right key AND transponder for the key, depending on what region you’re in.
I want to make it so that when you open a keydoor, all adjacent keydoors will open shortly after in a chain reaction.
Think of how the bomb blocks from Kirby work. Kind of like that.
In the process, I’ve gotten stuck:
Even though I’m using raycasts to check adjacent tiles, the main problem is that the code thinks I’m referring to the keydoor I just opened, not the ones adjacent to it. Therefore, the code only runs for that keydoor when it’s opened, and doesn’t trigger any of the others to open.
When moving the “animation = ‘open’” condition from the event, it just automatically opens EVERY keydoor.
How can I tell the code to trigger the events for what’s being detected by the raycasts to create the chain reaction I’m looking for?
Thanks