Download

[UE4_BP_CPP] Assigning an item (for example, a Access Level Card 1 from scp: secret laboratory) its own id.

I want to apologize in advance if the solution is very simple, but I’m new to UE4.

I have a 3D model of a card and a texture for it. How can I best create this very card? Through an actor or an actor component? I would also like to assign a special ID to this card and make it issue through the admin panel.

How can I do this using blueprints / c ++

TL:DR Key (in the world) should be an actor but once the player picks it up, it should be added to the player “inventory”. Other systems should look at the player’s “item list” to figure out if the player has the given key.

The issue with questions like these is that it’s too broad. There is no definitive “this is how to do it”. It can be done in a million ways and it can be as simple or complex as you want/need.

Is the key something you find in the level? Then it should be an actor. I’m not sure what “assigning an ID” means though. A control panel or something has to know if the player got the required card? That should be done through some form of a player inventory. Don’t overthink it. A list of names is already an inventory. The control panel can check if the item list contains the given name. The inventory itself can be an actor component, a subsystem, part of the character/player state logic, etc. You can have a variable “ItemName” on the key actor, when the player picks up the key, you can add this name to the player inventory. After that the key actor can be destroyed.