hello, I want to make a code that makes the system automatically decide one of those objects that I put in the parentheses of choose when the animation ends, but the system always chooses the same sequence of numbers. if I close and open the game, it
gives 5, if I just reset the room it gives 2, but if I close the game and open it again, it will give me 5 again and when I reset the room it will give me 2 again , how do I solve this problem?
gives 5, if I just reset the room it gives 2, but if I close the game and open it again, it will give me 5 again and when I reset the room it will give me 2 again , how do I solve this problem?
GML:
if sprite_index = spr_dado_choose{
if ev_animation_end{
global.player_dado = choose(spr_dado_01, spr_dado_02, spr_dado_03, spr_dado_04, spr_dado_05, spr_dado_06)
if (global.player_dado == spr_dado_01){
sprite_index = spr_dado_01
global.player_value = 1
}
if (global.player_dado == spr_dado_02){
sprite_index = spr_dado_02
global.player_value = 2
}
if (global.player_dado == spr_dado_03){
sprite_index = spr_dado_03
global.player_value = 3
}
if (global.player_dado == spr_dado_04){
sprite_index = spr_dado_04
global.player_value = 4
}
if (global.player_dado == spr_dado_05){
sprite_index = spr_dado_05
global.player_value = 5
}
if (global.player_dado == spr_dado_06){
sprite_index = spr_dado_06
global.player_value = 6
}
}
}