How to Select What Effect a Collision Has?

Hello! I am a little stuck. Imagine an airplane game where you can shoot, get shot, or collect a power-up. If your airplane gets shot (enemy projectile collides with your airplane’s collision sphere), your airplane should take damage. But, if your airplane’s collision sphere collides with a power-up, your airplane should repair damage, receive a speed boost, damage boost, or etc…

What is the best system for this sort of thing? I have thought of a couple solutions, but they either seem inefficient or would require a revamp of all my objects. Is there a way to make a super class of all my game’s entities and then override the “effect function”?

You’ll need to learn about two things here:

Extend the Collision Presets of any object to get an idea about the built-in collision channels (and read that page, it’s good).

A Power-Up should not have any blocking collision at all, but an overlap (and an overlap event handler to apply the power-up). Projectiles on the other hand often use the Projectile-Preset and apply damage on hit/overlap.

There is a power-up Content Example Project which uses a “base class” for Power-Ups and for each type it has an Child-Class which applies the specific effect. There is even an explanation of child-classes in the docs, using that power-up example: Child Blueprints