Is there a better way of achieving this?

I need help achieving a system that compares a tag from a component every time the linecast is fired.

Thank you so much in advance.

1 Like

If it’s always going to be of length 1, then you can

otherwise it’s what you have :slight_smile:

A better way would be a custom component of type “upgrade” which it would hold the needed information directly.

Depending on the needs inherited from scene component, actor component, static / skeletal mesh component.

Then you could directly either call it’s interface → get upgrade or cast to it and call a function to get the upgrade.



In this way you could also embed and later information about the specific upgrade cost, it’s effects (Probably as a struct inside of the upgrade) or at least keep an ID to link it to a datatable with the further info.

Wow awesome! Thank you so much!

1 Like

Tried this too and also works reallly well. Thank you so much for helping me!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.