Results 1 to 30 of 116

Thread: An Intermediate Guide to Scripting

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Member Piko's Avatar
    Join Date
    Dec 2004
    Location
    Belgium,Bredene
    Posts
    59

    Default Re: An Intermediate Guide to Scripting

    Thanks for the replies, it sucks you have to kill the character though, makes scripting Roman civil war MUCH harder...

  2. #2
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: An Intermediate Guide to Scripting

    Has anyone found a way to script a keystroke? For instance, making the game peform a quick save in the script by having "Ctrl-S" invoked? I know there are ways to get UI elements activatedd, but I'm specifically trying to do something that has a shortcut, but no UI element. Probably not possible but I thought I'd ask.

  3. #3
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: An Intermediate Guide to Scripting

    Shortcuts can be called using a scripting command. I made a post about it somewhere, I'll see if I can dig it up.

  4. #4
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: An Intermediate Guide to Scripting

    Quote Originally Posted by Myrddraal
    here is a neat scripting command which I found whilst working on the MP campaign:

    call_object_shortcut

    Here is an example of the syntax:

    call_object_shortcut strat_ui speedup_ai

    the strat_ui bit is the category of the shortcut. If you open data\text\descr_shortcuts.txt and scroll to the bottom end, you'll find a list of the shortcuts with their categories to the right.
    ...

  5. #5
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: An Intermediate Guide to Scripting

    Ok - I thought I tried that and it didn't work. Guess I'll try again.

    Edit: Forgot my manners! Thanks for the quick response!
    Edit2: Looks like I had the wrong category for the shortcut I was trying to invoke. I'll test the new one when I get home...
    Last edited by Stuie; 05-19-2006 at 15:50.

  6. #6
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: An Intermediate Guide to Scripting

    Were you trying the save game one?

    I use it in the mp campaign script and it works.

  7. #7
    Member Member Stuie's Avatar
    Join Date
    Aug 2001
    Location
    Upper Gwynedd, PA
    Posts
    406

    Default Re: An Intermediate Guide to Scripting

    Quote Originally Posted by Myrddraal
    Were you trying the save game one?

    I use it in the mp campaign script and it works.
    No - something else. If/when I get it to work I'll report back.

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