It’s really just all about setting up the InventoryInterface and overriding the InteractableInterfaces OnUsed() function to let the player load the Inventory of an actor as a container.
I can provide you with a merged project for 4.14 that has the zombies setup with loot. It’s basically just duplicating the work done in the existing container code in a character class.
What I did for the demo in the merged project was create a child class of **BaseCharacter **called LootableCharacter
*(This example is just for the Zombie which doesn’t use EquipmentCharacter. So it’s only using the normal **InventoryComponent **not the EquipmentInventoryComponent, but it’s easy enough after these steps to set this up how you want if your NPC’s wear items.) *
LootableCharacter Class]
1.) In the **LootableCharacter **class settings you will want to add the **InventoryInterface **(It already inherits the Interactable Interface from the BaseCharacter class)
Zombie Class]
1.) **Reparent **the **Zombie **to be a child of the new **LootableCharacter **class.
Now your zombies will randomize a basic inventory based on the supplied loot list (just like the Loot_Actor examples do).
The OnUsed() logic only allows us to loot them when they are dead.
This is just one way of many to implement lootable characters with the inventory system.
You can look at the Tandy/Muppet NPC’s in the ARPGIS demo if you also want some different items on how to supply loadouts to NPC’s that can use EquipmentInventoryComponents and wear the items.
*Feel free to get creative and design it in a way that works best for your game. It really is just as simple as setting up the **InventoryInterface **and overriding the **InteractableInterfaces OnUsed() *function.
@Pirate - What steps do you have to take to get the system working with your own map?
I added a Navmesh Bounds Volume and the Zombies walk around properly and attack me … but the player does not move when you click. I am using a standard map with a landscape … is there something wrong with this setup?
EDIT: I hate it when I do this … I just had to set the correct collision type on the landscape and it worked. 8-}
Yes haha no worries. It’s posted on the first post how to set it up. Just set anything to the floor collision type if you want it to register a move click.
Not sure why, but when I convert the project to 4.14 everything starts to move in “slow-motion” as in character, npc’s and even things like doors opening or particles.
I’ve added this approach to setup a vendor. Which seems to work, but from time to time there is a strange error related to GetRandomItems and Initialization. Sometimes no problem, sometimes this error. I set min items 8, max 32, inventory size 32, row size 8.
This is an inventory issue and not mptdk
But just Make sure the max items isn’t more than the number of items in the loot list. Feel free to alao change the get random item’s code. It’s just demoing one way of populating the Inventory container.
Hi! I have a question about re-implementing jumping, but first I’d like to share today’s work:
I’ve preserved click to move functionality and added some choppy WASD movement… I plan on making the character’s turning smooth later on. In addition, I added simple camera zooming and rotation, as well as the ability to switch into a first person camera when you’re zoomed in past a certain point.
So my question is: what’s the correct (or a working) way to go about adding jumping to this kit? As the stock “Jump” functions don’t… seem… to work right, I tried to implement it by adding impulse to my character (or more accurately, the TD pawn.) For your amusement, here are three videos of how that turned out :rolleyes:
[SPOILER]
[/SPOILER]
EDIT: after setting this problem aside for a moment I decided to revisit FPS controls while in first person camera mode. I’m wondering: is the character/pawn setup inherited as a necessity for click-to-move functionality a major obstacle in re-implementing FPS controls in first-person mode? I’ve added FPS controls to TP templates before, but not with this kit’s player/pawn dichotomy–although it is perfectly suited for other structural facets of my particular project, I’m just wondering if I need to sacrifice click-to-move in order to achieve FPS controls when necessary. I’d be willing to do that if that were the tradeoff.
Yes the whole pawn possession logic is so that the click to move pathfinding works over the network. If you were wanting to remove click to move and just have normal controls then I would strongly advise removing all the pawn possession logic and just having a normal type character setup. This of course will not change the click to interact logic and is simply just for the click to move.
There are some earlier posts in this thread that go over how one would achieve removing the click to move logic and pawn possession. I would strongly recommend backing up your project first in case things go haywire.
Left a comment on the youtube channel. But I’ll post it here as well.
When using your Action RPG Inventory system merger video with the tutorial here. I don’t have “Get Player Inventory Component”, or the “Get Inventory Manager Component”. The latter is only an “add Inventory Manager Component” and is showing up as a custom class. Rather than the ‘get’ version. (I’m up to 4:59) on the tutorial.
So I made a new level. Added Nav Mesh volume, and the floor preset. I got a “Bad Size” warning. When I lowered the Navmesh to be on the same size as the floor itself, rather than as a box, I still couldn’t move. And all the trouble shooting things say that you can’t have an object in a collision box.
As shown on the first page. The system needs a way to tell if you are clicking a movable area or not. Follow the instructions below and that will solve you issue with the move clicks not registering in your new level.
Other Info:
If you are creating a new map and your player does not move it’s because the pathfinding used for click to move is not setup.
Add a Nav mesh volume and make sure to build navigation paths in the editor whenever it is altered.
Set your floor mesh/terrain to the “Floor“ collision pre-set.
I did that (made the new level; added Nav Mesh Volume, Added ‘Floor’ Collision Pre-Set, Hit Build.) The character get’s booted off the level, and the icon for Player Start states “Bad Size”. I looked it up online, and apparently the game engine won’t allow a character to be inside a collision box (when looking up for the reason behind the ‘Bad Size’ Error.). I get rid of Collision ‘Floor’, no problems, but I can’t move. I have Collision ‘Floor’, my player can move but is off the level and falls downwards.
Bad Size normally means your Player Start is clipping through the floor or other object … move it up and then hit the “End” to drop it to the floor. If you still get Bad Size just move it a few units off the floor.
@Nemrog if that doesn’t fix it drop us a support email so i can help you quicker. I don’t always get forum alerts so i can provide a quicker response through email.
I did that. But it was still there even I’m hundreds of units off the floor. If my character is in the Nav Mesh Volumes box, then I can’t do anything but get booted. If I’m out of it, I’m in the level but it won’t work (well that and I really don’t like the thought of starting a game by falling hundreds of units per level.). And this is an issue I don’t have with other tool kits as of now.
Getting bad size error on playerstart - Community & Industry Discussion - Epic Developer Community Forums ; Says you get that type of error when in a collission box, and the Nav Mesh Volume I had was set up like it is in the demo game (a massive level spanning box with Collision). But yes, moving my character start capsule a few units up was the first thing I tried. Thank you for the tip though (and for future readers, moving a capsule up a few units is the more common fix for that problem if you are getting a Bad Size error. For some reason, mine’s still continuing past that. )
I’ll send you an email later. And I’ll make a quick unlisted youtube vid so you can see everything on my computer’s end.
If in the email you can send me a link to the project I can take a look. It’s really weird behavior happening. I didn’t create the nav mesh so honestly all the MP TopDownKit is looking for is the floor channel on collision so that it can register the click ray cast.
Is your floor an asset you created in a 3d package? (Maybe it’s collision volumes are huge and in the asset viewer in unreal you need to tweak the collision volume for the mesh) Or is it simply a box stretched into a floor like the ue4 demo levels.