Damage linked to a Day/Night cycle

Howdy y’all I could use some help cause frankly I’m not sure where to begin.

I’ve only been using unreal for a few weeks doing little tutorial games and have decided to start a larger project, a turn based rpg. I’ve found documentation and tutorials for most of what I want to do but one mechanic eludes me.

The world my game is set in has 5 moons that influence different elemental magic, and I’d like to make a day/night cycle where depending on which moon is in the sky different elemental spells or attacks get stronger or weaker.

So I need to figure out how to make a day night cycle that can account for more than one possible moon but also somehow link that to damage

I’ve already got an Enum and table with the elements and their affinities but I have no clue how to set up the day night cycle in such a way that it influences damage

Any advice would be greatly appreciated

1 Like
  • to make it straighforward: the Game Mode can store which Moon we’re dealing with. When you Deal Damage:

Query the Game Mode for its Moon Damage Multiplier :point_up_2:


  • to make it better and more organised: (it will be handy since it’s a turn-based RPG and things will quickly get out of hand!) have a look at the last pin on the above-mentioned node - Damage Type Class. Think of it as of a damage processor that can run logic without burdening the damage Dealer and the damage Receiver with stuff they do not need to worry about.

Here’s an example usage:

However, since you now know the keyword - Damage Type Class - you can look up more tutorials about it in case the stuff in the thread is not relatable.

Good luck!

Thank you!