Game Development Reference
In-Depth Information
can execute SetMaterial , make its Target the same mesh that was created via Add Static
Mesh , and set its Material to aBlockMaterial ; the material changes every time the
chooseRandomMaterial event gets called.
Finally, you can use SetRelativeLocation of the billboard point that is responsible for that
row to another position on the y axis, using the Make Vector and Add Int(+) nodes to
add 75 units every time as a spacing between every two created blocks:
Now, if you check the project files, you will find that the only difference is that there are
five functions called addRow , and each of them uses a different billboard as a starting
point to add the blocks. Now, if you run the version you made or the one within the pro-
ject files, you will be able to see the generated blocks, and each time you stop and run the
game, you will get a completely different color variation of the blocks.
There is one last thing to completely finish this blueprint. As you might have noticed, this
blueprint contains the camera in its components. This means it should be the one that
holds the functionality of setting this camera to be the rendering camera. So, in Even Be-
gin Play , this functionality will be fired when the level starts. You need to connect the the
Set View Target With Blend node that will set the camera to the Target camera, and you
need to connect Get Player Controller (player 0 is the player number 1) to the Target
socket. This blueprint refers to New View Target . Finally, you need to call the initial-
izeTheBlocks custom event, which will call all the other functions.
Search WWH ::




Custom Search