But I want the result of choose_way() to be the same once called. Let's say I want the result in 4 actions, I can't use the way you showed cause the action is calling choose_way(), so if in my second action I call choose_way again, it will generate a new random number?


Yeah! IE sucks, use Mozilla...
Marc Rémillard.