Announcement

Collapse
No announcement yet.

equipment item problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    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=0B1...kw1bWRQZmd2RFk
    what i doing wrong

    Leave a comment:


  • replied
    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;
    };
    Last edited by Pedro Alves; 06-15-2017, 09:14 AM.

    Leave a comment:


  • replied
    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/que...ucts-from.html

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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?
    Code:
    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;
    	}
    };

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    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:
    Click image for larger version

Name:	EditorStructEnum.jpg
Views:	1
Size:	127.3 KB
ID:	1129506

    I hope this helps.

    Leave a comment:


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

    Leave a comment:


  • replied
    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:
    Code:
    UENUM(BlueprintType)
    enum class EDoorState : uint8
    {
    	Opened UMETA(DisplayName = "Opened"),
    	Closed UMETA(DisplayName = "Closed")
    };

    Leave a comment:


  • started a topic equipment item problem

    equipment item problem

    i cant equip my armory
    this is my bpClick image for larger version

Name:	equiparmory.png
Views:	1
Size:	289.9 KB
ID:	1221912
    Click image for larger version

Name:	armotyblueprint.png
Views:	1
Size:	244.7 KB
ID:	1221914
    Click image for larger version

Name:	equipaarmy2.png
Views:	1
Size:	314.0 KB
ID:	1221913

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


    };
    what i doing wrong
Working...
X