Results 1 to 3 of 3

Thread: Rare events

Hybrid View

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

    Default Rare events

    Hello,

    if I want something to happen very rarely, say in 1 out of 1000 turns, would this do it?

    Code:
    monitor_event [event]
              [conditions]
                          if RandomPercent < 1
                              if RandomPercent < 10
                          [very rare things happen]
                          end_if
                    end_if
    end_monitor

  2. #2
    Squid's Avatar Opifex
    Patrician Artifex Technical Staff

    Join Date
    Feb 2007
    Location
    Frozen waste lands of the north
    Posts
    17,751
    Blog Entries
    3

    Default Re: Rare events

    Quote Originally Posted by chrisb View Post
    Hello,

    if I want something to happen very rarely, say in 1 out of 1000 turns, would this do it?

    Code:
    monitor_event [event]
              [conditions]
              andif RandomPercent < 1
                  andif RandomPercent < 10
                      [very rare things happen]
                          end_if
                    end_if
    end_monitor
    Yes but it could be better written with the above changes.
    Under the patronage of Roman_Man#3, Patron of Ishan
    Click for my tools and tutorials
    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." -----Albert Einstein

  3. #3

    Default Re: Rare events

    Ok, thanks a lot!

Posting Permissions

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