Open Door with key in array
Hey Guys :) I've made an Inventory Array that stores my item names and other variables that i have picked up. I can pickup my key wihtout any problem. I have an line trace in my characterBP wich sends an message to my interaction interface when it hit an actor. i can open and close my door perfectly but i want to lock that door and open it with a key. I tried on event interaction in my DoorBP and cast it to my inventory and then a branch that check if i have the key. My problem is now i dont know what to set in Object from the cast to inventoryBP. My interface has no output target for that object...I've tried the door itself, my character and my key and everything else whats an object/actor. Im a bit confused what to input, when i give my interface an in and output actor variable it shows me an error i hope you understand it , im german and think my english is maybe not the best x)
asked Nov 21 '15 at 01:54 PM in Blueprint Scripting
I believe you need to get your player character, cast it to whatever blueprint your character is, then within that, get your inventory.
Casting basically is just letting your game know what something is. Like if you cast your player character to "ThirdPersonCharacterBP" then the blueprints would know that your character is a ThirdPersonCharacterBP. If it isn't, then it will return cast failed.
answered Nov 21 '15 at 05:17 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here