Until now if you didn’t like the colors you would have to run the level again, in this post we will create a button to randomize the car colors.
The approach is to create a keyboard button node and when that is pressed, execute the same flow group as is run on level create.
Open car 1 in unit editor
1. Create a “Keyboard Button” node (Input- Keyboard Button)
2. From the list select “1” as the Button Name
3. Hook the “Pressed” of “Keyboard Button” to the “In” of “Set Material Variable”
Once this is working as expected you can replicate this flow into the other cars by copying the entire flow and replacing the existing flow in the other car units.