random: Difference between revisions
Jump to navigation
Jump to search
m (How to get whole number) |
m (moved command to template, MP behavior needs updating.) |
||
Line 4: | Line 4: | ||
[[Category:Scripting Commands ArmA|RANDOM]] | [[Category:Scripting Commands ArmA|RANDOM]] | ||
{{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]] | | [[Number]] |= Return value | ||
____________________________________________________________________________________________ | |||
|x1= <pre>_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]]:</pre> | |||
<!-- Note Section END --> | |||
</dl> | |||
<h3 style="display:none">Bottom Section</h3> | |||
</ |
Revision as of 01:53, 3 August 2006
{{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]]: