Results 1 to 5 of 5

Thread: Scripted Ambush Battle in Campaign

  1. #1

    Default Scripted Ambush Battle in Campaign

    I want to know if there is a way to force a scripted ambush battle, I've scripted the spawning of the 2 armies at a specific turn (one army mine the other slave) and get them to attack each other, but is there a way to make it so my army ambushes the slave army? (I'm recreating a historical battle and want the ambushing for roleplay reasons)
    Thanks
    Last edited by antiochos_hierax; February 06, 2020 at 07:11 AM.

  2. #2

    Default Re: Scripted Ambush Battle in Campaign

    Try ordering your army to move to an ambush position and then the rebel army to move there too, creating that ambush battle.

  3. #3
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: Scripted Ambush Battle in Campaign

    I've scripted the spawning of the 2 armies at a specific turn ... and get them to attack each other
    Via engage_armies? I've never scripted an ambush attack but I suspect that this command would never be an ambush battle, because you're telling the first character to attack the second. Whereas ambushes happen by the second character walking into the first's ZOC. Try using the move command instead to create that scenario.

    The first character would need to be in 'waiting in ambush' mode, i.e. hiding in sparse forest, as Lusitanio said. From memory, spawning them on a sparse forest tile does not put them in hiding mode, though they might switch to that mode next turn, though the player might have moved them by then. I seem to recall there's a way of putting an army in ambush mode in descr_strat. Could be wrong about that and I'll bet it doesn't work in script anyway.

    EDIT: oh, just realised that I misread Lusitanio's post. Yeah, spawning and then walking (move) him into sparse forest could work.
    Last edited by Withwnar; February 07, 2020 at 03:13 AM.

  4. #4

    Default Re: Scripted Ambush Battle in Campaign

    Thanks to both, I'll try it that way and will update.

  5. #5
    z3n's Avatar State of Mind
    took an arrow to the knee

    Join Date
    Aug 2011
    Posts
    4,640

    Default Re: Scripted Ambush Battle in Campaign

    I'd probably give the ambushing army a leader with a trait that allows them to have a high chance of ambushing regardless.
    Last edited by z3n; February 07, 2020 at 12:12 PM.
    The AI Workshop Creator
    Europa Barbaroum II AI/Game Mechanics Developer
    The Northern Crusades Lead Developer
    Classical Age Total War Retired Lead Developer
    Rome: Total Realism Animation Developer
    RTW Workshop Assistance MTW2 AI Tutorial & Assistance
    Broken Crescent Submod (M2TW)/IB VGR Submod (BI)/Animation (RTW/BI/ALX)/TATW PCP Submod (M2TW)/TATW DaC Submod (M2TW)/DeI Submod (TWR2)/SS6.4 Northern European UI Mod (M2TW)

Posting Permissions

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