I’m currently working on a 2D Platformer in my spare time. Though I’ve run into a problem.
What I’m trying to achieve is; Whenever I turn off the Blue Switch, the Blue Lasers will disappear.
What I have right now is this:
This is the Blueprint for the Switch. It does change into a different sprite.
Which is referenced and cast to in the Blueprint for the Laser:
This is the Blueprint for the Laser. It doesn’t remove the sprite so the player can continue.
I’ve tried replacing the “Deactivate” node with multiple other ones, such as changing the sprite and leaving the selection empty, turning it invisible and removing the actor.
If anyone could help me out on this one, that’d be very much appreciated!
Once I changed the name of the variable to “TurnedOff1” in the Switch blueprint, the variable in the Laser blueprint changed as well. So I’m pretty sure they’re referencing each other.
I also changed the “Deactivate” node to “Toggle Active”, but that doesn’t help either, sadly.
Celestial,
Can you setup a print statement at CastFailed in the Cast To BlueSwitch Industrial level01, a print statement in both True & False pins in the Branch Condition Node and let me know if the print statements are being printed as expected ?