Download

equipment item problem

i cant equip my armory
this is my bpequiparmory.png
armotyblueprint.png
equipaarmy2.png

this is my c++ code
enum class EnumSlots :uint8 {
None,
Head,
Torso,
Arms,
Legs,
PrimaryRightHand,
PrimaryLeftHand,
SecondaryRightHand,
SecondaryLeftHand,
Amulets

};
what i doing wrong

Hi,

Your Blueprints are really messy, and the lack of written explanation on what you actually want to achieve isn’t helping either.
I suggest you to post new pictures with a cleaned up graph and some explanation what is going on, what you want to do, and most importantly, what exactly your problem is.

Also, I am not sure why are you trying to create your Enum in code, you can do that in the editor.

Anyway, if you have your reasons, here is how to do it correctly:



UENUM(BlueprintType)
enum class EDoorState : uint8
{
	Opened UMETA(DisplayName = "Opened"),
	Closed UMETA(DisplayName = "Closed")
};


I have another problem is possível declare a scruct is create in editor
If possível i do ir

Hi,

I’m sure you aware, but it is really hard to understand you. You can create both Structs and Enums in the editor, just right click anywhere in the Content Browser:
7e9d2872dd6e82bc45c7bdf5636a0b3459992850.jpeg

I hope this helps.

I want declar in the code
I only know the code editor i want is the editor to code
I create e struct in my code i need pass a struct i create in editor to my code

If I understand you correctly, you want to declare a Struct in your code that can be used both in code and in the editor?



USTRUCT(BlueprintType)
struct FMyStruct
{
	GENERATED_USTRUCT_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyCategory", DisplayName = "My Test Int")
	int32 MyTestInt;

	UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "MyCategory", DisplayName = "My Test Float")
	float MyTestFloat;

	//Initializing the "MyStruct" struct
	FMyStruct()
	{
		MyTestInt = 0;
		MyTestFloat = 0.0f;
	}
};


I know create a struct in code and use in editor my problem i create a struct in editor and i want to use in code
I dont know how to do it

Okay, that seems a bit counterintuitive, I have never done something like that before! I’d consider moving the declaration to code, then use it in BP and in code without any problems.

Anyway, I found this, it might help you:
https://answers.unrealengine.com/questions/363559/can-i-access-and-change-bp-arrays-and-structs-from.html

the problem of struct i find the soluction
i create a class and create a struct inside
like this

USTRUCT(BlueprintType)
struct Finventoryslot : public FTableRowBase
{
GENERATED_BODY()

public:

UPROPERTY(EditAnywhere, BlueprintReadWrite)
	TSubclassOf<class AMasterItem> itemClass;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
	int32 Amount;

};

i only can equip my char with weapons
what i want is put char equip with amory like shield, helmet gloves
this is my link https://drive.google.com/open?id=0B11O6ZMrJmMORkw1bWRQZmd2RFk
what i doing wrong