Page 1 of 2 12 LastLast
Results 1 to 20 of 29

Thread: how to kill a factionleader by campaign_script ?

Hybrid View

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

    Default how to kill a factionleader by campaign_script ?

    as you know, Baldwin de Jurusalem was dead by Leprosy.

    i'm just a bird about campaign_script , so....help me:hmmm:


    monitor_conditions I_TurnNumber = 2
    and not I_CharacterExists Baldwin de Jurusalem
    console_command kill_character "Baldwin de Jurusalem"
    terminate_monitor
    end_monitor
    where is wrong?

  2. #2

    Default Re: how to kill a factionleader by campaign_script ?

    Try using "Baldwin de_Jerusalem".

    Dominion of the Sword, a Medieval II: Total War Supermod
    Under the patronage of Archaon. Proud member of the House of Siblesz
    My friend died from chain letters. If you don't post this again 100 times, he will come and kill you in your sleep!

  3. #3
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: how to kill a factionleader by campaign_script ?

    You have the "not" condition wrong. What your script says is:

    If Baldwin de Jurusalem doesnt exist
    kill Baldwin de Jurusalem

  4. #4

    Default Re: how to kill a factionleader by campaign_script ?

    @GrnEyedDvl

    it means that , if he dead by wars...before "TurnNumber = 2" this script will be stopped..

  5. #5
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: how to kill a factionleader by campaign_script ?

    Quote Originally Posted by Himitu View Post
    @GrnEyedDvl

    it means that , if he dead by wars...before "TurnNumber = 2" this script will be stopped..
    No, thats not what it says, though you may have intended it to say that.

    What it says exactly is:


    Code:
    monitor_conditions I_TurnNumber = 2  - when TurnNumber = 2
    and not I_CharacterExists Baldwin de Jurusalem - and CharacterExists Baldwin de Jerusalem = false
    console_command kill_character "Baldwin de Jurusalem" - kill character
    terminate_monitor
    end_monitor

  6. #6

    Default Re: how to kill a factionleader by campaign_script ?

    No, this won't cause a script error. Console commands do not throw errors when they fail to work.

    Dominion of the Sword, a Medieval II: Total War Supermod
    Under the patronage of Archaon. Proud member of the House of Siblesz
    My friend died from chain letters. If you don't post this again 100 times, he will come and kill you in your sleep!

  7. #7

    Default Re: how to kill a factionleader by campaign_script ?

    omg...thank everybody who help me.

    i will fix it when i'm free. and if i make any mistake after now, please help me again..thanks again!

  8. #8
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: how to kill a factionleader by campaign_script ?

    If you remove the "not", it should run.

  9. #9

    Default Re: how to kill a factionleader by campaign_script ?

    give me some help..

    i remove the "not"

    but he wasn't dead...........

  10. #10

    Default Re: how to kill a factionleader by campaign_script ?

    descr_strat

    character Baldwin de Juresalem, named character, male, leader, age 19, x 99, y 99, portrait baldwin
    traits Factionleader 1 , GoodCommander 4 , PublicFaith 2 , BattleChivalry 2 , StrategyChivalry 2 , ReligionStarter 2
    why he cant be dead...

  11. #11
    GrnEyedDvl's Avatar Liberalism is a Socially Transmitted Disease
    Artifex Technical Staff

    Join Date
    Jan 2007
    Location
    Denver CO
    Posts
    23,851
    Blog Entries
    10

    Default Re: how to kill a factionleader by campaign_script ?

    You have it spelled wrong.

    Baldwin de Jurusalem in script
    Baldwin de Juresalem in descr_strat

  12. #12

    Default Re: how to kill a factionleader by campaign_script ?

    Give him a label in descr_strat and things would be even easier for you.

  13. #13

    Default Re: how to kill a factionleader by campaign_script ?

    Quote Originally Posted by GrnEyedDvl View Post
    You have it spelled wrong.

    Baldwin de Jurusalem in script
    Baldwin de Juresalem in descr_strat

    i want to kill myself ..thank you very much..

    but it didnt run again...

    Give him a label in descr_strat and things would be even easier for you.
    i will try to give a label,thank you.
    Last edited by Himitu; October 30, 2008 at 01:27 AM.

  14. #14
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,233

    Default Re: how to kill a factionleader by campaign_script ?

    How you give a label?

    And I think "Baldwin de Jerusalem" with " " is needed for long names.
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  15. #15
    Agis Tournas's Avatar ★ Modder-at-Arms ★
    Join Date
    May 2008
    Location
    Athens, Hellas
    Posts
    1,714

    Default Re: how to kill a factionleader by campaign_script ?

    Try the following
    (Tested and working)

    monitor_event FactionTurnStart FactionIsLocal
    and I_TurnNumber = 10
    if I_LocalFaction elo
    kill_character BAUDOUIN4
    end_if
    end_monitor
    console_command is not needed for the command kill_character.
    BAUDOUIN4 is the label I use in my games, for BAUDOUIN IV of Jerusalem in the descr_strat.txt

    NOTE: label means that in descr_strat.txt (at the imperial_campaign folder of your game installation) your faction leader (Baudouin IV of Jerusalem) should look like this:
    character BAUDOUIN_IV of Jerusalem, named character, male, leader, age 16, x 189, y 261 , label BAUDOUIN4

    Hope to have been useful
    Agis
    Last edited by Agis Tournas; November 14, 2008 at 09:43 AM.
    A mini-mod is never late! Nor is it ever early. It arrives precisely when I mean it to do!


    Son of Agisilaos / Grandson of jimkatalanos / Great-grandson of Garbarsardar





  16. #16

    Default Re: how to kill a factionleader by campaign_script ?

    thank Agis very much

    a little question

    character BAUDOUIN_IV of Jerusalem, named character, male, leader, age 16, x 189, y 261 , label BAUDOUIN_IV

    BAUDOUIN_IV of Jerusalem & label BAUDOUIN_IV

    these need the same? i mean that "BAUDOUIN_IV" before and behind is the same ?

  17. #17
    Agis Tournas's Avatar ★ Modder-at-Arms ★
    Join Date
    May 2008
    Location
    Athens, Hellas
    Posts
    1,714

    Default Re: how to kill a factionleader by campaign_script ?

    Quote Originally Posted by Himitu View Post
    thank Agis very much

    a little question

    character BAUDOUIN_IV of Jerusalem, named character, male, leader, age 16, x 189, y 261 , label BAUDOUIN_IV

    BAUDOUIN_IV of Jerusalem & label BAUDOUIN_IV

    these need the same? i mean that "BAUDOUIN_IV" before and behind is the same ?
    No, there is no need to be the same
    You can make it look like this:
    character BAUDOUIN_IV of Jerusalem, named character, male, leader, age 16, x 189, y 261 , label BAUDOUIN4
    It is better to put a number in the label (BAUDOUIN4), so the game will not confuse it with any other character which could have the same name
    A mini-mod is never late! Nor is it ever early. It arrives precisely when I mean it to do!


    Son of Agisilaos / Grandson of jimkatalanos / Great-grandson of Garbarsardar





  18. #18

    Default Re: how to kill a factionleader by campaign_script ?

    thanks again.

    i learned so much

  19. #19
    alhoon's Avatar Comes Rei Militaris
    Join Date
    Apr 2008
    Location
    Chania, Greece
    Posts
    24,233

    Default Re: how to kill a factionleader by campaign_script ?

    A late but sincere "thank you"
    alhoon is not a member of the infamous Hoons: a (fictional) nazi-sympathizer KKK clan. Of course, no Hoon would openly admit affiliation to the uninitiated.
    "Angry Uncle Gordon" describes me well.
    _______________________________________________________
    Beta-tester for Darthmod Empire, the default modification for Empire Total War that does not ask for your money behind patreon.
    Developer of Causa Belli submod for Darthmod, headed by Hammeredalways and a ton of other people.
    Developer of LtC: Random maps submod for Lands to Conquer (that brings a multitude of random maps and other features).

  20. #20

    Default Re: how to kill a factionleader by campaign_script ?

    Is there a way how to kill faction leader wihotut even knowing his name?

Page 1 of 2 12 LastLast

Posting Permissions

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