Fully Functional Networked Inventory Tutorial System

Thank you for this amazing tutorial. But I have one big question. In your second tutorial video, about the 8-9 minute you add something like “Cast to MyCharacter” . Whats this ? And where can I get this ? Sorry I am very new to the engine and I am using these tutorials to learn + I am translating the BP simultan to C++. Can anybody help me ?

Cast to MyCharacter is basically just casting it to your player character to make sure it is indeed of that type so you can grab variables that are only available to that class. In blueprints just start typing in “Cast to” and it should bring up the available options to cast it to. In this case he is casting to “MyCharacter” which is the name of the blueprint character in the base game types that can be created through the editor for your project.

Basically it is casting the input object/actor to another class and allows you access to its variables. It is a way of checking to see if the object/actor is a subclass or class of the specified type and if so allow you to access its functions and/or properties that are available to be called.

For C++ the call to cast would be Cast<AActor>(Variable) if my memory is correct to cast and see if Variable is an Actor for example. There should be tutorials around with more details on casting.

I hope I explained it well and if anyone else can elaborate on it if needed that would be great. I hope this helps.

Thank you very much for your help. Now I got another problem. I am using the inventory system with the top down view template. The “old” bars od the original tutorial were working fine. After the switch to the new one nothing is working anymore. I think one big problem is that I need to cast to MyController instead of MyCharacter. But MyController isnt even castable… why ever :slight_smile: . Maybe anyone can help me ? Or can show me how something like this should be build in C++. Maybe its better. I also noticed that MyCharacter is ignoring the Input methodes, these are just working inside MyController which isnt castable .

Edit: It seems there is something wrong with the “IsInInputMode”.
aa74635b7f6da3aea670635897f511ad6c458b24.jpeg

Edit: Got it working now. “MyController” just blocked all the inputs by default. So you can ignore my question now, but I got another one :slight_smile: . After using the textures, everything is bigger than normal. Where can I scale the textures dynamically ? I mean dynamically after changing the resolution ?

Hello, Can someone please help me? After doing part 7 my pressed textures are messed up. For example if i put my mouse over the top left box in the inventory the third box from the left will highlight.Also the same thing happens for my Hotbars. The pressed texture for them are placed far from where they should be.I have been trying for two days now to fix this :/. Can you please tell me how to fix this?I really want to get my inventory working so i can continue to follow these amazing tutorials.

HotBars.png

HotBars.png

For some reason my mouse did not show up in the screenshots. But its about 1 square to the left of the highlight texture in both pictures.

Anyone who actually gotten this to work?

I’m on my second attempt now, from scratch to trying to get this working…

Everything is going fine with hotbar highlighting and working after part 5… But then I completed part 6… Now I can’t get it to highlight the Hotbars and inventory, like you show in the end of part 6…

Both my attempts failed at part 6…

I even tried just keep going with the tutorials and see if you made some changes that would fix it… But I noticed in Part 7 after you have organized the blueprint, that at 9:35 on youtube in Draw Inventory. I think you have forgotten to add this in the tutorial… There are no mention of it in earlier videos…

Screenshot of my DrawInventory:
5c1756b349f5ae344cdc947a420c51807995f921.jpeg

I’ve Tried organize and comment it like in the tutorial… As you can see I’m missing the first/second part of “Draw Inventory Background” and perhaps more?

I have a weird trouble too. It works for me but when i close project and open again, i have an error message asking to compile hud blueprint. Then it works again and didn’t find why yet.

In part 7 all you do is add the stuff in the red comment areas. Everything else was done in part 6.

Did you ever have a problem where your Button pressed textures would be somewhere other then your mouse location?

Hello firezown, as you have the same distance trouble it maybe your y array (like 50.5 if i remember right) or another y distance you’ve set wrong. In hope it is that. And yes i had some log messages when clicking outside too but i consider this tutorial as a great first step and now i go by myself to set something from what savaikun and others learned me.

Inventory Array Increaser X is the one set to 50.5. And when i change the value it does not help ;/. Should Inventory Array Increaser Y be set to something other then 0.0?

This tutorial is seriously broken, has anybody actually gotten this working? I’ve gone through the series twice now.

It was all working fine until he had us skip part 5.Then everything messed up ;/

Does anyone know how i can fix this?

Firezown, yes inventory array increaser Y is 50.5 too but as other people say sadly this is not the only trouble. I think it comes from the changes savaikun made from Creelin suggestions. Something somewhere does not fit. Just have to find what…

Ok, But you said that yours works. How did you fix your problem?

Only trouble i had was that on each new start i had to compile my blueprint to have it working. And then there were the troubles known like the diseappering things. i did a few changes like :

and i supressed the branch where you can’t click on same place but i don’t remember where it was. I’ll check if you dont 'find. Then it stays the click in window trouble which would be a “put on the floor or destroy” choice for me and the swap item in inventory because when you put one on another atm it dissapears ^^ so some more things to learn…

Something i forgot. Maybe it is just your trouble : do you try in editor or in full screen. If you have not yet : Try to do both to see the difference.

I finally got this thing working … nearly :slight_smile: . Is there a possibility to export BP for sending peaple these ?

Hello,
Happy for you to know you suceeded ! grtz ! ^^ all files are in your unreal projects as .uasset files but i don’t know if passing only the blueprint is ok even if there is no stuff in. (Why there is a migrate function which send all attached files…) maybe trying to simulate a migrate and list all what the engine says what will be migrate and then add all the .uasset listed can work…

You can create a new blueprint project.Then go to the project you have your inventory in. Rightclick the blueprint for the hud and say migrate. Then set the file location to the Content folder of your new project.Then go to MyDocuments/Unreal Project. Then copy the whole folder of the new project you sent the files to. And then right click it and compress it. Then you can put it on a website for others to download.

I still have not gotten this to work. Does anyone know how to fix the button pressed textures? They are show up 2 boxes away from my mouse.