Announcement

Collapse
No announcement yet.

I'm having trouble with the events

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

  • I'm having trouble with the events

    I can't figure it out. I'm having trouble with my citytaken triggered events. The only one that works is Antwerpen. Heres what my city taken events look like.

    @IF
    CityTaken
    city=Liége
    attacker=Germans
    defender=Allies
    @THEN
    Text
    ^German fallschirmjäger are trooped into Belgium and capture the key
    ^bridges intact. A succesful drop is made on the heaviest Belgian fort, ^Eben Emael, leaving the frontier open for the Panzer divisions.
    endtext
    @AND
    justonce
    @ENDIF

    @IF
    CityTaken
    city=Antwerpen
    attacker=Anybody
    defender=Anybody
    @THEN
    Text
    ^The Germans take Antwerp, cutting off Allied forces still in Belgium. endtext
    @AND
    justonce
    @ENDIF

    @IF
    CityTaken
    city=Rotterdam
    attacker=Germans
    defender=Allies
    @THEN
    Text
    ^After withstanding the German onslaught for several days, Rotterdam
    ^finally falls. The city is even bombed to rubble while talks of peace
    ^are in progress.
    endtext
    @AND
    justonce
    @ENDIF

    @IF
    CityTaken
    city=Dunkerque
    attacker=Anybody
    defender=Anybody
    @THEN
    Text
    ^The British Expeditionary Force is saved from complete annihilation
    ^by the mere mistake Hitler made of ordering back his tanks. The British
    ^forces are carried across the channel by a fleet consisting of every
    ^ship available to them. The French army is routed and Paris lies open.
    endtext
    CreateUnit
    owner=Allies
    unit=British Division
    Count=10
    veteran=yes
    homecity=None
    locations
    18,46
    endlocations
    PlayWaveFile
    Fall.wav
    @AND
    justonce
    @ENDIF

    @IF
    CityTaken
    city=Strasbourg
    attacker=Anybody
    defender=Anybody
    @THEN
    TEXT
    ^The French provinces of Alsace and Lorraine are annexed into Greater
    ^Germany.
    endtext
    @AND
    justonce
    @ENDIF

    @IF
    CityTaken
    city=Paris
    attacker=Anybody
    defender=Allies
    @THEN
    TEXT
    ^The German blitz has reached Paris in only six weeks since the
    operation's start. French forces are in a full retreat and a new
    French cabinet is formed under Marshal Pétain. An armistice is signed
    in which Germany gains occupational rights to two-thirds of France.
    endtext
    PlayAVIFile
    GWin.avi
    PlayWaveFile
    defeat.wav
    @AND
    justonce
    @ENDIF
    I've experimented around with changing attacker and defender into "anybodies" but I've had no luck with that. The Report.txt couldn't find anything wrong with events either...

  • #2
    It's the "@AND" in your actions field. You don't need it and I don't think you can use @AND in the action field. You Can run your actions together... That is,

    @THEN
    TEXT
    ^Pikachu unleashes his thunderbolt attack
    ENDTEXT
    CREATEUNIT
    owner=Ash
    unit=Thunder Bolt
    Count=2
    veteran=False
    homecity=None
    locations
    1,2,1
    endlocations
    JUSTONCE
    @ENDIF

    See how I ran 3 actions together? (This is an example... I'm not really making a scenario that uses this language).

    Comment


    • #3
      The @AND is only for use to connect conditions together. For example:

      @IF ;If Trade is not good, give a warning
      TURN
      Turn=200
      @AND
      CheckFlag
      Who=Muetarians
      Mask=0xFC000000
      Threshold=2
      State=On
      @THEN
      TEXT
      A Messenger from Emperor Herrott the Imperial Overlord of Muetar, Protector of Minaria, Holy Knight of Pennol, etc, etc.
      Commands the Matriarchs of Nithmere to put aside their petty squabbling and choose a new Queen of Nithmere.
      Your constant warfare has caused disruption to the Empire's southern trade routes!
      If you do not put an end to this, then the emperor will!
      ENDTEXT
      @ENDIF

      Comment


      • #4
        I also thought the JUSTONCE modifier went in the events section and not the trigger section of an event.
        "You give a guy a crown and it goes straight to his head."
        -OOTS

        Comment


        • #5
          Its strange. Darth, I see your point for @And, but the Antwerpen event still worked with it... I got it fixed though. I saved as a scenario again and this time when I loaded it the report.txt found a bug. It was with the "endtext" on the Antwerpen event. I fixed it and now the events work. But another problem has taken its place. When Paris is taken, the game crashes. So far its just Paris. I've tried taking out the PlayAVI and Wav actions, but it still crashes. But I haven't fully investigated this problem.

          Comment


          • #6
            Try omitting the hyphen in the two-thirds in the text box for the city capture.

            I've found that the game hates "&" and "-" in the coding for units (from original Civ-scenario making, maybe they fixed it). Actually, anything except ?, !, and $ is probably inviting havoc.

            Its usually good to stay with alphanumeric instead of symbols in names and text.

            See if that helps

            Comment


            • #7
              Hey there William. I'm just wondering about that Event you wrote there. What will it actually do besides post that message on Turn 200? thanks.....Civfan
              Civfan (Warriorsoflight)

              Comment


              • #8
                Omitting the "-" had no effect. Here is the error message I receive.

                CIV2 caused an invalid page fault in
                module AVIFIL32.DLL at 0167:7f672edf.
                Registers:
                EAX=00000000 CS=0167 EIP=7f672edf EFLGS=00210246
                EBX=000000f0 SS=016f ESP=008edb9c EBP=008edbb8
                ECX=01437c90 DS=016f ESI=000089d0 FS=2a67
                EDX=014367e4 ES=016f EDI=008ee960 GS=0000
                Bytes at CS:EIP:
                8b 00 ff 50 20 5d c2 1c 00 55 8b ec ff 74 24 24
                Stack dump:
                00000000 00000000 00000001 00000000 00000000 008edc38 00000000 008edc40 005a0d7e 00000000 00000000 00000001 00000000 00000000 008edc38 00000000
                I saw the error in the avifil32.dll. I tried the events without playing the avi, but it still crashes. Does this mean that my dll is corruptted?

                Comment


                • #9
                  Civfan ...

                  The event I posted above is only a warning to the player that they had better make the Emipre of Muetar happier (the how is to complex to go into in this post) or they will delare war and launch an offensive in 25 turns.

                  The event that follows the one above is ...

                  @IF ;Turn on the Warflag!
                  TURN
                  Turn=225
                  @AND
                  CheckFlag
                  Who=Muetarians
                  Mask=0xFC000000
                  Threshold=3
                  State=On
                  @THEN
                  FLAG
                  Continuous
                  Who=Muetarians
                  State=off
                  FLAG=26
                  @ENDIF

                  The War Flag (FLAG=26) triggers several pages of events that declare war (Make Aggression), mobilize Muetar's armies (Create Units), and march them off to capture the capitals of the four antagonists' nations (MoveTo).

                  Does that clear it up or just leave you with more questions?

                  Comment


                  • #10
                    Um, I have only done some work with ToT, but I was under the impression you could only have 16 flags.

                    Comment


                    • #11
                      DarthVeda ...

                      Each civ (including the barbarians) get 32 flags each. So, thats eight groups of 32 flags each.

                      It's only 32 bytes total but it opens a world of possibilities ... [insert Sleague tip here].

                      Comment


                      • #12
                        GPFs can be caused by corrupt .dlls (amongst other things). Try re-installing or copying from a known good area.

                        Comment


                        • #13
                          I think an event thread is in order.
                          [This message has been edited by William Keenan (edited October 11, 1999).]

                          Comment


                          • #14
                            Thanks William for answering. Questions, Questions, Questions, tons of questions but only one for now. Just wondering in your event file with your first line, @IF;Turn on the Warflag!..... Will that actually work. I mean on the Warflag. Shouldn't that be an action statement underneath Turn=225.....
                            Thanks...... Civfan
                            Civfan (Warriorsoflight)

                            Comment


                            • #15
                              The ";Turn the War Flag on" comment discribes the overall function of the @IF statement.

                              Everything after the semi-colon is a comment.

                              Comment

                              Working...
                              X