About Get Data Table Row node

Say that we have 2 different types of bullets and each time we are shooting the gun, we are checking which one is on the chamber to be able to get quite a lot of variables of that specific bullet from the database row.

If we are shooting in full automatic mode, there will be 10-15 checks per second…

What is better for this situation?

A + Having a unique global database and struct for all the ammo, including description, names, materials, arrays and everything related to the ammo but some unrelated to the variables needed on this situation (but we will have just only one database for all the ammo)

B + HandCraft a special struct and database for this special situation where we will get the variables used only

C + A Totally Different Approach

I mean, when getting the Data Table Row, is the engine iterating anyways to all the columns even if we are getting only the ones we are using?

Which way will be the most performance optimal?

You shouldn’t check every time you shoot. You should get the values when your switch weapon/ammo and store return value in a variable. A different way of doing it would be to use data assets. Less hassle and you can get the values you need.

Thank you for this approach, I will take a look to data assets

This is awesome mate! Is actually a lot easier this way, much appreciated !

Will definitely get the magazine ammo on reload and save all the bullets types ordered by index to an array and then getting those bullets from there deleting the first one at each shot, it sounds great to me

Have just created a data asset for the magazine and it’s awesome… Easy thing to get to those variables… Will surely create the bullets this way too, data assets are amazing, thank you for contributing to my game

Will mark your answer, may we see another day, have a good one :smiley: !