how would you go about getting how many, of a certain item, you have in your inventory, from a new blueprint.
Announcement
Collapse
No announcement yet.
Action RPG Inventory System
Collapse
X
-
Originally posted by Rotahn View Posthow would you go about getting how many, of a certain item, you have in your inventory, from a new blueprint.Last edited by OverRated_AU; 05-02-2016, 12:32 AM.
Comment
-
Originally posted by zerosum0x0 View PostCode:APlayerController* PlayerController = Cast<APlayerController>(GetController()); if (PlayerController) { const ULocalPlayer* LocalPlayer = PlayerController->GetLocalPlayer(); if (LocalPlayer && LocalPlayer->ViewportClient) { FViewport* Viewport = LocalPlayer->ViewportClient->Viewport; if (Viewport) { FVector2D ViewportSize; LocalPlayer->ViewportClient->GetViewportSize(ViewportSize); const int32 X = static_cast<int32>(ViewportSize.X * 0.5f); const int32 Y = static_cast<int32>(ViewportSize.Y * 0.5f); Viewport->SetMouse(X, Y); } } }
Comment
-
Originally posted by Ziven View Postcould you help me set this up in blueprints please?
Then you divide the X and Y screen sizes by 2 to get the center and set the mouse cursor to that new value.
Now when you are switching back to UI mode you can just call this logic to reset the cursor to the center.
This is actually a great learning exercise to figure out on your own. Development is all about learning and breaking down those brick walls that block your progress.\\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
-
[MENTION=39476]Pirate[/MENTION] One thing I've noticed has been a lot of work has been adding variables to the Inventory Item structure, mainly because things have to be linked up in all the spots where you use the break link and immediately make the link (usually to update amount, it seems). But I think I found an easy way to handle this: Rather than remaking the links, you can use "Set members in InventoryItem", then while that node is selected, you can (in the details panel) choose which items you want updated, and just plug things in accordingly. Just a thought, but it might help if someone wanted to add more stats and minimize the follow-up work.
Comment
-
Originally posted by GageCornelius View Post[MENTION=39476]Pirate[/MENTION] One thing I've noticed has been a lot of work has been adding variables to the Inventory Item structure, mainly because things have to be linked up in all the spots where you use the break link and immediately make the link (usually to update amount, it seems). But I think I found an easy way to handle this: Rather than remaking the links, you can use "Set members in InventoryItem", then while that node is selected, you can (in the details panel) choose which items you want updated, and just plug things in accordingly. Just a thought, but it might help if someone wanted to add more stats and minimize the follow-up work.
I'm going to put together an update which replaces all the Struct breaks with this node. I'm not sure if they had it back in 4.9 when I made the inventory and if they did I feel like a right idiot for not knowing about it sooner.
For people wanting to replace all the areas where structs are broken and made basically just open any blueprint and search for "Break InventoryItem" or "Make InventoryItem" and uncheck this blueprint only it should be easy for people to update this themselves. Same should be done with the UI Item struct as well.\\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
-
Originally posted by GageCornelius View Post[MENTION=39476]Pirate[/MENTION] One thing I've noticed has been a lot of work has been adding variables to the Inventory Item structure, mainly because things have to be linked up in all the spots where you use the break link and immediately make the link (usually to update amount, it seems). But I think I found an easy way to handle this: Rather than remaking the links, you can use "Set members in InventoryItem", then while that node is selected, you can (in the details panel) choose which items you want updated, and just plug things in accordingly. Just a thought, but it might help if someone wanted to add more stats and minimize the follow-up work.
Comment
-
Hi [MENTION=39476]Pirate[/MENTION]
I loved the Data tables and components approach in your system!!!!
About the situation: The interactive text does not works. It was not covered in the tutorial how to migrate inventory in the custom project.
Here I migrated all using Epic's standards. And everything was fine, but lacked the interactive text when I get close to objects.
Another situation: About mouse cursor conflicting with third person camera
I need to know how to configure the mouse cursor that is always on while I play. As the game a third person game, is the mouse cursor that moves and not the orbital camera.
I have to press the left mouse button to to hold my third person orbital camera, but this button is uset for shield defense.
The Ideal for my game is the mouse cursor only appears when the inventory is called by pressing the 'I' or 'E' key for example. And disappear when I press 'I' and/or 'E' key again.
And Again,
Thanks
Comment
-
Originally posted by lunyBunny View PostHi [MENTION=39476]Pirate[/MENTION]
I loved the Data tables and components approach in your system!!!!
About the situation: The interactive text does not works. It was not covered in the tutorial how to migrate inventory in the custom project.
Here I migrated all using Epic's standards. And everything was fine, but lacked the interactive text when I get close to objects.
Another situation: About mouse cursor conflicting with third person camera
I need to know how to configure the mouse cursor that is always on while I play. As the game a third person game, is the mouse cursor that moves and not the orbital camera.
I have to press the left mouse button to to hold my third person orbital camera, but this button is uset for shield defense.
The Ideal for my game is the mouse cursor only appears when the inventory is called by pressing the 'I' or 'E' key for example. And disappear when I press 'I' and/or 'E' key again.
And Again,
Thanks
Comment
-
Originally posted by OverRated_AU View PostAll this has been covered in pervious posts, and Pirate has also made a tutorial showing you how you can change the mouse cursor, you need to added the post process martiral to you character blueprint to enable the Interact text.
Sorry for the question again. As a buyer I asked the Pirate support, exclusively, by solution for my specific problem. I have not followed this thread, post per post, more or less 14 post pages, just for lack of time and realease deadline. I'll try to search it in the previous posts.
Regards
Comment
-
Originally posted by lunyBunny View PostThank you @<a href="https://forums.unrealengine.com/member.php?u=190677" target="_blank">OverRated_AU</a> For their help with the interactive text, I'll try it.
Sorry for the question again. As a buyer I asked the Pirate support, exclusively, by solution for my specific problem. I have not followed this thread, post per post, more or less 14 post pages, just for lack of time and realease deadline. I'll try to search it in the previous posts.
Regards
No worries, the Inventory is currently setup for a RPG game which will always show the mouse pointer, watch pirates Tutorial here it will help you change the mouse logic to a TPS/FPS style.
I try to help people that are new to the inventory as i know it well.
Last edited by OverRated_AU; 05-06-2016, 11:38 AM.
Comment
-
[MENTION=190677]OverRated_AU[/MENTION] thanks for posting that.
Also I will probably be releasing the update that switches all the breaks to use set members in STRUCT when 4.12 is out. I will as usual post the instructions on how to do it yourself in your own project.
When 4.12 is out I will be removing support from 4.10 on the store. 4.10 was such a bad release. 4.11 will be the new base version for updates until down the line in future versions when significant changes need to be made.
So to recap, when 4.12 is released 4.11-4.12 will be the versions available on the store. I don't plan to remove 4.11 as the base version for awhile.\\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 [MENTION=39476]Pirate[/MENTION] [MENTION=190677]OverRated_AU[/MENTION]
Your support was very appreciated.
The FPS control will be very useful in my third person game. Thanks
About interactive text
I haven't managed to make the interactive text appear when I approach the items. Yes, I added the post process in Player Character camera. The only thing that appears is the outline.
One more thing. How I change the crosshair position? Currently it is right in the middle and overlapped with player character making difficult interacting with objects.
regards
Comment
Comment