random

From Bohemia Interactive Community
Revision as of 01:53, 3 August 2006 by Hoz (talk | contribs) (moved command to template, MP behavior needs updating.)
Jump to navigation Jump to search


{{Command|= Comments ____________________________________________________________________________________________

| ofp |= Game name

|1.00|= Game version ____________________________________________________________________________________________

| Random real value from 0 to x. |= Description ____________________________________________________________________________________________

| random x |= Syntax

|p1= x: Number |= Parameter 1

| Number |= Return value ____________________________________________________________________________________________

|x1=

_rNumber = random 1 
|= Example 1
____________________________________________________________________________________________

|  |= See also

}}

<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->

Be careful using random numbers in multiplayer, each client will come up with a different result. See multiplayer tutorials for more general information about locality. 
The number returned is unlikely to be a whole number (e.g. 1, 4, 76, etc.). To return a whole number combine '''random''' and [[mod]]:

Bottom Section