Improving the Blueprint
When we run the game, we see that the Cylinder target changes colors upon being hit by a projectile fired from the player's gun. This is the beginning of a framework of gameplay that can be used to get enemies to respond to the player's Actions. However, you might also have noticed that the target Cylinder changes color, even when the player runs into it directly. Remember that we wanted the Cylinder target to turn red only when hit by a player projectile, and not due to any other object colliding with it. Unforeseen results like this are common whenever scripting is involved, and the best way to avoid them is to check your work by playing the game as often as possible as you are constructing it.
To fix our Blueprint ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access