• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM I have a small issue with a object

E

EZTALES

Guest
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!
 
D

Dennis Ross Tudor Jr

Guest
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]=""
    }
  }
 
E

EZTALES

Guest
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!
 
E

EZTALES

Guest
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