Announcement

Collapse
No announcement yet.

SLIC SCENERIO HElP??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SLIC SCENERIO HElP??

    Can anyone provide me with a basic slic format for creating scenerio events such as , creating units or text on a certain turn?

  • #2
    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).]
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #3
      Hey well thanks alot Locutus, i do appreciate your help.

      Comment

      Working...
      X