Results 1 to 11 of 11

Thread: Help with kill script

Hybrid View

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

    Default Help with kill script

    Could someone help me out with this kill script? Trying to kill Scotland's Leader "Dabid mac_Donnchada" at turn 2.

    From my campaign_script
    Code:
    ;=======My Kill Script
    
    monitor_event FactionTurnStart FactionIsLocal
    and I_TurnNumber = 2
    if I_LocalFaction scotland
    kill_character DABID1
    end_if
    end_monitor
    From my descr_strat
    Code:
    character	Dabid mac_Donnchada, named character, male, leader, age 80, x 59, y 248 , label DABID1

    Thanks in advance for any help.

    Cheers,

    Ronnie

  2. #2

    Icon1 Re: Help with kill script

    ronnie76: Try this:
    Spoiler Alert, click show to read: 
    Code:
    ;=======My Kill Script
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and I_TurnNumber = 1
    		if I_LocalFaction scotland
    		kill_character dabid1
    	end_if
    	end_monitor
    Code:
    character	Dabid mac_Donnchada, named character, male, leader, age 80, x 59, y 248 , label dabid1

  3. #3

    Default Re: Help with kill script

    Quote Originally Posted by TNZ View Post
    ronnie76: Try this:
    Spoiler Alert, click show to read: 
    Code:
    ;=======My Kill Script
    
    	monitor_event FactionTurnStart FactionIsLocal
    		and I_TurnNumber = 1
    		if I_LocalFaction scotland
    		kill_character dabid1
    	end_if
    	end_monitor
    Code:
    character	Dabid mac_Donnchada, named character, male, leader, age 80, x 59, y 248 , label dabid1
    Thanks o much for the help TNZ, but it does not appear to be killing the stubborn old buggar.

    Looks like the script is firing but he is still alive.

    From my log
    Code:
    20:00:59.156 [game.script.exec] [trace] exec <if> at line 39 in mods/SS6.4 Meneth/data/world/maps/campaign/imperial_campaign/campaign_script.txt
    20:00:59.156 [game.script.exec] [trace] exec <kill_character> at line 39 in mods/SS6.4 Meneth/data/world/maps/campaign/imperial_campaign/campaign_script.txt

  4. #4

    Default Re: Help with kill script

    Try now:
    Code:
    	monitor_event FactionTurnStart FactionIsLocal
    		and I_TurnNumber = 1
    		if I_LocalFaction scotland
    		console_command kill_character dabid1
    	end_if
    	end_monitor
    You forgot the console command.

  5. #5
    Emperor of Hell's Avatar SPA-NED 1-5
    Join Date
    Jul 2011
    Location
    Netherlands
    Posts
    5,747

    Default Re: Help with kill script

    That's not necessary, there is also a script command "kill_character"
    docudemons:
    Code:
    	Identifier:	kill_character
    	Parameters:	character
    	Description:	Kill the character
    	Sample use:	kill_character Gaius Maximus
    	Class:	KILL_CHARACTER

  6. #6

    Default Re: Help with kill script

    I know, TNZ's script was fine i was reminding that there is also a console command one if it's not working for ronnie.

  7. #7

    Default Re: Help with kill script

    Thanks everyone for the help.

    Got it working both ways. I think it was a problem with where I put the Kill Script in my campaign_script file. Putting it at the end just before the "wait_monitors" line seems to have fixed it.

    Anyway, thanks again so much for your help.

    @Ishan,

    I'm still doing tests with the size of the names bin and should have some results to report this evening.

    Cheers,

    Ronnie

  8. #8

  9. #9
    Emperor of Hell's Avatar SPA-NED 1-5
    Join Date
    Jul 2011
    Location
    Netherlands
    Posts
    5,747

    Default Re: Help with kill script

    You should put every script before the wait_monitors line

  10. #10

    Default Re: Help with kill script

    Quote Originally Posted by killersmurf View Post
    You should put every script before the wait_monitors line
    I originally had it at the beginning after the line below which meant that it was before the wait_monitors line in my original trials.

    If it had been after the wait_monitors line it never would have fired correct?

    Spoiler Alert, click show to read: 
    ;========================================================
    ;=============== AI STUFF & CAMP PREPARE ================
    ;========================================================
    script
    restrict_strat_radar false

  11. #11
    Emperor of Hell's Avatar SPA-NED 1-5
    Join Date
    Jul 2011
    Location
    Netherlands
    Posts
    5,747

    Default Re: Help with kill script

    If it had been after the wait_monitors line it never would have fired correct?
    Yup

Posting Permissions

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