Announcement

Collapse
No announcement yet.

SLIC - Check Units in Stack

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

  • SLIC - Check Units in Stack

    As discuessed in the other City Units thread, here is the revised trigger to check enemy stacked units content.
    Code:
    // Check contents of stacked units
    Trigger 'CheckStackContents' when(clicked.unit && (unit.owner != g.player)
     && (UnitsInCell(unit.location) > 1)){ //continued from above
      Message(g.player, 'CheckStackContentsMessage');
    }
    Alertbox 'CheckStackContentsMessage' { 
     SetPlayer(1, unit.owner);
      i = 0;
      u = 4;
      while (i < player.1.totalunits) {
        SetUnitByIndex(3, player.1, i);
        if (unit.3.location == unit.location) {
          SetUnit(u, unit.3);
          u = u + 1;
        }
        i = i + 1;
      }
      Text(ID_CHECK_STACK_CONTENTS_MESSAGE);
      EyeDropDown(4, unit);
      Button(ID_BUTTON_CLOSE) {
        Deselect(); // suggested by skorpion59
        Kill();
      }
    }
    [This message has been edited by Dreamer (edited January 14, 2000).]

  • #2
    Look's good like this, apart from perhaps (if even possible) improved graphical display it can't be better.
    Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

    Comment


    • #3
      Hi,

      I'm a newby to slicks, could you explain who I might implement the above? Where do I put it etc.

      Comment


      • #4
        Rowick Hepan,

        There are (at least) two ways of doing it, but they come down to the same thing:

        1) Add it to any script.slc file you have (either in *your_civ_dir*\ctp_data\default\gamedata or in a scenario-folder, depending on when you wish to use it). Simply paste it at the beginning or end of this file. That's all.

        2) You can also put it in a seperate file which has the extension .slc (e.g. CheckStack.slc) and add the following line to the bottom of your script.slc (again, any script.slc file):
        #include [filename]
        in which [filename] is of course the name of the file (including the extension .slc).

        Tell me if you have any problems,

        Locutus
        [This message has been edited by Locutus (edited January 16, 2000).]
        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

        Comment


        • #5
          You also have to have the actual CHECK_STACK_CONTENTS_MESSAGE (which isn't listed above) in one of your files in your English\gamegata folder. BUTTON_CLOSE is already defined so you don't have to worry about it.

          UPDATE:
          Dreamer, sorry if this is an old version.
          Put
          CHECK_STACK_CONTENTS_MESSAGE "The location contain the following units:"
          in the scen_str.txt file in your English\gamedata folder.

          Don
          [This message has been edited by skorpion59 (edited January 16, 2000).]
          Don,
          CtPMaps (Hosted by Apolyton)

          Comment


          • #6
            Loc: Seems to have worked, I assume it only allow me to look at friendly stacks.

            Comment


            • #7
              Actually, the whole idea was to allow you to look at enemy stacks, you can already look at your own stacks. It shouldn't even work when you click on your own stack. Why are you asking? It doesn't work with you?
              Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

              Comment


              • #8
                No.... I was wondering why someone would create a slic to look at your own units. I'll have a play with it - any ideas are much appreciated.

                Comment

                Working...
                X