Theme: Light
#41
Posted 29 February 2008 - 08:04 AM
If I'm not wrong it looks like a LinkedList as GameModifiers Field in GameInfo is also a GameRule.
My question is: Why not maintaining a vector of GameRules and loop on this vector when a method of the GameRule must be called ??
It doesn't matter just need to pay attention to "Mutator Compatibility" next time
#42
Posted 29 February 2008 - 09:57 AM
#43
Posted 29 February 2008 - 10:11 AM
Wow I just take a look at MoDB, you add 4 tutorials !! Do you sleep sometimes or do you work on this all day ? :o
#44
Posted 29 February 2008 - 11:15 AM
But, right now I'm tying to work out how to generate a random number in UnrealScript instead..
Edited by ambershee, 29 February 2008 - 11:16 AM.
#45
Posted 29 February 2008 - 11:40 AM
you got two methods in Object class which do this:
native(167) static final function int Rand ( int Max ) Rand will give you a value between 0 and Max -1
static final simulated function float RandRange ( float InMin, float InMax ) ) Return a random number within the given range.
#46
Posted 29 February 2008 - 01:30 PM
A number generated at random - like rolling a dice for example, you don't know what number you will get.Not sure to understand, what is random number ??
native(167) static final function int Rand ( int Max ) Rand will give you a value between 0 and Max -1
Only useful if you have two or three options.
static final simulated function float RandRange ( float InMin, float InMax ) ) Return a random number within the given range.
I'm using this at present. I also use % GameTime to do some other number generating too.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users