Announcement

Collapse
No announcement yet.

Bug Out!

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

  • Bug Out!

    What are the two int's in the MoveArmy command for? I've put different numbers in there without any effect.

    MoveArmy(army_t, int_t, int_t, int_t, location_t)
    Move an army one square

    Usually I use MoveUnits, but I thought perhaps I could get some extra functionality here.

  • #2
    Well you could do what Ben did in the Knee-Deep in SLIC thread triger an message box on the MoveArmy event that contains the values of these int I think to access these ints you have to use value[0] and value[0]. So you would get a number that tell you if it do anything.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

    Comment


    • #3
      Could be directions or something, since its a one-square move only. Try what Martin suggests, only value[0] and value[1] may prove more effective
      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

      Comment


      • #4
        Maybe I should quote again the slic documention:

        MoveArmy(army_t, int_t, int_t, int_t, location_t)
        Move an army one square
        So the first int is the direction in that the army moves that should vary from 0 to 7. The other both are still a mystery. Well I have to admit that I overlooked the third one that should be accessed with value[0] .

        The only example of triggering this event I found was in one of my experimental slic files here is the line:

        Event:MoveArmy(MGArmy2, k, 1000, 1000, MGLoc);

        k contains the direction, the other two ints are set very high probably they don't do anything, but test it with the messagebox.

        -Martin
        Civ2 military advisor: "No complaints, Sir!"

        Comment


        • #5
          Usually I use MoveUnits, but I thought perhaps I could get some extra functionality here.
          You've got that to work? When I tried generating MoveUnit events, IIRC I ran up against a problem with it leaving a zone of control (invisably) behind. I think Locutus noticed this too.

          Comment


          • #6
            MoveUnits(army_t, location_t, location_t)
            An army always moves on this event, no more legality checks at this point
            Another problem if you trigger the MoveUnits event is that there aren't no more legacy checks on this point. So if you think the army shouldn't be moved if it doesn't has enough move points then you have to do it on your own. But that is actual not the problem, you get trouble if the target location contains more then 12 units after the MoveUnits event. The units above the limit are be killed. Actual also a result that is not too strange, but it moves also an army into a city that does not belong to the same civilsation as the army. This event also allows to move units of different civilisations into one quare so that you can group them to a new army, but don't try to move this multinational stack then the game will crash. Probably this event will also move land armies into the ocean without killing them. I didn't test this as I did this legacy check before.

            -Martin
            Civ2 military advisor: "No complaints, Sir!"

            Comment


            • #7
              Wow!

              I never thought about those problems with MoveUnits before Martin, I better review some code to make sure I haven't created some problems.

              I've used this line for MoveArmy:

              Event:MoveArmy(Army[0], x, 0, 0, tmpLoc);

              x is the location of the move, but the other two ints don't seem to do anything. I was thinking that one might be for number of squares (but this is contradicted by the description of the event), perhaps the second number of units from the army. But neither of these are the case. It's a mystery I guess, I was hoping someone out there had cracked it's secret.

              Comment

              Working...
              X