Master Cabalist
Member
Ho
This is probably a kind of rookie question but I Have this character, Dr. Frankenstein, that sits on top of a castle. He sends out enemy floating brains you have to fight. I want to make it so Dr. Frankenstein plays a short animation every time he sends out a brain. My problem is that he either plays the animation over and over and over again, or not at all.
The brains are controlled by a "Brain Master" object and this is its step method:
This is Dr. Frankenstein's Step Event:::
This is probably a kind of rookie question but I Have this character, Dr. Frankenstein, that sits on top of a castle. He sends out enemy floating brains you have to fight. I want to make it so Dr. Frankenstein plays a short animation every time he sends out a brain. My problem is that he either plays the animation over and over and over again, or not at all.
The brains are controlled by a "Brain Master" object and this is its step method:
Code:
if ((global.number_of_brains_on_screen <= global.max_number_of_brains))
{
//show_debug_message("Checking instance place");
random_y = random_range(200,700);
if (!instance_place(x, random_y, BigBrainObject))
{
timer--;
//if (timer < 0)
//{
//show_debug_message("Creating Brain");
global.creating_brain = true;
instance_create_depth(2077, random_y, -1800,BigBrainObject);
global.number_of_brains_on_screen++;
//}
if (timer > 0)
{
global.creating_brain = false;
}
else
{
timer = room_speed;
}
}
}
}
Code:
if (global.creating_brain)
{
sprite_index = FrankensteinSendOutBrains;
}
else {
sprite_index = FrankensteinStatic;
}