Sign in to follow this  
Followers 0
Hezrou

DMS static random reinforcement

2 posts in this topic

Hi all.

I would like to be able to set the reinforcements on the Saltflats and Slums to random amount of waves. Is there a way of doing this? Like to keep our players on thier toes.

Is this possible?

Share this post


Link to post
Share on other sites
2 hours ago, Hezrou said:

Hi all.

I would like to be able to set the reinforcements on the Saltflats and Slums to random amount of waves. Is there a way of doing this? Like to keep our players on thier toes.

Is this possible?

its fairly simple

1. Define private variable at top of file

private ["_Randwave"];

2. Generate random number and round it to nearest integer > example would generate possible 1 to 5 waves

_Randwave= (1+(round (random 4)));

3. Use variable to call waves instead of number

Quote

// Define the group reinforcements
_groupReinforcementsInfo =
[
 [
  _group,   // pass the group
  [
   [
    _Randwave,  //random wave call
    0
   ],
   [
    -1,  // No need to limit the number of units since we're limiting "waves"
    0
   ]
  ],

 

1 person likes this

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.