A
Artintheblankvoid001
Guest
Basically, I'm trying to get a character, Naomi, to say one thing when the player bumps into her, and if he does it twice more, Naomi chases the player. How would I do that?
bumped = 0;
if place_meeting(x,y,obj_player)
{
bumped++;
if (bumped = 1)
{
// do something
}
if (bumped = 2)
{
// do something else
}
if (bumped = 3)
{
// do something
bumped = 0; // resets the bump count
}
}
bumped = 0;
my_text = "";
if place_meeting(x,y,obj_Player)
{
bumped++;
if (bumped = 1)
{
my_text = "Oh! Do be careful!" ;
}
if (bumped = 2)
{
my_text = "Samuel... are you doing this deliberately?";
}
if (bumped = 3)
{
my_text = "...";
}
if (bumped = 4)
{
my_text = ,"THAT IS ENOUGH!" ;
bumped = 0;
}
}
draw_text(x,32, string(my_text));
obj_Naomi draw eventNaomi disappeared...
draw_text(x,32, string(my_text));
draw_self();