Script question

  1. 8 years ago
    Edited 8 years ago by eric963

    I have this entry in my init.sqf

    RydFFE_Interval = 120;

    It's part of an artillery/mortar script and tell it to check for targets every 120 seconds. I want to set it to a random range of seconds like (120 - 240) is there some type of random function I can put in its place?

    Can anyone assist me with this?

    Thanks

  2. _delay = 120 + (random 120)

  3. So would I just change it to

    RydFFE-Intrval = 120 + (random 120)

  4. Edited 8 years ago by SpyderBlack723

    Yes, it'll have a base time of at least 120 seconds and then a random number up to 120 added onto it.

    Of course make sure you add the ; onto the end of that line if it's not already

  5. Thanks a bunch!!

 

or Sign Up to reply!