Announcement

Collapse
No announcement yet.

Action RPG Inventory System

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

    I add a new variable to the "InventoryItem" Struct - (if I compile and run, it works and plays great and I wont noticed any errors unless I try to cook and package it up)

    so to fix...

    1) I go into InventoryComponent and find the "Inventory" variable (which is of type "InventoryItem" Struct)

    2) then go to Details panel (for the "inventory" var) and change the type to "bool" or something so it unlinks all instances

    3) then change it back to the correct "InventoryItem" Struct type (this somehow resets everything correctly)

    4) then relink all "Inventory" variables back correctly because once you change the var type it will unlink the variable from everything it was previously linked to

    that seems to fix it...
    Last edited by wrfstudios; 07-09-2016, 06:25 PM.

    Comment


      Originally posted by wrfstudios View Post
      I add a new variable to the "InventoryItem" Struct - (if I compile and run, it works and plays great and I wont noticed any errors unless I try to cook and package it up)

      so to fix...

      1) I go into InventoryComponent and find the "Inventory" variable (which is of type "InventoryItem" Struct)

      2) then go to Details panel (for the "inventory" var) and change the type to "bool" or something so it unlinks all instances

      3) then change it back to the correct "InventoryItem" Struct type (this somehow resets everything correctly)

      4) then relink all "Inventory" variables back correctly because once you change the var type it will unlink the variable from everything it was previously linked to

      that seems to fix it...
      Thanks! I'll give that a go.

      WIP Thread

      Comment


        Originally posted by wrfstudios View Post
        I add a new variable to the "InventoryItem" Struct - (if I compile and run, it works and plays great and I wont noticed any errors unless I try to cook and package it up)

        so to fix...
        After I gave this some thought, I recalled another bit of advice that [MENTION=39476]Pirate[/MENTION] had once given (I think in a tutorial) and simply re-compiled and saved each offending function in the components. This corrected the cook errors for me without having to change the types and reconnect.

        Perhaps you might try this the next time this particular problem crops up for you.

        In future, if I make any changes to Blueprint structs, I'm just going to automatically re-compile all the functions that use them.

        WIP Thread

        Comment


          Originally posted by Rhynedahll View Post
          After I gave this some thought, I recalled another bit of advice that [MENTION=39476]Pirate[/MENTION] had once given (I think in a tutorial) and simply re-compiled and saved each offending function in the components. This corrected the cook errors for me without having to change the types and reconnect.

          Perhaps you might try this the next time this particular problem crops up for you.

          In future, if I make any changes to Blueprint structs, I'm just going to automatically re-compile all the functions that use them.
          There seems to be a few issues like this with structs in 4.12 from what I have heard.
          Best to always report the bugs you find in unreal on answerhub so that hopefully Epic is aware of them and can fix them quicker.

          I am glad that solution helped.
          \\VANGUARD INTERACTIVE

          Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
          Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
          Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

          Comment


            Hi,
            I want to use your inventory system on a mobile game projet but I don't know how and where to replace mouse input with touch input, I'm lost in all those files/directory. I added virtual joysticks and button so I can move, open inventory, interact, etc. but I can't "clic" on icons to use/equip items nor drag them.
            Any help please?

            Comment


              Originally posted by Haoris View Post
              Hi,
              I want to use your inventory system on a mobile game projet but I don't know how and where to replace mouse input with touch input, I'm lost in all those files/directory. I added virtual joysticks and button so I can move, open inventory, interact, etc. but I can't "clic" on icons to use/equip items nor drag them.
              Any help please?
              I haven't done any touch input with unreal but if you edit the UI blueprints it should be pretty straight forward to convert it from a drag and drop system with right click use to a mobile friendly one as you will only need to edit the UI files.

              Look in
              InventorySystem/UI/Blueprints
              InventorySystem/UI/Blueprints/Inventory


              If you look at the event graph you will see how the UI is calling events on the inventory for things like Move and Use. Replacing some of that logic with your games touch control logic should get you started.
              \\VANGUARD INTERACTIVE

              Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
              Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
              Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

              Comment


                Thanks for your help. I edited your "InventoryPlayerController" to use touch input but I didn't know where you called all mouse inputs. For you they are all in UI/Blueprints ( and player controller )? I will look there

                Comment


                  Wow, that was so simple. In case someone need it, all I had to do was to go to "Inventory_slot" blueprint, open "OnMouseButtonDown" function and change "Drag Key" to " Touch 1". Know I need to find how to click through the HUD canvas so I can use virtual joysticks/buttons

                  Comment


                    Hello Im trying to get this to work with my Fps Kit and I had a quick question. In the tutorial im supposed to parent mycharacterbp to the equipmentcharacter, except mycharacterbp parent option is already set to 'Soldier' and I cannot switch this option to equipment character else my scene wont work. Soldier is a C++ script. So Soldier.h is pawn, the SoldierBP has this as its parent option. How may I add the equipment character to this? ty

                    Comment


                      Im not entirely sure but I think the problem is from the camera attatch script since the camera is now attached at the wrong position near the feet:

                      {
                      Camera = ObjectInitializer.CreateDefaultSubobject<UCameraComponent>(this, TEXT("Camera"));
                      Camera->AttachParent = GetMesh();
                      Camera->AttachSocketName = FName(TEXT("camera_socket"));
                      Camera->bUsePawnControlRotation = false;
                      FPostProcessSettings & PPS = Camera->PostProcessSettings;
                      PPS.bOverride_FilmSaturation = true;
                      PPS.bOverride_SceneFringeIntensity = true;
                      PPS.bOverride_VignetteIntensity = true;
                      //PPS.bOverride_MotionBlurAmount = true;
                      //PPS.MotionBlurAmount = 0.f;

                      CameraBoom = ObjectInitializer.CreateDefaultSubobject<USpringArmComponent>(this, TEXT("CameraBoom"));
                      CameraBoom->AttachParent = GetCapsuleComponent();
                      //CameraBoom->AttachSocketName = FName(TEXT("root"));
                      //CameraBoom->bUsePawnControlRotation = true;
                      CameraBoom->TargetArmLength = 100.f;
                      CameraBoom->SocketOffset = FVector(0.f, 30.f, 80.f);

                      CameraTP = ObjectInitializer.CreateDefaultSubobject<UCameraComponent>(this, TEXT("CameraTP"));
                      CameraTP->AttachParent = CameraBoom;
                      CameraTP->bUsePawnControlRotation = false;

                      Comment


                        Nvm I figured it out lol, with Solder->EquipmentCharacter->SoldierBp the default mesh was being used from inventory system which doesn't have a camera bone. Now it works hopefully it doesnt cause any odd error in the future though

                        Comment


                          Originally posted by 7Autechre7 View Post
                          Nvm I figured it out lol, with Solder->EquipmentCharacter->SoldierBp the default mesh was being used from inventory system which doesn't have a camera bone. Now it works hopefully it doesnt cause any odd error in the future though
                          It shouldn't , it's just keeping all the equiplogic clean and separate from your other logic by having it in the EquipmentCharacter class
                          \\VANGUARD INTERACTIVE

                          Marketplace - Action RPG Inventory System | Multiplayer TopDown Kit | Advanced Social System
                          Multiplayer TopDown Kit Tutorials - Merging The Action RPG Inventory System | Removing the Fog of War
                          Action RPG Inventory Tutorials - Merging Into Your Project | Adding New Items | FPS Controls w/ UI Mode Toggle

                          Comment


                            Be pretty interested in getting this. But just a question I got.

                            I've got myself a sidescroller (3d) version. Is it possible to open the container when in proximity to it instead of having to look at it? So > character near container > hold E to open container. Obviously this would be done with a box collision but i'm wondering if its an easy thing to switch over and do?

                            anyway look forward to your answer and thanks!
                            Just added our project to DBIndie. 17/07/16

                            Comment


                              Hi,
                              My windows disappear when I drag them. I can move them but once released, they disappear.

                              Comment


                                Hi Pirate,

                                I moved the RPG Inventory and Top Down Kit assets into my project. Thank you for the video on that! I did have one error I thought you might have some thoughts on. I'm getting the error messages off the world actor "Item not found in item list" and "Item has no world Mesh". It's being run in the construction script so the error is going all the time when I'm in the folder with the world actor. When I look at the imported items they have ID's, and the ID's are on the ItemList. It seems like it should all be working. Any thoughts on what that might be?

                                Thanks!

                                Comment

                                Working...
                                X