Easier Way to access Hero Icon Paths?

inevit4ble

Well-Known Member
Reaction score
38
Hi Every1,

I want to put the hero icons of the players into the multiboard system I'm running.

As you know the icon path is required to load the icon. So I figured that a String array can be loaded for the players with the icon path of each hero they choose.
But do I have to do a whole bunch If/Then/Else checks to which hero they have chosen or can I access the path from the unit itself?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
you could create a variable with a specific array, then whenever a person chooses a hero you set that variable to the correct path according to which hero they chose with the array their player number, then load that on the leaderboard, seems it would be easier that way :/
 

inevit4ble

Well-Known Member
Reaction score
38
you mean load a variable filled with all the icon paths of the heroes then get the path relevant to the hero picks?

Thats pretty much the same as if I you my original method but cleaner, so it would be better.

its not quite what I was looking for but I think this is what I have to do. I doubt I can access the icon paths without setting them to a variable
 

whoopwhoop

Cool Member
Reaction score
1
If your heroes have the same name as in the icon path you can make something like this
Trigger:
  • Set HeroPath = (ReplaceableTextures\CommandButtons\BTN + ((String((Unit-type of (Triggering unit)))) + .blp))


Although I doubt they do.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
But do I have to do a whole bunch If/Then/Else checks to which hero they have chosen or can I access the path from the unit itself?
If you instead save the strings into a hashtable, using the unit-type as the key, then you can just load the string from the key of the unit-type of (Triggering unit) or whatever, instead of having a lot of if/then/else functions.
 

inevit4ble

Well-Known Member
Reaction score
38
Ye that would be a good option as well but the same as loading a variable, although it would be easier to use the unit's key
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top