Thread Tools
Old January 14, 2002, 13:49   #1
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:21
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
IW, Could you help with one of yours Slics?
Code:
city_t tmpCity;
int_t tmpPlayer;
int_t tmpWonder;


void_f VeteranEffect (location_t tmpLoc, int_t tmpPlayer)
{
int_t	i;
unit_t	tmpUnit;
int_t	tmpNum;
int_t	numUnits;
int_t	tmpPlayer2;

	player[0] = tmpPlayer;
	numUnits = player[0].units;
	tmpPlayer2 = tmpPlayer;
	if (IsPlayerAlive(tmpPlayer2)) {
	// Make all Units non veteran, except Special Units
		for (i = 0; i < numUnits; i = i + 1) {
			GetUnitByIndex(tmpPlayer2, i, tmpUnit);
			tmpNum = tmpUnit.type;
			if (tmpNum >= 106 && tmpNum <= 112) {                           
				ToggleVeteran(tmpUnit, 1);
			} else {
				ToggleVeteran(tmpUnit, 0);
			}
		}
	}
	
	// Make all Units veterans who share the location Alexander, Robin Hood and Richard The Lion Heart
	tmpNum = GetUnitsAtLocation(tmpLoc);
	for (i = 0; i < tmpNum; i = i + 1) {
		GetUnitFromCell(tmpLoc, i, tmpUnit);
		ToggleVeteran(tmpUnit, 1);
	}
}


// Hammurabi

HandleEvent(CreateWonder) 'Hammurabi' post {

	tmpWonder = value[0];

	if(tmpWonder == WonderDB(WONDER_HANGING_GARDENS)) {
		tmpCity = city[0];
		tmpPlayer = tmpCity.owner;
		CreateUnit(tmpPlayer, UnitDB(UNIT_HAMMURABI), city[0].location, 0);
		DisableTrigger('Hammurabi');
	}
}
This is your Wonder Unit Code, IW. But could you make a small change. Instead of making the Wonder unit appear after finish building a Wonder could you make this unit appear after research an advance? Maybe appearing in the Capital City (or anywhere else if it became a problem)? And with a 20 % (1 out of 5) chance of happenning.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; January 14, 2002 at 14:22.
Pedrunn is offline  
Old January 14, 2002, 14:41   #2
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Fair enough

The veteran function can remain the same. It deals with the unit, not the creation effect, so just leave that in. Then for every unit you want created, make one of these handlers (as in the wonder-unit code):

Code:
HandleEvent(GrantAdvance) 'Hammurabi' post {

city_t tmpCity;
int_t tmpPlayer;
int_t tmpAdvance;
int_t randomnum;

	tmpAdvance = value[0];

	if(tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) {
		randomnum = random(4);
		if(randomnum > 3){
			tmpPlayer = player[0];
			int_t i;
			i = 0;
			while(i < player[0].cities){
				GetCityByIndex(tmpPlayer, i, tmpCity);
				city[0] = tmpCity;
				if(UnitsAtLocation(city[0].location) != 12){
					CreateUnit(tmpPlayer, UnitDB(UNIT_HAMMURABI), city[0].location, 0);
				}
				else {
					i = i + 1;
                                }
                        }
		}
	}
}
Just change two bits for each one. The name of the handler - in between the two ' s at the top, and then change the unit it refers to in the UnitDB( brackets.

Then in the veteran function you will need to change some things:
Code:
if (tmpNum >= 106 && tmpNum <= 112) {
Make the numbers in there be the lower 'wonderunit' number, and upper 'wonderunit' number. So it only refers to the wonderunits you want.

It strikes me that the veteran function is never actually used in the code. I don't know how that got through...
Add these lines:
Code:
HandleEvent(MoveUnits) 'MakeVeteran' pre {
             location_t tmpLoc;
             tmpLoc = unit[0].location;
             tmpPlayer = unit[0].owner;
             VeteranEffect(tmpLoc, tmpPlayer);
}

DISCLAIMER: untried, untested, bugs likely.

Last edited by Immortal Wombat; January 14, 2002 at 14:52.
Immortal Wombat is offline  
Old January 14, 2002, 15:33   #3
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:21
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Re: IW, Could you help with one of yours Slics?
Is that correct?

OBS: I guess this definitions will be off:
city_t tmpCity;
int_t tmpWonder;

Or should i leave both there for no reason since they wont interfere?
Or are they needed?

Code:
city_t tmpCity;  
int_t tmpPlayer;
int_t tmpWonder; 

void_f VeteranEffect (location_t tmpLoc, int_t tmpPlayer)
{
int_t	i;
unit_t	tmpUnit;
int_t	tmpNum;
int_t	numUnits;
int_t	tmpPlayer2;

	player[0] = tmpPlayer;
	numUnits = player[0].units;
	tmpPlayer2 = tmpPlayer;
	if (IsPlayerAlive(tmpPlayer2)) {
	// Make all Units non veteran, except Special Units
		for (i = 0; i < numUnits; i = i + 1) {
			GetUnitByIndex(tmpPlayer2, i, tmpUnit);
			tmpNum = tmpUnit.type;
			if (tmpNum >= 106 && tmpNum <= 112) {                           
				ToggleVeteran(tmpUnit, 1);
			} else {
				ToggleVeteran(tmpUnit, 0);
			}
		}
	}
	
	// Make all Units veterans who share the location Alexander, Robin Hood and Richard The Lion Heart
	tmpNum = GetUnitsAtLocation(tmpLoc);
	for (i = 0; i < tmpNum; i = i + 1) {
		GetUnitFromCell(tmpLoc, i, tmpUnit);
		ToggleVeteran(tmpUnit, 1);
	}
}


HandleEvent(GrantAdvance) 'Hammurabi' post {

city_t tmpCity;
int_t tmpPlayer;
int_t tmpAdvance;
int_t randomnum;

	tmpAdvance = value[0];

	if(tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) {
		randomnum = random(4);
		if(randomnum > 3){
			tmpPlayer = player[0];
			int_t i;
			i = 0;
			while(i < player[0].cities){
				GetCityByIndex(tmpPlayer, i, tmpCity);
				city[0] = tmpCity;
				if(UnitsAtLocation(city[0].location) != 12){
					CreateUnit(tmpPlayer, UnitDB(UNIT_HAMMURABI), city[0].location, 0);
				}
				else {
					i = i + 1;
                                }
                        }
		}
	}
}

HandleEvent(GrantAdvance) 'Alexander' post {

city_t tmpCity;
int_t tmpPlayer;
int_t tmpAdvance;
int_t randomnum;

	tmpAdvance = value[0];

	if(tmpAdvance == AdvanceDB(ADVANCE_INFANTRY_TACTICS)) {
		randomnum = random(4);
		if(randomnum > 3){
			tmpPlayer = player[0];
			int_t i;
			i = 0;
			while(i < player[0].cities){
				GetCityByIndex(tmpPlayer, i, tmpCity);
				city[0] = tmpCity;
				if(UnitsAtLocation(city[0].location) != 12){
					CreateUnit(tmpPlayer, UnitDB(UNIT_ALEXANDER), city[0].location, 0);
				}
				else {
					i = i + 1;
                                }
                        }
		}
	}
}
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; January 14, 2002 at 15:45.
Pedrunn is offline  
Old January 14, 2002, 16:14   #4
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
That is correct.

The definitions you noted at the top need leaving out! Otherwise they are defined twice, and cause SLIC errors.

The code is not the fastest way of doing it, but it is the easiest way of doing it so you (and anyone else viewing this thread) can add more of your own.

One small thing to add. I don't like while-loops and I'm a bit concerned about this one. To be on the safe side, after the CreateUnit line in each handler, add the line
Code:
i = i + player[0].cities;
That will break out of the loop, and prevent any infinitely long delays...

reminder, you need this in there somewhere (below the void_f VeteranEffect line):
Code:
HandleEvent(MoveUnits) 'MakeVeteran' pre {
             location_t tmpLoc;
             tmpLoc = unit[0].location;
             tmpPlayer = unit[0].owner;
             VeteranEffect(tmpLoc, tmpPlayer);
}
Immortal Wombat is offline  
Old January 14, 2002, 19:37   #5
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 21:21
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Don't worry, Ben, it looks like you ripped that while loop straight from the Alexander scenario, meaning either I or Tony Evans wrote it. Since Tony is almost as good a programmer as I am, it has to be high quality code and you should be safe either way

BTW, you forgot about the chances. To have a 20% change of getting the unit, replace this line (and the ones like it):

if (tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) {

with this one:

if ((tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) && (Random(5) < 1)) {
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old January 15, 2002, 09:01   #6
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by Locutus
Don't worry, Ben, it looks like you ripped that while loop straight from the Alexander scenario, meaning either I or Tony Evans wrote it. Since Tony is almost as good a programmer as I am, it has to be high quality code and you should be safe either way

BTW, you forgot about the chances. To have a 20% change of getting the unit, replace this line (and the ones like it):

if (tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) {

with this one:

if ((tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) && (Random(5) < 1)) {
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old January 15, 2002, 09:02   #7
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by Locutus
Don't worry, Ben, it looks like you ripped that while loop straight from the Alexander scenario, meaning either I or Tony Evans wrote it. Since Tony is almost as good a programmer as I am, it has to be high quality code and you should be safe either way
Yeah, the only thing is that it means you cannot have any veterans apart from the wonderunits...
Quote:
BTW, you forgot about the chances. To have a 20% change of getting the unit, replace this line (and the ones like it):
No I didn't

Its in there as:
Code:
if(tmpAdvance == AdvanceDB(ADVANCE_INFANTRY_TACTICS)) {
		randomnum = random(4);
		if(randomnum > 3){
Immortal Wombat is offline  
Old January 15, 2002, 09:23   #8
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 21:21
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Oops, you're right, I overlooked those odds. I'm not sure they're correct though, I *think* Random(4) returns 0, 1, 2 or 3 but never anything larger (would have to double check that though).
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old January 15, 2002, 09:44   #9
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Ah, stupid Activision and their 0s...

if(randomnum> 2){

then
Immortal Wombat is offline  
Old January 15, 2002, 10:29   #10
Locutus
Apolytoners Hall of FameCiv4 SP Democracy GameCiv4 InterSite DG: Apolyton TeamBtS Tri-LeagueC4BtSDG TemplarsC4WDG Team ApolytonCivilization IV CreatorsCTP2 Source Code ProjectPolyCast Team
Deity
 
Locutus's Avatar
 
Local Time: 21:21
Local Date: October 31, 2010
Join Date: Nov 1999
Location: De Hel van Enschede
Posts: 11,702
Actually, your insulting all CS people here: mathematicians always starting counting at 1, programmers and software designers at 0 (naturally the latter is the superior system )...
__________________
Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery
Locutus is offline  
Old January 15, 2002, 11:56   #11
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Stupid software designers...
Immortal Wombat is offline  
Old January 19, 2002, 07:39   #12
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:21
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
IW, could you check if the code is right now?

Code:
void_f VeteranEffect (location_t tmpLoc, int_t tmpPlayer)

HandleEvent(MoveUnits) 'MakeVeteran' pre {
             location_t tmpLoc;
             tmpLoc = unit[0].location;
             tmpPlayer = unit[0].owner;
             VeteranEffect(tmpLoc, tmpPlayer);
}
{
int_t	i;
unit_t	tmpUnit;
int_t	tmpNum;
int_t	numUnits;
int_t	tmpPlayer2;

	player[0] = tmpPlayer;
	numUnits = player[0].units;
	tmpPlayer2 = tmpPlayer;
	if (IsPlayerAlive(tmpPlayer2)) {
	// Make all Units non veteran, except Special Units
		for (i = 0; i < numUnits; i = i + 1) {
			GetUnitByIndex(tmpPlayer2, i, tmpUnit);
			tmpNum = tmpUnit.type;
			if (tmpNum >= 106 && tmpNum <= 112) {                           
				ToggleVeteran(tmpUnit, 1);
			} else {
				ToggleVeteran(tmpUnit, 0);
			}
		}
	}
	
	// Make all Units veterans who share the location Alexander, Robin Hood and Richard The Lion Heart
	tmpNum = GetUnitsAtLocation(tmpLoc);
	for (i = 0; i < tmpNum; i = i + 1) {
		GetUnitFromCell(tmpLoc, i, tmpUnit);
		ToggleVeteran(tmpUnit, 1);
	}
}


HandleEvent(GrantAdvance) 'Hammurabi' post {

city_t tmpCity;
int_t tmpPlayer;
int_t tmpAdvance;
int_t randomnum;

	tmpAdvance = value[0];

	if(tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) {
		randomnum = random(4);
		if(randomnum > 3){
			tmpPlayer = player[0];
			int_t i;
			i = 0;
			while(i < player[0].cities){
				GetCityByIndex(tmpPlayer, i, tmpCity);
				city[0] = tmpCity;
				if(UnitsAtLocation(city[0].location) != 12){
					CreateUnit(tmpPlayer, UnitDB(UNIT_HAMMURABI), city[0].location, 0);
				}
				else {
					i = i + 1;
                                }
                        }
		}
	}
}
I want to know if only one civ can get this unit or every civ that research the advance can have it (this mean every civ can have a hammurabi in the same game).
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old January 19, 2002, 08:29   #13
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Quote:
Originally posted by Pedrunn
IW, could you check if the code is right now?
Not quite
Code:
void_f VeteranEffect (location_t tmpLoc, int_t tmpPlayer)
{
int_t	i;
unit_t	tmpUnit;
int_t	tmpNum;
int_t	numUnits;
int_t	tmpPlayer2;

	player[0] = tmpPlayer;
	numUnits = player[0].units;
	tmpPlayer2 = tmpPlayer;
	if (IsPlayerAlive(tmpPlayer2)) {
	// Make all Units non veteran, except Special Units
		for (i = 0; i < numUnits; i = i + 1) {
			GetUnitByIndex(tmpPlayer2, i, tmpUnit);
			tmpNum = tmpUnit.type;
			if (tmpNum >= 106 && tmpNum <= 112) {                           
				ToggleVeteran(tmpUnit, 1);
			} else {
				ToggleVeteran(tmpUnit, 0);
			}
		}
	}
	
	// Make all Units veterans who share the location Alexander, Robin Hood and Richard The Lion Heart
	tmpNum = GetUnitsAtLocation(tmpLoc);
	for (i = 0; i < tmpNum; i = i + 1) {
		GetUnitFromCell(tmpLoc, i, tmpUnit);
		ToggleVeteran(tmpUnit, 1);
	}
}


HandleEvent(MoveUnits) 'MakeVeteran' pre {
             location_t tmpLoc;
             tmpLoc = unit[0].location;
             tmpPlayer = unit[0].owner;
             VeteranEffect(tmpLoc, tmpPlayer);
}


HandleEvent(GrantAdvance) 'Hammurabi' post {

city_t tmpCity;
int_t tmpPlayer;
int_t tmpAdvance;
int_t randomnum;

	tmpAdvance = value[0];

	if(tmpAdvance == AdvanceDB(ADVANCE_IRON_WORKING)) {
		randomnum = random(4);
		if(randomnum >= 3){
			tmpPlayer = player[0];
			int_t i;
			i = 0;
			while(i < player[0].cities){
				GetCityByIndex(tmpPlayer, i, tmpCity);
				city[0] = tmpCity;
				if(UnitsAtLocation(city[0].location) != 12){
					CreateUnit(tmpPlayer, UnitDB(UNIT_HAMMURABI), city[0].location, 0);
				}
				else {
					i = i + 1;
                                }
                        }
		}
	}
}
[/quote]
That is now right.
Quote:
I want to know if only one civ can get this unit or every civ that research the advance can have it (this mean every civ can have a hammurabi in the same game).
Every civ can get one. Is this right?
If not, add the line
Code:
DisableTrigger('Hammurabi');
below the CreateUnit line. This will mean it only fires once in the game. First person to get there gets the chance of getting it. If you want everyone to have the chance of getting it, leave it as it is.
Immortal Wombat is offline  
Old January 19, 2002, 08:46   #14
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:21
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
below the CreateUnit line. This will mean it only fires once in the game. First person to get there gets the chance of getting it. If you want everyone to have the chance of getting it, leave it as it is.
Actually i rather have every civ with a chance of the unit in the same game. so i will leave the way it is.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; January 19, 2002 at 09:01.
Pedrunn is offline  
Old January 19, 2002, 13:07   #15
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:21
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Oh Oh!
Code:
No fuction named UnitsAtLocation
I'm getting a message like that for each unit i add.
So i changed this fuction by
Code:
GetUnitsAtLocation
and the errors messages disappeared. What i did was right?
I'm going to test it now anyway.
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; January 19, 2002 at 13:17.
Pedrunn is offline  
Old January 19, 2002, 17:38   #16
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Oh, yeah, sorry, its GetUnitsAtLocation, or UnitsInCell.
Immortal Wombat is offline  
Old January 31, 2002, 05:36   #17
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:21
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
It strikes me that the veteran function is never actually used in the code. I don't know how that got through...
Add these lines:
Code:
HandleEvent(MoveUnits) 'MakeVeteran' pre {
             location_t tmpLoc;
             tmpLoc = unit[0].location;
             tmpPlayer = unit[0].owner;
             VeteranEffect(tmpLoc, tmpPlayer);
}
It strikes me too, soo how do i use the veteran fuction alone. I want to make special leaders units buildable as any other now instead of only coming after discovering an advance. Can you change the code for me again?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand
Pedrunn is offline  
Old January 31, 2002, 12:05   #18
Immortal Wombat
Apolytoners Hall of Fame
Prince
 
Immortal Wombat's Avatar
 
Local Time: 20:21
Local Date: October 31, 2010
Join Date: Dec 2000
Location: in perpetuity
Posts: 4,962
Just use this:
Code:
void_f VeteranEffect (location_t tmpLoc, int_t tmpPlayer)
{
int_t	i;
unit_t	tmpUnit;
int_t	tmpNum;
int_t	numUnits;
int_t	tmpPlayer2;

	player[0] = tmpPlayer;
	numUnits = player[0].units;
	tmpPlayer2 = tmpPlayer;
	if (IsPlayerAlive(tmpPlayer2)) {
	// Make all Units non veteran, except Special Units
		for (i = 0; i < numUnits; i = i + 1) {
			GetUnitByIndex(tmpPlayer2, i, tmpUnit);
			tmpNum = tmpUnit.type;
			if (tmpNum >= 106 && tmpNum <= 112) {                           
				ToggleVeteran(tmpUnit, 1);
			} else {
				ToggleVeteran(tmpUnit, 0);
			}
		}
	}
	
	// Make all Units veterans who share the location Alexander, Robin Hood and Richard The Lion Heart
	tmpNum = GetUnitsAtLocation(tmpLoc);
	for (i = 0; i < tmpNum; i = i + 1) {
		GetUnitFromCell(tmpLoc, i, tmpUnit);
		ToggleVeteran(tmpUnit, 1);
	}
}


HandleEvent(MoveUnits) 'MakeVeteran' pre {
             location_t tmpLoc;
             tmpLoc = unit[0].location;
             tmpPlayer = unit[0].owner;
             VeteranEffect(tmpLoc, tmpPlayer);
}
Make sure the tmpNum in the first function has the right boundaries (includes only the wonder units) and that you have not got CannotBuild lines in their units.txt entries.
Ben
__________________
Concrete, Abstract, or Squoingy?
"I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis
Immortal Wombat is offline  
Old January 31, 2002, 18:22   #19
Pedrunn
Call to Power II Democracy Game
King
 
Pedrunn's Avatar
 
Local Time: 16:21
Local Date: October 31, 2010
Join Date: Jul 2001
Location: of Natal, Brazil
Posts: 2,555
Quote:
Originally posted by Immortal Wombat
and that you have not got CannotBuild lines in their units.txt entries.
Ben
Call me stupid, please . Just take the cantBuild lines off, Pedrunn. Is that so hard?
__________________
"Kill a man and you are a murder.
Kill thousands and you are a conquer.
Kill all and you are a God!"
-Jean Rostand

Last edited by Pedrunn; January 31, 2002 at 22:31.
Pedrunn is offline  
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 15:21.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Apolyton Civilization Site | Copyright © The Apolyton Team