• 0

    posted a message on Dynamically Modifiying Unit Data in Game

    Hi everyone,

    I'm very new to SC2 mapping so I apologize in advance for any possible ignorance.

    I am curious if anyone can put me in the right path to be able to modify unit data dynamically in game.

    Things I mean are values like radius, inner radius, unit tint, and just about any other field that are editable when making/modifiying an existing unit in the editor, except modifiable during an actual game. I've looked into Upgrades which allow all of that, except the only issue is is that they are globalonce "researched" they affect all units of that type, rather than just a single one. So naturally I looked into behaviours/attributes but I wasn't able to find any places to modify those fields (they seem mostly concerned with combat related values like damage, health, shield regen, etc.).

    The idea behind this is that I'd like to be able to create random variation among similar units, like say some wild zerglings are bigger than others, but also that each variation is accessable at anytime (like each unit would be assigned a factor of 1-10 for radius which would correlate to some value that radius actually can be), especially if there would be a save system.

    The idea I had was simply having invisible "abilities" that each had a rank (say 10 "levels" for inner radius) and some trigger down the road would assign a random value to the level of that ability to create the variation (this is a trigger, set ability level I believe). Most importantly, such an implementation would allow for easy reading of saved data to re-construct the saved unit and its particular variation. Of course I couldn't find a way to make such an ability, but perhaps it's just out of my inexperience.

    In total: -a way to modify the values of a unit's data fields in game -works only on a single instance of the unit (like set property action but includes many more values to set) -the level of modification is retrievable in some way (for a save/load system)

    I would appreciate any help, thanks!

    Posted in: Data
  • To post a comment, please or register a new account.