heyimfrisk
Member
It works when it's the same object, or multiple of the same object in the room, but as soon as I duplicate it, the duplicated object doesn't recognise ANY of the variables.
Error:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object object7:
Variable object7.endtextbox(100016, -2147483648) not set before reading it.
at gml_Object_object7_DrawGUI_1 (line 1) - if endtextbox = false{
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_object7_DrawGUI_1 (line 1)
Create:
Step:
Interact with player object ("Frisk"):
Draw GUI:
Error:
___________________________________________
############################################################################################
FATAL ERROR in
action number 1
of Draw Event
for object object7:
Variable object7.endtextbox(100016, -2147483648) not set before reading it.
at gml_Object_object7_DrawGUI_1 (line 1) - if endtextbox = false{
############################################################################################
--------------------------------------------------------------------------------------------
stack frame is
gml_Object_object7_DrawGUI_1 (line 1)
Create:
GML:
endtextbox = true
begintext = false
draw_set_font(font0)
txt_num = 0
draw_set_color(c_white)
//this is how long the text can beeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee//
txt[1] = 'This is a text test :)'
txt[2] = ". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ."
amountoftxts = 2
time = 0
txt1 = ""
exited = true
textbox = false
textboxopen = false
canskip = false
textboxdown = false
GML:
if place_meeting(x,y,Frisk){
if endtextbox = false{
textboxopen = false
if begintext = true{
if keyboard_check_pressed(ord("X")) or keyboard_check_pressed(vk_shift){
time = time + 100000
}
else{
if txt1 != txt[current]{
time = time + 1.5
}}
if txt1 = txt[current]{
canskip = true
}
else{
canskip = false
}
if keyboard_check_pressed(ord("Z"))
if canskip = true{
{
time = 0
txt_num = txt_num + 1
current += 1
global.textbox = true
txt1 = ""
}}
if txt_num < amountoftxts{
global.canwalk = false
global.textbox = true
}
if txt_num > amountoftxts{
global.canwalk = true
global.textbox = false
textboxopen = false
endtextbox = true
textbox = false
}
else{txt1 = string_copy(txt[txt_num], 0, time/3)}}
if begintext = true{
Frisk.image_index = 0
}
}
}
if Frisk.y > room_height / 2 {
textboxdown = true
}
else{
textboxdown = false
}
GML:
if txt_num = 0 {
if keyboard_check_pressed(ord('Z')){
if textboxopen = false{
begintext = true
txt_num = 1
global.canwalk = false
endtextbox = false
current = 1
}}
}
if txt_num > amountoftxts{
if keyboard_check_pressed(ord('Z')){
begintext = true
global.canwalk = true
endtextbox = true
current = 0
txt_num = 0
}
}
GML:
if endtextbox = false{
if textboxdown = 0{ // Draw the text box below//
draw_set_font(font0)
draw_set_color(c_white)
draw_rectangle(32,320,609,471,0)
draw_set_color(c_black)
draw_rectangle(38,326,603,465,0)
draw_set_color(c_white)
draw_text_ext(60,340,"*",40,450)
draw_text_ext(90,340,txt1,36,475)
}
if textboxdown = 1{ //Draw the text box on top
draw_set_font(font0)
draw_set_color(c_white)
draw_rectangle(32,10,609,161,0)
draw_set_color(c_black)
draw_rectangle(38,16,603,155,0)
draw_set_color(c_white)
draw_text_ext(60,30,"*",40,450)
draw_text_ext(90,30,txt1,36,475)
}
}