How can I set an attribute of several objects at once? [solved]

Just for some context: I already know how to generate a list of the objects, which I wish to change the attribute of. I use the following: <foreach (, FilterByType(ScopeVisible(), "Enemy")) { Do something,}>

I simple am unsure about how to do the something to each item in the list.

Any help would be greatly appreciated.

Edit: Sorry people, I finally managed to wrap my head around it.


I simple am unsure about how to do the something to each item in the list.

Just like you said. If you want to set some attribute to the same value for each item, you'd do

foreach (enemy, FilterByType(ScopeVisible(), "Enemy")) {
  enemy.someattribute = "value"
}

This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums