First of all, the function randomize(); should be used once like when the game opens. This does not influence your random directly, it just randomly create a seed from which the random in the game will come from.
Second, when you test your build, you will always get the same seed. Its a debugging feature. If you'd play your game for real, its gonna be different each time.
Create Event:
Code:
showtext=false;
name=0;
alarm[0]=number of steps;
Draw Event:
Code:
if(showtext==true)
then
{
draw_text(name, etc);
}
Alarm[0]:
Code:
name=choose(name1,name2,name3);
if(showtext==false)
then
{
showtext=true;
alarm[0]=number of steps;
}
else
{
showtext=false;
alarm[0]=number of steps;
}
So basically, here is the explanation:
"name" should be declared in the Create Event so it can be used in any event in that object.
The draw event only need to draw "name" when it is allowed, nothing else.
Since you want the variable "name" to contain a different name each time the permission to draw is given, set it in the corresponding alarm.
The alarm sets the permission to true of false, depending the situation. No need to waste 2 alarms.
Lastly, notice I call the alarm again within the alarm. My example there is made so if you want a different wait time for when the permission is "true" and the permission is "false", you can put a different "amount of steps". If you always want to same amount of time, simply put one line at the end calling the alarm anew.