Results 1 to 3 of 3

Thread: Spawn army

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Spawn army

    hello guys!!At first i wanna say that i'm an italian boy that be often in italians rome Tw Forum...But there the people are not very informed about scripting.....I wanna ask the international forum if anyone know what can be the error that i have:-(( I follow the tutorial to spawn an army but the units not appear!!!Where is the problem???And i can no more save the game!!but if i understand all correctly a background doesn't create problems to save the game.!. ???

    AdviceThread My_Script_Thread
    GameArea Campaign
    Item my_script_Item_1
    Uninhibitable
    Verbosity 0
    Threshold 1
    MaxRepeats 0
    RepeatInterval 1
    Attitude Normal
    Presentation Default
    Title my_script_Title_1
    On_display scripts\show_me\my_script.txt
    Text my_script_Text_1
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    ;------------------------------------------
    Trigger my_script_trigger_1
    WhenToTest ButtonPressed
    Condition I_ThreadCount My_Script_Thread = 0

    AdviceThread My_Script_Thread 1
    ;------------------------------------------
    Trigger my_script_trigger_2
    WhenToTest CharacterSelected
    Condition I_ThreadCount My_Script_Thread = 0

    AdviceThread My_Script_Thread 1
    ;------------------------------------------
    Trigger my_script_trigger_3
    WhenToTest SettlementSelected
    AdviceThread My_Script_Thread 1

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    script

    monitor_event FactionTurnStart FactionIsLocal
    and I_TurnNumber = 1

    console_command kill_character "Aneirin"

    spawn_army
    faction britons
    character Aneirin, named character, age 40, , x 45, y 32
    barb british general briton,
    end

    terminate_monitor

    end_monitor

    while I_TurnNumber < 9999
    suspend_unscripted_advice true
    end_while

    end_script



    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    If i understand with this background script a british general unit with a general named Aneirin must appear at the beginning of the second game turn...OR NOT????IS THERE AN ERROR?????

  2. #2
    makanyane's Avatar Praeses
    Content Emeritus

    Join Date
    Feb 2006
    Posts
    9,093
    Blog Entries
    1

    Default Re: Spawn army

    please look at this:
    http://www.twcenter.net/forums/showthread.php?t=221683

    one definite problem is where your line says
    barb british general briton,

    it should say
    unit name of unit,


    I'm not sure why you're having problem saving... that implies something more fundamental is wrong!

  3. #3
    HouseOfHam's Avatar Primicerius
    Join Date
    Apr 2007
    Location
    Minnesota, USA
    Posts
    3,030

    Default Re: Spawn army

    If you're having problems saving, it's probably because you're starting a new campaign without exiting all the way to the desktop. There is a bug in the engine (or maybe it just wasn't designed to be used the way we're using it?), where the background script does not auto-terminate when you exit back to the main menu. The only way I can think of to get around that (again, short of exiting all the way to the desktop) is to give the player a way to terminate it manually before exiting, i.e.:

    Code:
    ;;; --- Forced shutdown ---
    monitor_event ScrollAdviceRequested ScrollAdviceRequested end_game_scroll
        terminate_script
    end_monitor
    RTR website/SVN admin

    - Settlement coordinate locator -for RTW/M2TW
    - EDB Validator v1.2.8 (Oct 16, 2012) - for RTW/M2TW
    - RTW scripting tutorials
    - n-turns per year script generator

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •