Displayrand: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Hendricks266 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
'''displayrand''' <gamevar> | '''displayrand''' <gamevar><br> | ||
'''displayrandvar''' <gamevar> <value><br> | |||
'''displayrandvarvar''' <gamevar> <value> | |||
This function generates a random number and assigns it to <gamevar>. | This function generates a random number and assigns it to <gamevar>. | ||
The '''displayrandvar''' commands limit the number to be between 0 and <value>. | |||
'''displayrandvarvar''' takes a [[gamevar]] rather than a constant or a [[define]]d label for <value>. | |||
Since this function is sync safe, it can be used in unsynchronized code. | Since this function is sync safe, it can be used in unsynchronized code. | ||
See | See [[randomseed]]. | ||
[[Category:EDuke32 specific commands]] | [[Category:EDuke32 specific commands]] | ||
[[Category:Gamevar manipulation]] | [[Category:Gamevar manipulation]] |
Revision as of 18:42, 24 February 2011
displayrand <gamevar>
displayrandvar <gamevar> <value>
displayrandvarvar <gamevar> <value>
This function generates a random number and assigns it to <gamevar>.
The displayrandvar commands limit the number to be between 0 and <value>.
displayrandvarvar takes a gamevar rather than a constant or a defined label for <value>.
Since this function is sync safe, it can be used in unsynchronized code.
See randomseed.