Floating Number Particle System

Floating Number Particle System

Tags
ParticleSystem
Owner
Justin Nearing

This is a retrospective on the Floating Number Particle System described here:

Remaining Work

Fix runtime error
Blueprint Runtime Error: "Attempted to access NiagaraComponent_18 via property CallFunc_Array_Get_Item_1, but NiagaraComponent_18 is not valid (pending kill or garbage)". Node:  Set World Location Graph:  UpdateFloatingNumbers Function:  Update Floating Numbers Blueprint:  ActorTest
  • This happens when you jump on a box that has existed in the world for a long time.
  • Hypothesis: I believe its happening because I don’t have a step in the event loop to clean up the Particle System Array once the particle effect is completed.
    • NiagaraComponent_18 object is likely the 18th in the array, and is now some kind of None.
    • I think what I want is the equivalent to a dynamic array- Remove the index of any none-value Particle system objects. I’ll have to research what options are available to do this.
  • Fix:
    1. Added a step in the Event Graph after the Make FloatingNumbers step to clear all contents of the particle array on a 4 second delay. As long as the Delay amount is less than the particle lifetime amount, this won’t be an issue.

Task Goals

Follow the YouTube video on creating a floating number system using the Niagara Particle system in Unreal 5.3:
Bootstrap a project wiki on Notion.

Lessons

  • Shallow introduction to the Niagara Particle System.
  • Continue learning blueprint scripting.
  • Experiment with the advanced features of Notion as a wiki system.

Takeaways

This was a really fun, rewarding task. The original idea was to simulate the damage hit effects you see on a game like World of Warcraft.

Key Points:

The official docs are bad. Really bad.

Unreal documentation is next to non-existent. It is truly terrible. The only docs I have found are very unhelpful API class documentation that basically show you what you can already see, or promotional “What’s new in this random version of Unreal” type doc that gives a very shallow driveby for a specific feature.

Community made YouTube tutorials are great

YouTube is teeming with step-by-step tutorials ranging from absolute beginner to complex practical guide to implement some feature. It is why I chose to use a tutorial as the launch point for my Unreal project.

It was a practical, well-scoped task

This was what made it so rewarding. I was able to complete the YouTube tutorial, and then go above and beyond by changing the behavior to my specific use case.

In the tutorial, you shoot a gun and the numbers appear where the bullets strike. In my case, the numbers appear when the player controller collides with the box.

This deviation from the tutorial allowed me to do my own problem solving. I was able to solve those problems, which felt very rewarding. Look ma, I can code!