Is there a way to set multiple global variables called for example:
name1
name2
name3
name4
and so on....
with a local variable "a" and a trigger "for each integer a"?
I mean there should be a way but when i click the variable in "set variable" trigger, it allows only for picking variable or custom script. Is there a chance for custom script like:
(CombineStrings("name",a))
to work in this case? Is the syntax ok? Im pretty lame makeshift of a programmer, but will need tones of global variables set, and copy-pasting and then changing numbers is a nightmare and as my friend said "lame". I dont want to be lame anymore :P
Google will give you lots of examples. Basically instead of creating multiple variables and adding a number to the name you just create one variable as array of a specific size, which then allows you to set the variables in a for loop by using their array index.
Ahhh arrays... yeah i heard about it, and always thought "im gonna learn what they are later, when there will be need". Seems the time has come. Thanks a lot for pointing direction :)
Is there a way to set multiple global variables called for example:
name1
name2
name3
name4
and so on....
with a local variable "a" and a trigger "for each integer a"?
I mean there should be a way but when i click the variable in "set variable" trigger, it allows only for picking variable or custom script. Is there a chance for custom script like:
(CombineStrings("name",a))
to work in this case? Is the syntax ok? Im pretty lame makeshift of a programmer, but will need tones of global variables set, and copy-pasting and then changing numbers is a nightmare and as my friend said "lame". I dont want to be lame anymore :P
Thats what arrays are for.
Google will give you lots of examples. Basically instead of creating multiple variables and adding a number to the name you just create one variable as array of a specific size, which then allows you to set the variables in a for loop by using their array index.
@Mille25: Go
Ahhh arrays... yeah i heard about it, and always thought "im gonna learn what they are later, when there will be need". Seems the time has come. Thanks a lot for pointing direction :)
You're the leader of Falrinth's The Thing development team?
You've been mapping for three years and you haven't figured out arrays?
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.
@Vicboy: Go
I wasn't aware that this was where you go to insult other map makers instead of helping them. BOY, WAS I MISLEAD!
@BasharTeg: Go
He already got his answer.
I wanted an explanation for curiosity's sake.
Member since 2010. Made the -The Thing- [Revival] game. Nostalgic of the WC3 days.