Ifrnd: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
One (talk | contribs)
No edit summary
One (talk | contribs)
No edit summary
Line 1: Line 1:
'''ifrnd''' <value> { <do somethin!> }
'''ifrnd''' <value> { do something } else { do something else }


An [[if condition]] stating the probability of it 'doin somethin!' in this case.
An [[if condition]] stating the probability of it 'doin somethin!' in this case.

Revision as of 12:54, 4 May 2009

ifrnd <value> { do something } else { do something else }

An if condition stating the probability of it 'doin somethin!' in this case.

NOTE: It's out of 256 as max, so 'ifrnd 256 = 100%', and 'ifrnd 128 = 50%'

This command must only be used in synchronised code or you will cause desyncs. for display code use displayrand instead.