 |
|  |
 |
|
Locutus
|
|
ACS CTP1/2 Manager & Civ4 Co-Manager
|
 |
Hengelo, The Netherlands
Nov 1999 time: 06:35
|
|
Okay, I made an example where Settlers are spawned in all cities in turn 50 (note that this code is untested but based on the Militia code for the MedMod, so it should work).
Note that although the name of the variable is g.year, this actually represents the turn, not the year.
code: trigger 'SpawnSettler' when (player.1 && g.year == 50) { // in turn 50
i = 0;
while (i < player.1.cities) { // loop through all cities
SetCityByIndex(1, player.1, i);
CreateUnit(player.1, UnitType("UNIT_SETTLER"), city.location, 1); // create a settler 1 tile away from city
i = i + 1;
}
}
|
|
|  |
 |
|
Grandpa Troll

|
 |
I owe..I owe..it's off to work I go
Jul 2000 time: 00:35
|
|
quote: Originally posted by Locutus
Okay, I made an example where Settlers are spawned in all cities in turn 50 (note that this code is untested but based on the Militia code for the MedMod, so it should work).
Note that although the name of the variable is g.year, this actually represents the turn, not the year.
code: trigger 'SpawnSettler' when (player.1 && g.year == 50) { // in turn 50
i = 0;
while (i < player.1.cities) { // loop through all cities
SetCityByIndex(1, player.1, i);
CreateUnit(player.1, UnitType("UNIT_SETTLER"), city.location, 1); // create a settler 1 tile away from city
i = i + 1;
}
}
|
I am at turn 52.did not get the spawned settler unfortunately
Point to remember..I am also using the settlers excluded with start of 40 settlers...
Would this negate the possibility of having the settlers spawn?
I will await your response, thanks for all the help!
Peace
GT
Attachment: brain leaving head.gif
This has been downloaded 17 time(s).
|
|
|  |
 |
|  |
 |
|  |
 |
|
Grandpa Troll

|
 |
I owe..I owe..it's off to work I go
Jul 2000 time: 00:35
|
|
quote: Originally posted by Locutus
Yeah, I noticed it didn't work. It's probably some weird SLIC1 bug. It somehow doesn't seem to like the player.1 and g.year combo as trigger. When I have time I'll see if I can get it work, but I'm a little busy with other stuff right now.
What I suspect might work (untested):
code: trigger 'SpawnSettler' when (player.1) {
if (g.year == 50) { // in turn 50
i = 0;
while (i < player.1.cities) { // loop through all cities
SetCityByIndex(1, player.1, i);
CreateUnit(player.1, UnitType("UNIT_SETTLER"), city.location, 1); // create a settler 1 tile away from city
i = i + 1;
}
}
}
|
Thanks for the efforts Locutus..unfortunately..it didnt work either
I was wondering if it had anything to do with the wording????..i.e. "1 tile away from city"
I thank you for all your efforts though..currently, you are 2-3...well.1 for 2 and I used the template you created for tanks and made one for Marines..
I made it and it had an error..apparently I missed the fact that it is not UNIT_MARINE..but rather UNIT_MARINES..
I now have where you get a free marine then a free Tank with each seperate advance..
I found it very interesting..the follwing is the two adavnces #'s 55 & 56:
### ADVANCE DONE ###
ADVANCE_ROCKETRY
{
ADVANCE_DEFAULT_ICON ICON_ADVANCE_ROCKETRY
ADVANCE_DEFAULT_BRANCH BRANCH_FLIGHT
ADVANCE_AERODYNAMICS ADVANCE_EXPLOSIVES
ADVANCE_AGE_INDEX 2
POWER_POINTS 55
ADVANCE_COST 9375
}
### ADVANCE DONE ###
ADVANCE_TANK_WARFARE
{
ADVANCE_DEFAULT_ICON ICON_ADVANCE_TANK_WARFARE
ADVANCE_DEFAULT_BRANCH BRANCH_AGGRESSIVE_WAR
ADVANCE_CAVALRY_TACTICS ADVANCE_MASS_PRODUCTION
ADVANCE_AGE_INDEX 2
POWER_POINTS 56
ADVANCE_COST 9375
}
I say advances #55 & 56 because of the power points numbered such..
BUT in previous post you had ADVANCE_TANK_WARFARE as #55,,but in actuality it is #56 according to the list...
Any reason?
Trying to learn more each time out!
Feed me some more knowledge..dont pay attention to the attached sign!!!
Peace
Grandpa "Grateful" Troll
Attachment: dont feed the troll.jpg
This has been downloaded 8 time(s).
|
|
|  |
All times are GMT. The time now is 05:35. Apolyton Time is 00:35. |
top of page
|
|
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|