Getting per instance HISM data

In BPs that’d be a no-no. In C++ perhaps? Google confirms this exists:

GetCustomDataValueOnInstance

But I’ve never seen it done or even documented…


Besides the above:

so I need a fair amount of additional data for each mesh

The official docs state one can store 32 floats, which is not true - at least it wasn’t in 4.27. The actual number is either 16 or 18 - last time I tested it. Which is still plenty but it’s just floats.

How I do it:

  • use the Tmap with key being the index and enjoy any data type via a struct
  • never remove instances
  • instead, move them where they can’t bother you; flag its hasBeenEaten map data appropriately
  • bunny eats a carrot? That carrot now lives 5000 uus underground where no sensible bunny should go
  • to regrow it, reuse one of the eaten carrot instances that lives underground
  • at some point you’ll need to save it all - that’d be the time to trim the HISMc and repopulate the map from scratch

Think of this as of object pooling. The key is to not remove any HISM instances.


Example:

1 Like