Announcement

Collapse
No announcement yet.

player choice in slic

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

  • player choice in slic

    Hi,

    Is-it possible to do a player choice. I think about some thing like that

    question: "do you want to do this ?"
    answer: Yes or No

    slic fonction:

    if (answer=="yes") { //do yes }
    else { //do no }


    Do you have an idea, if it's possible and how I can do it ?
    Apolyton QuickStart for CTP PBEM

  • #2
    Use an AlertBox with yes and no buttons in it. Branch on the different conditions.

    Comment


    • #3
      Do you have an example ?
      Apolyton QuickStart for CTP PBEM

      Comment


      • #4
        Hi slamp,

        Here's an example. This is the trigger from script.slc that asks you if you want to enact a new government when one is discovered:

        Code:
        messagebox '57PlayerDiscoversNewGovernment' {
        	Text(ID_PLAYER_DISCOVERS_NEW_GOVERNMENT) ;
        	MessageType("CIVILIZATION");
        	Button(ID_BUTTON_NO) {
        		Kill();
        	}
        
        	Button(ID_BUTTON_YES) {
        		SetGovernment(government.1);
        		Kill();
        	}
        }
        Hope this helps,

        Locutus
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment

        Working...
        X