Simple Door and Key System, and I'd like to build a complex system next...

, post:4, topic:114794"]

Well, Ispheria beat me to it - that’s exactly how I’d do it
[/QUOTE]

Great minds think alike, I say! :slight_smile: Thanks for chiming in!

I am struggling to figure this out, but it hasn’t beaten me yet! I’ve configured a “Key Owned” array, and am challenged by how to utilize it and feed it data. My logic tells me:

  • Each key trigger should be assigned a value which corresponds to the key number it represents being picked up
  • Each door trigger should be assigned a value which corresponds to the key permitted to open that door
  • Once the key is triggered, it should pass the variable attached to it to the “Key Owned” array, adding it to the list of keys held
  • Once the key is added to the list, the next process should read in the last passed value, and destroy the appropriate key’s actor
  • When you approach a door and trigger it, it should compare its own value to the list in the array, and determine whether or not you have the appropriate key (If your key list is empty, no-brainer message - “you ain’t got no danged keys!”) and give you the message
  • If you have the correct key, the process will destroy the door’s actor

If anyone has examples of the basics of assigning variables, passing them, and adding/modifying/deleting array variables, I would love the recommendations. (In the interim, I’m soldiering on!)

I appreciate the help, thanks!

**NINJA EDIT - **Currently reviewing this link: https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/Arrays