Quote:
Originally Posted by Nokowi
foreach pick in hero where "wCategory.Melee?"
hero.findchild[BaseWep,"wCategory.Melee"].field[livename].text = " "
nexteach
Here is what I have so far, but it keeps returning to the first instance where it finds a melee weapon.
Very new to programming. Is there a way to cycle to the next instance this is true?
|
When using the foreach loop, you are asking HL to look for all instances on the hero that have the tag placed within the quotes. In this case "wCategory.Melee?". To affect all of those cases you need to use 'each' within the loop like this:
Code:
foreach pick in hero where "wCategory.Melee?"
each.field[livename].text = "test"
nexteach
This line of code would change all things on your character with that tag to have the livename test.