Book Image

Learning C++ by creating games with UE4

By : William Sherif
Book Image

Learning C++ by creating games with UE4

By: William Sherif

Overview of this book

Table of Contents (19 chapters)
Learning C++ by Creating Games with UE4
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Variables and Memory
Index

Creating other spells


By playing around with particle systems, you can create a variety of different spells that do different effects.

The fire spell

You can easily create a fire variant of our blizzard spell by changing the color of the particle system to red:

The out val of the color changed to red

Exercises

Try the following exercises:

  1. Lightning spell: Create a lightning spell by using the beam particle. Follow Zak's tutorial for an example of how beams are created and shot in a direction, at https://www.youtube.com/watch?v=ywd3lFOuMV8&list=PLZlv_N0_O1gYDLyB3LVfjYIcbBe8NqR8t&index=7.

  2. Forcefield spell: A forcefield will deflect attacks. It is essential for any player. Suggested implementation: Derive a subclass of ASpell called ASpellForceField. Add a bounding sphere to the class, and use that in the ASpellForceField::Tick() function to push the monsters out.

What's next? I would highly recommend that you expand on our little game here. Here are some ideas for expansion:

  • Create more environments...