Page 3 of 3 FirstFirst 123
Results 41 to 54 of 54

Thread: The use of destroy_units in the campaign script

  1. #41
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,925

    Default Re: destroy_units - 4 sample uses

    "label_unit" is an exclusively battle-map command, used for scripted battles.


    "If ye love wealth greater than liberty,
    the tranquility of servitude greater than
    the animating contest for freedom, go
    home from us in peace. We seek not
    your counsel, nor your arms. Crouch
    down and lick the hand that feeds you,
    and may posterity forget that ye were
    our countrymen."
    -Samuel Adams

  2. #42
    Sir Arnold
    Join Date
    Mar 2009
    Location
    DAA
    Posts
    6,519

    Default Re: destroy_units - 4 sample uses

    Ah, I see, thanks for pointing this out to me

  3. #43
    Gigantus's Avatar Veni, Vici, Procudit
    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    27,686

    Default Re: destroy_units - 4 sample uses

    The label_unit command only works within a battle script I believe. Germanicu5 Stakes script for TATW is a brilliant example, but this is how the script starts:

    monitor_event BattleConflictPhaseCommenced FactionIsLocal
    prepare_for_battle

  4. #44
    Hero of the West's Avatar Fellowship of the MOS
    Join Date
    Jan 2010
    Location
    The Netherlands
    Posts
    1,471

    Default Re: destroy_units - 4 sample uses

    hmm so the idea is probably not going to work?
    Last edited by Hero of the West; April 10, 2010 at 03:26 PM.
    Patronized by Eöl

  5. #45
    redxavier's Avatar Shisai
    Join Date
    Apr 2007
    Posts
    377

    Default Re: destroy_units - 4 sample uses

    Fantastic discovery... a while ago I wrote a saxon fyrd script and used destroy_units to disband all the fyrd units, either by player action (monitoring UnitDisbanded) or script after a number of turns had passed since the fyrd had been called. But I had to make do with an existing unit attribute to use as the dummy (and try to find one that I wasn't using, like can_sap), which severely limited the script's application.

    The ability to create your own dummy attributes means that I can have separate fyrds for each region, all of which can be disbanded at different times.

  6. #46
    fightermedic's Avatar Ishiyumi no shashu
    Join Date
    Feb 2008
    Location
    Bavaria
    Posts
    711

    Default Re: destroy_units - 4 sample uses

    this could be used to have a maximum number of certain units available at any time
    just have the game check every turn how many units with the xyz-unit atribute there are and disable recruiting them via a triggered event if there is the given number or more

    great find btw

    oh and shouldn't this be moved to the tutorials section of the forum?
    Last edited by fightermedic; August 08, 2010 at 05:06 PM.

  7. #47
    Withwnar's Avatar Chuck Norris Disciple
    Join Date
    Oct 2008
    Posts
    3,126

    Default Re: The use of destroy_units in the campaign script

    Great stuff.

    Can custom attributes be used in other commands/conditions? I tried with I_NumberUnitsInSettlement but it didn't work.

  8. #48
    Ishan's Avatar At your service!
    Join Date
    Aug 2008
    Location
    India
    Posts
    21,713

    Default Re: The use of destroy_units in the campaign script

    @Withwnar
    If a single command recognizes a custom attrib from the EDU then so does every other command will.

  9. #49
    Withwnar's Avatar Chuck Norris Disciple
    Join Date
    Oct 2008
    Posts
    3,126

    Default Re: The use of destroy_units in the campaign script

    Thanks Ishan but "with a few exceptions" perhaps? create_unit doesn't seem to work, for instance. Unsurprisingly; it wouldn't be necessarily creating a unit in this case which is its purpose.

  10. #50
    Taiji's Avatar relaxed-system intact
    Join Date
    Jun 2005
    Posts
    9,768

    Default Re: The use of destroy_units in the campaign script

    They can be used where the docudemons specifies 'unit attribute' as a parameter.

  11. #51
    Ishan's Avatar At your service!
    Join Date
    Aug 2008
    Location
    India
    Posts
    21,713

    Default Re: The use of destroy_units in the campaign script

    Quote Originally Posted by Taiji View Post
    They can be used where the docudemons specifies 'unit attribute' as a parameter.
    Thanks Taiji for clearing that up as i was not able to phrase my sentence properly.
    +rep

  12. #52
    Withwnar's Avatar Chuck Norris Disciple
    Join Date
    Oct 2008
    Posts
    3,126

    Default Re: The use of destroy_units in the campaign script

    Quote Originally Posted by Taiji View Post
    They can be used where the docudemons specifies 'unit attribute' as a parameter.
    Thanks Taiji. As far as I can see destroy_units is the only command with such a parameter. Plus - I think - these conditions:

    I_BattlePlayerArmyNumberOfAttribute
    I_BattleEnemyArmyNumberOfAttribute
    I_BattlePlayerArmyPercentageOfAttribute
    I_BattleEnemyArmyPercentageOfAttribute
    PercentageUnitAttribute

  13. #53
    semmes's Avatar Sukauto
    Join Date
    Sep 2011
    Posts
    50

    Default Re: The use of destroy_units in the campaign script

    And it would be possible to destroy units under a % of their original strength, or without a minimum number of soldiers? This would kill characters?

  14. #54
    Gigantus's Avatar Veni, Vici, Procudit
    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    27,686

    Default Re: The use of destroy_units in the campaign script

    destroy_units cannot be restricted in the sense of defining other attributes ( % of original strength) - either all the units with that attribute get removed\destroyed or none.

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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