Legacy GM I have a small issue with a object

EZTALES

Member
so i downloaded

this textbox engine and its working fine, but the issue im having is when the text is finished, it deletes itself. all i want it to do is get rid of the text, not the whole object. heres the code /(sorry if Ive been a bit of a nuisance online)
Code:
if (place_meeting(x,y,obj_player)) && (keyboard_check(ord("Z")))
imax=string_length(str[text])
if i<imax
{
i+=1
}

//for people who like z
if keyboard_check_pressed(ord('Z'))
{
if text=textmax{
if i=imax{
  instance_destroy();
}
}
else
{
 if text<textmax{
  if i=imax
   {
   text+=1
   i=0

   }
   }
 else
  {

  }
 }
}
(obj_testtext)
Step Event
//for people who like x
if keyboard_check_pressed(ord('X'))
{
 i=imax
}
Code:
(obj_interact)
Create Event:
(applies to self) Set Variable interaction to 0
End Step
(applies to self) Set Variable interaction to +1
(applies to self) If interaction is greater or equal to 6
destroy self
PLEASE HELP!
 
It's hard to know where to start. But the only place I saw that has to do with destroying the object is in the (Z) key part of the script.
Code:
//for people who like z
if keyboard_check_pressed(ord('Z'))
{
  if text=textmax{
    if i=imax{
      instance_destroy(); // <-- change this to str[text]=""
    }
  }
 

EZTALES

Member
It's hard to know where to start. But the only place I saw that has to do with destroying the object is in the (Z) key part of the script.
Code:
//for people who like z
if keyboard_check_pressed(ord('Z'))
{
  if text=textmax{
    if i=imax{
      instance_destroy(); // <-- change this to str[text]=""
    }
  }
ill give it a try, thanks!
 

EZTALES

Member
It's hard to know where to start. But the only place I saw that has to do with destroying the object is in the (Z) key part of the script.
Code:
//for people who like z
if keyboard_check_pressed(ord('Z'))
{
  if text=textmax{
    if i=imax{
      instance_destroy(); // <-- change this to str[text]=""
    }
  }
sorry didnt work, what happened was at the last line of text it didnt close
 
Top