Results 1 to 4 of 4

Thread: Disasters by script.Need Help

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Werebear's Avatar For Mother Russia
    Join Date
    Jan 2007
    Location
    Russia, Moscow
    Posts
    2,519

    Default Disasters by script.Need Help

    Whether there is a way to realise disasters (flood, storm, earthquake) by script?

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: Disasters by script.Need Help

    Descr_events works with dates and co ordinates.

    Code:
    event    earthquake    earthquake_in_silicia
    date    188
    position    232, 76
    Maybe you can create a trigger with something like event_earthquake in it. I believe event_historic works. (And what the heck do I know about scripting)










  3. #3
    Augustus Lucifer's Avatar Life = Like a beanstalk
    Patrician Citizen

    Join Date
    Aug 2006
    Location
    Mote of Dust
    Posts
    10,725

    Default Re: Disasters by script.Need Help

    Scripted events use the same properties as the descr_events. You would say:

    Code:
    monitor_event FactionTurnStart FactionIsLocal
        and I_TurnNumber = 60
     add_events
        event earthquake event_string_here ;must be an entry in historic_events.txt in data/text
        date 0
     end_add_events
    end_monitor
    But here's the problem. I've never used disasters via scripting, the one thing the descr_events has which scripting might have, but if it does isn't listed anywhere, is position. You can try this, but I can't guarantee it will work:
    Code:
    monitor_event FactionTurnStart FactionIsLocal
        and I_TurnNumber = 60
     add_events
        event earthquake event_string_here ;must be an entry in historic_events.txt in data/text
        date 0
        position 169, 151
     end_add_events
    end_monitor
    That follows the syntax of the descr_events but has never been actually used in a script for reference. In an ideal world that would work, but this is the TW world where lines that work on the building level of the EDB don't work on the recruit_pool level, so it's entirely possible it won't work. Date 0 means spawn the event immediately, so you'd want to specify the immediate time. If you want like an earthquake warning or w/e that should be possible as well, but I'd make sure it works first before making it more complex.

  4. #4
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default Re: Disasters by script.Need Help

    Fun stuff, +rep.


    "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

Posting Permissions

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