Hi I'm trying to access the human-readable name of the upgrade when a player researches an upgrade. See attached screenshots of Trigger code and data I'm trying to get at in Data Editor. I'm currently using the "Name" field...this gives back something like "ProtossAirArmorsLevel1" after trimming off the "/Upgrade/Name" prefix. What I really want is the tooltip name (I believe) of "Protoss Air Armor Level 1". I can't seem to get at this human-readable value...I'm probably missing something simple. A little help?
Depending on the number of upgrades you are using it may be easier to simply throw in an if/then/else check. Determine what the name is through that, then set the string accordingly.
If you have a lot of upgrades you could try something clever. For the ID of each upgrade, place an underscore where a space would be. Then in your trigger, run a loop checking every character and when you find an underscore, replace it with a space.
The other thing you might be able to do is create a variable for each upgrade and attach a string to it, then reference the string when your upgrade variable is used.
I need access to *all* upgrades. I was hoping to avoid changing any data and also avoid the case statement of translating string to human-readable. It seems strange that there's no way to get at the human-readable version directly. Thanks for the info.
Sorry for the necro but I'm wondering if anyone has discovered how to do this.
I also want to do this for every upgrade in the game. It's not so bad with something like "ProtossAirArmorsLevel1" but sometimes the internal name is not the same as the standard name. For example "Adrenal Glands" is called "Zergling Attack Speed" internally.
Does anyone have a solution? or is the only way to have arrays of each upgrade and the name of each upgrade.
Thank you
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi I'm trying to access the human-readable name of the upgrade when a player researches an upgrade. See attached screenshots of Trigger code and data I'm trying to get at in Data Editor. I'm currently using the "Name" field...this gives back something like "ProtossAirArmorsLevel1" after trimming off the "/Upgrade/Name" prefix. What I really want is the tooltip name (I believe) of "Protoss Air Armor Level 1". I can't seem to get at this human-readable value...I'm probably missing something simple. A little help?
Depending on the number of upgrades you are using it may be easier to simply throw in an if/then/else check. Determine what the name is through that, then set the string accordingly.
If you have a lot of upgrades you could try something clever. For the ID of each upgrade, place an underscore where a space would be. Then in your trigger, run a loop checking every character and when you find an underscore, replace it with a space.
The other thing you might be able to do is create a variable for each upgrade and attach a string to it, then reference the string when your upgrade variable is used.
@BasharTeg: Go
I need access to *all* upgrades. I was hoping to avoid changing any data and also avoid the case statement of translating string to human-readable. It seems strange that there's no way to get at the human-readable version directly. Thanks for the info.
Sorry for the necro but I'm wondering if anyone has discovered how to do this.
I also want to do this for every upgrade in the game. It's not so bad with something like "ProtossAirArmorsLevel1" but sometimes the internal name is not the same as the standard name. For example "Adrenal Glands" is called "Zergling Attack Speed" internally.
Does anyone have a solution? or is the only way to have arrays of each upgrade and the name of each upgrade.
Thank you