 |
|
junito13
|
|
tallahasssee,fl usa
Mar 2001 time: 05:14
|
|
Can anyone provide me with a basic slic format for creating scenerio events such as , creating units or text on a certain turn?
|
|
|  |
 |
|
Locutus
|
|
ACS CTP1/2 Manager & Civ4 Co-Manager
|
 |
Hengelo, The Netherlands
Nov 1999 time: 06:14
|
|
Well, those examples are simple enough:
code: HandleEvent(BeginTurn) 'SomeEvent' post {
location_t tmpLoc;
city_t tmpCity;
if (g.year == 100) { // in turn 100
Message(1, 'TestMessage'); // display a message for player 1 (normally the human player)
}
if (g.year == 25) { // in turn 25
GetCityByIndex(1, 0, tmpCity); // store oldest city of player 1 in tmpCity variable
// give player 0 (=barbarian) a warrior on a random tile 1 squares away from the oldest city of player 1:
CreateUnit(1, UnitDB(UNIT_WARRIOR), tmpCity.location, 0);
// give player 1 a warrior in his oldest city (random tile 0 squares away from oldest city == city itself):
CreateUnit(0, UnitDB(UNIT_WARRIOR), tmpCity.location, 1);
}
if (g.year == 125) { // in turn 125
MakeLocation(tmpLoc, 25, 40); // store location (25, 40) in variable tmpLoc
// give player 3 a hoplite on location (25, 40):
CreateUnit(3, UnitDB(UNIT_HOPLITE), tmpLoc, 0);
}
}
Message 'TestMessage' {
Text(ID_TEST_MESSAGE); // displays text TEST_MESSAGE (must be defined in text files) in a message
}
Hope this helps...
[This message has been edited by Locutus (edited March 14, 2001).]
|
|
|  |
 |
|
junito13
|
|
tallahasssee,fl usa
Mar 2001 time: 05:14
|
|
Hey well thanks alot Locutus, i do appreciate your help.
|
|
|  |
All times are GMT. The time now is 05:14. Apolyton Time is 00:14. |
top of page
|
| archivepost |
|
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
|
|
|
|
|
|