Oh yeah and I added a pin to the array for types of things to hit in the Get Usable Actor function’s trace (added PhysicsBody).
I can look for ya again. Try tracing through the blueprints with breakpoints and see where it fails though.
As for this part, if you see my earlier posts and screenshots, I got rid of InventoryClass/InventoryActorBP and made it so it holds direct references to UsableActors themselves, as I find that easier to understand and work with. I don’t really remember how you were supposed to use it in the original method.
I’m not sure why it wouldn’t work in dedicated - just debug it by setting breakpoints when you test in dedicated mode and you’ll find it pretty fast.
The original tutorial is set up with two types of classes: UsableActors and InventoryActors - UsableActors are the ones that exist in the world. InventoryActors only exist to store information about a picked-up UsableActor and re-spawn one when you drop from inventory.
So to that point, all the drop functionality needs to do is: get the currently selected item (InventoryActor), spawn a UsableActor from the InventoryActor’s information (Spawn Actor From Class, plug in the actor class from InventoryActor that holds what type of UsableActor is in the inventory) at the current location and remove the InventoryActor from the array.
Just check to make sure all that’s working and that it obeys proper client/server separation in the dedicated case by setting breakpoints in the blueprint part for dropping stuff.
You’ll have to refer to the original tutorial for how to set that up - as I mentioned before I just got rid of having two separate classes for each item (that’s what those screenshots earlier in the thread show how to do), and just store the UsableActor itself.
As for why it’s not working on dedicated, try to find why the Add Item call isn’t happening on the server in dedicated mode. Is it being called on the server right? E.g., the client call then calls the server version of add item.
My suggestion is to do some of the blueprint networking tutorials to better understand how this all works, and maybe some general tutorials on blueprint.
You might also check the Unreal discord channel, and try to get more immediate help there.
These two posts detail the changes I made:
Then this one:
Basically, instead of InventoryActor holding an ActorClass, make it hold a BP_PickupActor reference.
If you still have problems add me on Steam (same name as here) and I’ll help you over chat and we can use Steam streaming so I can see your setup.