Results 1 to 7 of 7

Thread: Problem with event counter

Hybrid View

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

    Default Problem with event counter

    Hi.

    I'm trying to make a script for a special campaign, and my first objective is to launch a historic event in the first turn with the possibility to choose between two options for the human player. I've been trying different methods to implement the kingdoms option of _accepted/_declined, but I cannot find the method to obtain a result.

    This is the piece of script related with this subject:
    At the beginning of the script I add this event (in the same way it is done in the teutonic campaign with the conversion of lithuania.
    Code:
    		add_events
    			event counter desembarco_spain_accepted
    			event counter desembarco_spain_declined
    			date 0
    		end_add_events
    After that I define several counters for date control, nothing related with this question. Then I put:
    Code:
    	monitor_event FactionTurnEnd FactionIsLocal
    		and I_TurnNumber = 0
    
    		spawn_army 
    bla,bla,bla
    		end
    
    		historic_event desembarco_spain true
    
    	terminate_monitor
    	end_monitor
    After that there is a long piece of code related to dates and seasons that works perfectly.

    The result: when I press the end button of the first turn (turn zero?) the spawn_army works, the historic event appears, but without options.

    Any idea what is wrong with the script?:hmmm:

    P.D.: I've been also testing the options kill_character, move_character, reposition_character, but none of them work properly, at least with characters from descr_strat, as the script is not able to recognize those characters (from system.log error report).:hmmm:

  2. #2
    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: Problem with event counter

    Do you have the counters in the same monitor as the historic_event line? Thats where it should be.

    With the other commands, are you using console_command in front of them?

    Code:
        monitor_event FactionTurnEnd FactionIsLocal
            and I_TurnNumber = 0
     
            spawn_army 
    bla,bla,bla
            end
         add_events
                event counter desembarco_spain_accepted
                event counter desembarco_spain_declined
                date 0
            end_add_events
         historic_event desembarco_spain true
     
        terminate_monitor
        end_monitor

  3. #3

    Default Re: Problem with event counter

    Tried and not working.

    This was the first method I used, but just in case I've just tried it again.

    Any problem with the syntax?:hmmm:
    Any limit with the moment the event is fired? :hmmm:

  4. #4

    Default Re: Problem with event counter

    Hello Monkwarrior!

    Code:
    		add_events
    			event counter desembarco_spain_accepted
    			event counter desembarco_spain_declined
    			date 0
    		end_add_events
    The entry above is not necessary. I have no idea why CA have put that into their scripts.

    I have only tried that command on 'FactionTurnStart' and 'CharacterTurnStart', and always with a specific faction.

    Like this:

    Code:
    			historic_event desembarco_spain true factions { spain, }
    This works flawless for me.


    Cheers,
    D.


    P.S.: This works with Kingdoms only, but I guess you'll know that.

    Retired creator of 'Das Heilige Römische Reich' - Get v. 0.7 here.
    -------------------------------------------------------------
    Visit my homepage.
    --------------------------------------------
    Proud son of jimkatalanos, grandson of Garbarsardar and father of DerDiskusWerfer and HannibalExMachina.

  5. #5

    Default Re: Problem with event counter

    I cannot make it work.
    Anyway, my idea for further options in the script wont work (I presumed that some old RTW commands would work in M2TW but I was wrong).

    I'm going to change the starting point of the campaign.:hmmm:

  6. #6
    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: Problem with event counter

    Work in small steps, esecially when trying something new. Dont try the new thing and old commands and this and that all at once. Get one section working, then add the next.

  7. #7

    Default Re: Problem with event counter

    There is a tutorial here by J@mes which is pretty good if you doing an event accept/decline

Posting Permissions

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