Book Image

Mastering Unreal Engine 4.X

By : Muhammad A.Moniem
Book Image

Mastering Unreal Engine 4.X

By: Muhammad A.Moniem

Overview of this book

Unreal Engine 4 has garnered a lot of attention in the gaming world because of its new and improved graphics and rendering engine, the physics simulator, particle generator, and more. This book is the ideal guide to help you leverage all these features to create state-of-the-art games that capture the eye of your audience. Inside we’ll explain advanced shaders and effects techniques and how you can implement them in your games. You’ll create custom lighting effects, use the physics simulator to add that extra edge to your games, and create customized game environments that look visually stunning using the rendering technique. You’ll find out how to use the new rendering engine efficiently, add amazing post-processing effects, and use data tables to create data-driven gameplay that is engaging and exciting. By the end of this book, you will be able to create professional games with stunning graphics using Unreal Engine 4!
Table of Contents (22 chapters)
Mastering Unreal Engine 4.X
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

Changing parameters at runtime


Sometimes a game forces you into strange situations. One of the situations I can remember in a game is when we needed to change the particle system color to match a certain color the player had collected. In such a case, it was not possible to define a color previously, and the particle system needed to be flexible enough to match the color the player already had, keeping in mind that every time the scenario is different and the player holds a different color.

Such a situation normally is not easy, but thankfully, with Unreal Engine, you can define the parameters that you might need to change at runtime. Then, changing its value is a matter of setting a new value to the tagged parameter. But how?

  1. First you need to decide which value is going to be changed, and let's say I need to change the main color of the particle system. So, you simply go to the targeted module and to the desired value, and set its Distribution value to Distribution Vector Particle Parameter...