rdInst Tutorial 6 – Working with Randomization
Last Updated: 19th December 2022
Tutorial created using rdInst version 1.00
Another tool built into rdInst is a Randomization system. The settings used to make the Randomization are built into the rdActors instList. These Randomizations are applied when the instances are being created.
Tutorial 5 has already touched on Randomization, that uses a simple mode of the rdActor to choose only one of the Folders of actors contained.
This tutorial will use the other type of Randomization to slightly alter the location/rotation and visibility of the child actors to give a unique feel.
Step 1. Create A Blueprint and add StaticMeshes
Follow the first step of Tutorial 5, creating two Folders and two StaticMeshes, making sure they are “HiddenInGame”:
Step 2. Create some Randomization Settings
We can set the Randomization settings by adding an “rdRandomizationAssetUserData” Struct in the StaticMeshes AssetUserData Array. Add one, then expand it out until the settings are showing, then make them look like the below image:
Do the same for the other mesh too (you can copy/paste that section).
Step 3. Set the ActorMode
Now from the Blueprint Editor, Change the ActorMode to Randomize if it’s not already (like in Tutorial 2)
Step 4. Edit the BeginPlay Event
Now Edit the BeginPlay Event, to the same as we made in Tutorial 5, to add the Instances:
Step 5. Done
Now when you play your level, the two actors will shift/rotate/scale a little and sometimes will hide.
To see it more in action, you can add a “randomize” every few seconds, change the Tick duration of the Blueprint (from the Class Defaults) to 2.0 seconds