I'm working on a maze project and I would like to have secret doors. My basic idea is to have the walls be destroyed when the player is both within the bounds of a trigger volume, and presses a button. I know the basic way to implement the code, but my main concern is how to handle the volumes. Should I create a class, maybe called "SecretController" that holds the code that says:

"if player is in box[i] and presses fire, destroy door[i]"

This seems like it would work, but I'd rather know before I go create a ton of stuff I'll just have to delete later. Thanks for the help folks!


Your plan is sound. As to script complexity, this would be a tiny amount of blueprint nodes: one bool for volume, one bool for button, and boolean AND node, a branch node, a Destroy node. That should get you running.

I mention Blueprint because, although you have a C++ proejct, Blueprint has a much faster iteration time and was designed specifically for prototyping gameplay. When it works how you want, then transfer it to code.

| improve this answer | |
  • \$\begingroup\$ Sounds good, I will follow that method. Thank you JonS. \$\endgroup\$ – ethan codes Apr 6 '17 at 12:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.