- Joined
- Jan 14, 2008
- Messages
- 366
take this trigger as example
E:
- unit of unit type "axeman" is trained
C:
-
A:
- get unit of unittype "houseX" within 1000 range of triggering unit
and do action:
set variableX [1] = variableX[1] + 1
now lets assume i have a shitload of houses. is there no way to have a function determine wich variable corresponds to wich house?
i dont want to have one million "if/then"else's" ...
so how can i assign variableX to house1
and variableXX to house2 and so on ... ???
is there no way to recall a variable by converting its name to a string?
why not? that would be such an useful function.
any help or input appreciate.
E:
- unit of unit type "axeman" is trained
C:
-
A:
- get unit of unittype "houseX" within 1000 range of triggering unit
and do action:
set variableX [1] = variableX[1] + 1
now lets assume i have a shitload of houses. is there no way to have a function determine wich variable corresponds to wich house?
i dont want to have one million "if/then"else's" ...
so how can i assign variableX to house1
and variableXX to house2 and so on ... ???
is there no way to recall a variable by converting its name to a string?
why not? that would be such an useful function.
any help or input appreciate.