RandomPick is only called once in this case, and sending its value to the
A_FireBullets damage calculation. Or put another way, you can't send a function into another function, only a value.
RandomPick is selecting a random value to pass as the
damage parameter into
A_FireBullets.
I'll try to clarify because I imagine this can be a little confusing.
What you're thinking is supposed to happen:
Code: Select all
randompick(5, 10, 10, 15) * 1 bullet
randompick(5, 10, 10, 15) * 1 bullet
randompick(5, 10, 10, 15) * 1 bullet
randompick(5, 10, 10, 15) * 1 bullet
...
What's actually happening:
Code: Select all
A_FireBullets(14, 8, 40, randompick(5, 10, 10, 15), "NewBulletPuff", FBF_NORANDOM);
// becomes |
A_FireBullets(14, 8, 40, 5 , "NewBulletPuff", FBF_NORANDOM);
5 * 1 bullet
5 * 1 bullet
5 * 1 bullet
5 * 1 bullet
...
EDIT: Keks explained it better than me I think.
