rdBuildBuddy Tutorial 5 – Use BuildInfo in Blocks
Last Updated: 8th January 2023
Another powerful feature of rdBuildBuddy is the ability to pass through construction information to the object you’re creating – as long as it supports the PositionInfo structure. rdInst and rdBPtools objects support this out of the box, and you can subclass the DropIn and derive your own routines to use the information.
The information that is passed through is the level, row and column, the total of each of those, a Random Seed and a 64bit number which you can use for storing information such as lights on, tv on, door open etc.
In this tutorial we are going to use this information to build a Room NumberPlate for our Hotels created in Tutorial 4. The assets are again, from the Paradise Motel project on the marketplace.
Step 1. Start with the Motel Rooms from Tutorial 4.
This example uses rdInst again and the Motel Frontage from the previous tutorial, so either load that up or recreate it.
Step 2. Build the NumberPlate Blueprint
Download This Blueprint (4.25-5.1) and unzip to your projects Content Folder (It uses the Gold Material that comes with rdBuildBuddy). This is the basic Blueprint that shows A simple Plane with a Text Component on top. A more elegant solution is to use meshes with digits on them (Paradise Motel has some nice ones which the other Hotel Demos in the videos I’ve made use).
The Blueprint itself is very simple, just a function called SetRoomNumber and a Construction script:
In the Default Settings for the class, it’s ActorMode is set to “Build” – and the Build Event is derived with a call to “SetRoomNumber”
Step 3. Add to the Motel Frontage Blueprint
Now add two of these on the wall beside each external door in your Motel Frontage Blueprint. On the second one, set the “Num Offset” to 1 in the Child Actor Templates Default section.
Add them as Child Components, specifying BP_RoomNumberPlate as the Child Actor Class.
Step 4. Done.
That’s it, you should now see each room’s number plate correctly show the room number.
You can take this system further. The PositionInfo data also contains Random Seed values and a 64 bit value you can set to anything – such as states of items in the room e.g. lights. All you need to do is SubClass one of the Build DropIns and Derive the “MakePositionInfo” function to whatever you want.