Results 1 to 3 of 3

Thread: [Submod]changed AI money assistance script [help/advice needed]

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Speaker of Truth Senior Member Moros's Avatar
    Join Date
    Jan 2005
    Location
    Belgium
    Posts
    13,469

    Default Re: [Submod]changed AI money assistance script [help/advice needed]

    This likely means you've broken the script. After pressing the end trun button toggle the command box and press the up key when in the ablility to type in the box. This way you can see previous console commands even those performed by script, such as the add_money command done by your script. This way you can check for sure whether this is actually working. Have you used Notepad++ to edit the file?

    Also shouldn't this:
    monitor_event FactionTurnStart FactionType f_rome
    and IsFactionAIControlled
    if I_NumberOfSettlements f_rome > 6
    if not I_NumberOfSettlements f_rome > 8
    set_kings_purse f_rome 2000
    end_if
    end_monitor

    Here you don't start with an if, use multiple ifs and only use on end if. I don't know much about MTW2 scripting but this seems like a big no-no, to me.

    be:
    Code:
     
    monitor_event FactionTurnStart FactionType f_rome
    if IsFactionAIControlled
    and I_NumberOfSettlements f_rome > 6 and not I_NumberOfSettlements f_rome > 8 set_kings_purse f_rome 2000
    end_if end_monitor
    Make sure you're structure of coding is always good. One if followed by and's to set multiple conditions that need to be jointly set for following actions. Also not tab spacing. A secondary if and "and sequence" for further specification of certain event with an additionally increased indent (tab) can be set but then you also need an additional end_if. At least this is the way other parts of the script seem to be coded.

    Member thankful for this post:



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