Easy Pickup System for Unreal Engine
A downloadable tool
This Plugin for Unreal Engine 5 lets you create Pickups in a fast and simple way.
Easy Pickups Documentation / Starting guide
⦁ Setup:
After downloading and extracting the Folder into ...\Engine\Plugins open your Project and go to Edit → Plugins and enable „EasyPickups“.
Now open your Character – For me it is Bp_ThirdPersonCharacter – and add the component „AC Pickupmanager“ in the top left corner. On the right side you can specify the icon to be shown when the Player is able to pick up the Actor. You can also toggle if Pickups shoud be picked up automatically or manually.
Now add a Event / Function for interaction. In my case this will be the Letter „E“ but you can choose anything. Add the Following Blueprint-Code for the Pickup System to work.
It will call an Event Dispatcher from the Pickupmanager called „On Pickup Interacted With“.
Thats it for setup. No we will look at Pickups, how they work and how you can make your Own.
2. Pickups:
All Pickups are derived from „BP_PickupActor“, so when creating a Pickup blueprint, make sure that it is derived from „BP_PickupActor“.
After opening the Blueprint, on the right side there is the „Pickup Data“ wich contains the relevant Information about the Pickup. It contains Things such as Name, Mesh, If a Interaction Widget should be displayed, in what radius the Pikup can be picked up, if the Pickup should be destroyed afer being interacted with, the delay before it will be destroyed once it has been interacted with, if it respawns and how long respawning takes.
I set up my test Pickup like this. Play around with the values and Parameters. If you want more information about something haver over it to read a Tooltop explaining what it does.
Now comes the Important part. When a Pickup is picked up, we want something to happen and we want to influence what happens. This is all done by Overrinding the „OnInteract“ Function. This Function will be called every time your Pickup is interacted with, this is where your code goes.
For my test Pickup I will simply print „Hello World“ when it is picked up.
Now our Pickup is complete and we can put it into our Level.
If we now walk up to it, we shoud see the Icon specified in the „AC_Pickupmanager“ and the Name of our Pickup displayed at the Botton of the screen. WARNING: This will only show if the box „Show Interaction Icon?“ is ticked.
3. Additional info:
When a Pickup does not appear after you picked it up and left the game, it is because the Pickup is Saved and will be destroyed if it has been picked up before. During testing this may be annoying, so I suggest to add somethin like this code below, wich deletes the SaveGame responsible for checking if a Pickup as already been Picked up or not. The Function is called „Delete Pickup Save File“.
If the Pickup respawns eventhough it has already been Interacted with, it may be because the Pickup is set to Respawn. Respawning Pickups allways spawn if they have been Interacted with before or not.
Credits for included test assets:
- Nicolae Berbece at https://opengameart.org/users/xelu
- codeinfernogames at http://codeinferno.com/
Status | Released |
Category | Tool |
Author | Dodorex |
Tags | Game engine, pickup, plugin, Unreal Engine |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.