Results 1 to 30 of 42

Thread: Can I use a script to end the turn?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member mrtwisties's Avatar
    Join Date
    Nov 2007
    Location
    Sydney, Australia
    Posts
    235

    Default Re: Can I use a script to end the turn?

    Maybe if I write out the logical structure of what I'm trying to do, it'll be easier for people to understand me.

    Assume you start off in control of faction a, the first faction in the turn sequence. You want to be in control of faction x in turn 200, and you want the AI to play for every faction in the meantime.

    Here's the logical structure I want:

    *** Is the current turn number 200 or greater?

    If YES, then:

    Switch control to faction x, and stop running this script
    If NO, then:

    1. Switch control to the last faction in the turn sequence ("faction z")
    2. Wait until the AI has played the turns of all the other factions
    3. Switch control to the first faction in the turn sequence ("faction a")
    4. Wait until the AI has played the turn for faction z
    Go to ***
    Is that clearer?

  2. #2
    Member Member mrtwisties's Avatar
    Join Date
    Nov 2007
    Location
    Sydney, Australia
    Posts
    235

    Default Re: Can I use a script to end the turn?

    Roughly speaking, this is the code for 1 - 4:

    console_command control greek_cities
    campaign_wait 60
    console_command control romans_julii
    campaign_wait 60
    It works, more or less. The AI does play turns for all the factions, and it does advance to the next turn. There are problems with the code (eg dialog boxes; using campaign_wait rather than a more sophisticated trigger) but I'd like to focus on getting the overall logical structure working first.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO