1
Maps, tilesets and scenarios / Re: Scenario - Grandezza Peril
« on: 4 May 2016, 10:43:04 »
Hi,
I do not see much difference to normal game (just different amount of units?)
Regarding your coding:
I am pretty sure that the following is not valid XML syntax (does this even work in megaglest?):
<scenario>
--Grandezza Peril 1a
--Stay alive long enough for your Egyptian ally to reinforce your armies!
--By Andy Alt
--CC-BY-SA
you should use:
<scenario>
<!--Grandezza Peril 1a
--Stay alive long enough for your Egyptian ally to reinforce your armies!
--By Andy Alt
--CC-BY-SA-->
Your using many for - loops which are not very self-explanatory.
maybe it would help to use some variables for the factions
team_1_player_1 = 0
team_1_player_2 = 1
...
team_2_player_1 = 4
...
and then just write:
createUnit('defense_tower', 0, startLocation(team_1_player_1))
createUnit('defense_tower', 0, startLocation(team_1_player_2))
createUnit('defense_tower', 0, startLocation(team_1_player_3))
instead of:
for i=0, 3 do
createUnit('defense_tower', 0, startLocation(i))
end
this would increase readibility
I do not see much difference to normal game (just different amount of units?)
Regarding your coding:
I am pretty sure that the following is not valid XML syntax (does this even work in megaglest?):
<scenario>
--Grandezza Peril 1a
--Stay alive long enough for your Egyptian ally to reinforce your armies!
--By Andy Alt
--CC-BY-SA
you should use:
<scenario>
<!--Grandezza Peril 1a
--Stay alive long enough for your Egyptian ally to reinforce your armies!
--By Andy Alt
--CC-BY-SA-->
Your using many for - loops which are not very self-explanatory.
maybe it would help to use some variables for the factions
team_1_player_1 = 0
team_1_player_2 = 1
...
team_2_player_1 = 4
...
and then just write:
createUnit('defense_tower', 0, startLocation(team_1_player_1))
createUnit('defense_tower', 0, startLocation(team_1_player_2))
createUnit('defense_tower', 0, startLocation(team_1_player_3))
instead of:
for i=0, 3 do
createUnit('defense_tower', 0, startLocation(i))
end
this would increase readibility

Thank you for testing.



, but I hope you got my intention




