From 255122836483453421bf4f1f1351744b5fa6972c Mon Sep 17 00:00:00 2001 From: Kyle Austad Date: Mon, 7 Oct 2024 11:57:29 -0600 Subject: [PATCH] Update Pawn - BP_BaseShip --- Pawn - BP_BaseShip.-.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Pawn - BP_BaseShip.-.md b/Pawn - BP_BaseShip.-.md index dd03244..fc4120b 100644 --- a/Pawn - BP_BaseShip.-.md +++ b/Pawn - BP_BaseShip.-.md @@ -81,10 +81,29 @@ Click on *OnPlayerMoneyChanged* and in the *Details* on the right click the plus On the *OnShipInfoChanged* dispatcher add 2 inputs. One called *BaseShipInfo* of type *Struct - S_BaseShipInformation*, and one called *MasterShipInfo* of type *Struct - S_MasterShipInfo*. + +![](https://git.crabinteractive.com/crabdev/MSSS-Documentation/raw/branch/main/Images/BP_BaseShip/4.png) + ### Nodes Once all of that is done head over to the *Event Graph* of *BP_BaseShip* and select and copy all the nodes on the main graph. If you don't need the movement system or simple zoom only select the graphs on the right of the event graph. Refer to the comments to find the movement graphs to leave behind. Either way, select the graphs needed on the right half at least and copy and paste them onto the event graph of your new pawn. Once all of that is copied over there will most likely be some errors. If you moved over the movement logic there will be errors related to specific component references. The simple zoom functionality uses references to the *Camera* and *Spring Arm* so replace those with the applicable components on your new pawn if necessary. Any references to *Capsule* in the movement logic is the root component of your pawn so replace those references if needed with a reference to the root component of your new pawn. After that is done the last error will be about a timeline in the collapsed graphs for docking and undocking. *Undock Alpha* is the output of a *Float Track* in the timeline node used to time undocking. Sometimes *timeline* nodes don't copy and paste correctly so if any remaining errors are related to *Timeline* nodes simply find that timeline node in the *BP_BaseShip* and manually copy and paste it onto the correct spot in your new pawn and replace the one throwing errors. +### Replace References + +The last thing to do is in *BPI_Shop* if you are using the included basic currency system is to change the output variable *PlayerReferenceForBinding*. So open the interface and select the *GetPlayerMoney* function and change the *PlayerReferenceForBinding* variable type from a *BP_BaseShip* ref to a reference of your new pawn. + + +![](https://git.crabinteractive.com/crabdev/MSSS-Documentation/raw/branch/main/Images/BP_BaseShip/5.png) + +Now on your pawn find the interface function *GetPlayerMoney* and double click it to open its graph. Connect your *PlayerMoney* variable to the return nodes *PlayerMoney* and then get a *Reference to Self* and plug it into the *PlayerReferenceForBinding* pin on the return node. + + +![](https://git.crabinteractive.com/crabdev/MSSS-Documentation/raw/branch/main/Images/BP_BaseShip/6.png) + +Lastly if you want the included base UI that displays basic info for the player to work you need to open *WBP_BaseUI* and re-bind the events in *Event Construct*. The two events to re-bind are highlighted in the image below. Simply drag off the *PlayerReferenceForBinding* pin of the interface function preceding them and search for *Bind on Player Money Changed* and *Bind On Ship Info Changed* and replace the existing nodes. + +![](https://git.crabinteractive.com/crabdev/MSSS-Documentation/raw/branch/main/Images/BP_BaseShip/7.png) + Now you should have a working pawn that will work flawlessly with all the systems in the stat system! \ No newline at end of file