Frictional Games Forum (read-only)

Full Version: How to set a Global (Random) Integer?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Would this work?

SetGlobalVarInt("buy_a", RandInt(7, 12));
SetGlobalVarInt("buy_b", RandInt(8, 14));
SetGlobalVarInt("buy_c", RandInt(3, 7));
SetGlobalVarInt("buy_d", RandInt(2, 6));

I want to set each GlobalVarInt to a Random Integer.

Thank you! Big Grin
Yes, that would work.

Also, here's a tip: when you are scripting (or just programming in general) and you're not sure if something will work, just try it. It's not like you're computer will go up in flames if it doesn't work.