Hi, I'm trying to generate random combatants with random names. I made an array full of names in a script and can successfully pull a name from that array and set it as a variable in the Object Variables component via that script, but trying to call that name via #varstringsoldierName# in menus returns null. The variable is set properly in the inspector, it just isn't being read. This is true even if I put a Scene Object on my combatants' prefab, put the #varstring# in the name and set the Scene Object to use object variables in text codes. What am I doing wrong?
Thanks for any hep.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
For others' reference: I had some difficulty setting the Combatant name to an object variable on the Combatant itself. Instead I assigned the random name to a global variable via script (using Ork.Game.Variables.Set) when the Combatant was spawned, then set the Combatant Name to the global variable via an init event. This refreshes the random name whenever a new soldier is generated. I don't know if that's the most elegant way of doing things, but it seems to work fine.