- Joined
- Jan 31, 2017
- Messages
- 12
Hello,
i want to use a building that i own to upgrade the units of another player.
I can get it worked but when i want to have 100 upgrades, i have to write the same IF/THEN/ELSE statement 100 times. This is tedious and i think its not the correct way, and once i have to change something in there, i have to change it 100 times...
I want a "global/general" thing that should work for 100 upgrades... so that once i click on the Research button, it should upgrade the unit once.
I have no experience with variables so far. I assume i need a variable for such global method/loop ?
I am still trying though...
How would you do that?
I click on my blacksmith.
I click on the upgrade.
The allied player's unit gets upgraded by 1.
This is what i want. And it should not give 100 upgrades at once... This is my problem right now...
I use this currently:
For each (Integer A) from 0 to 100, do (Actions)
i want to use a building that i own to upgrade the units of another player.
I can get it worked but when i want to have 100 upgrades, i have to write the same IF/THEN/ELSE statement 100 times. This is tedious and i think its not the correct way, and once i have to change something in there, i have to change it 100 times...
I want a "global/general" thing that should work for 100 upgrades... so that once i click on the Research button, it should upgrade the unit once.
I have no experience with variables so far. I assume i need a variable for such global method/loop ?
I am still trying though...
How would you do that?
I click on my blacksmith.
I click on the upgrade.
The allied player's unit gets upgraded by 1.
This is what i want. And it should not give 100 upgrades at once... This is my problem right now...
I use this currently:
For each (Integer A) from 0 to 100, do (Actions)