Quote:
Originally Posted by Fr33m@n
difference between random_num and random_float ??
I want to know what is the difference.
if i have :
cvars
slap_pct 0.10
register_cvar("slap_pct", "0.05")
on this small part of my hero
if ( random_???( 0.00, 1.00 ) <= get_cvar_float("slap_pct"))
{
user_slap(victim,0)
user_slap(victim,0)
user_slap(victim,0)
}
Witch is the best ???
Thanks to help me ^^
(sorry for my bad english)
|
Float = Decimal number.
Integer = Rounded number.
1 is an Integer.
1.0 is a Float.
0.00 and 1.00 are floats, therefore:
Code:
random_float(0.00, 1.00);
__________________