Modify MultiUse Radial Menu
Written by Mezzow - Original Post
Hi, in this tutorial i will try to give you an overview how you can add a custom MultiUse entry to your mod structure(should also work for any other actor).
I will cover only the basics in this tutorial but i am planning to create more example blueprints with comments that cover some more advanced use cases of the multiuse functions and ideally other topics too, if you guys like this one.
You can download the example asset with all the comments on github here: GitHub - ADKTutorials If you download as zip extract to ARKDevKit\Projects\ShooterGame\Content\Mods and remove the "-master" tag from the "ADKTutorials" folder. The path to the asset should look like this: ARKDevKit\Projects\ShooterGame\Content\Mods\ADKTutorials\MultiUse\TestBox_MU_Basic.uasset
I am going to assume you know how to setup a mod and custom structure and have already done both.
- Open up the blueprint of your custom structure.
- In the "Defaults" panel, look for the flag "Blueprint Multi Use Entries" and set it to true:
- Go to the "Graph" tab, right-click on "BPTry MultiUse" and select "Implement function". Do the same thing again for "BPGet Multi Use Entries":
- Now you are set to add your own entry to the menu through those functions. I won't cover every step here, instead i created the basic example blueprint with extensive comments that hopefully explains itself:
"BPGet Multi Use Entries" function
"BPTry Multi Use" function
NOTE: Always set "Return Value" to true on the Return node(at least for the default execution path) or else options that trigger UI Widgets like pin codes and custom names won't work anymore!
"BPClient Do Multi Use" Event on the Event Graph (Optional)
- "BPGet Multi Use Entries" is executed on the client as soon as a player is near enough to interact and targets the structure. It passes the default multiuse entries of the actor as an array, you can then modifiy it within the function and return back the modified array. This returned array is then used to determine the menu entries that get displayed.
- "BPTry Multi Use" is executed on the server when a player activates a menu entry. The "Use Index" indicates which multiuse entry was activated. If the "Return Value" bool is set to true in the return node the "BPClient Do Multiuse" Event will be fired on the client.
- "BPClient Do Multi Use" event is fired on the activating client after "BPTry Multi Use". An example for when you can use this is if you want to display notifications for the interacting player only.