I
ItzJamPakt
Guest
Okay, so im using this EXACT set of code in 3 different objects, however it only runs completely through in the object txt_bot_name. in the other 2 objects, (names are really irrelevant as they are never referenced in any code yet), they still run the first line of the outer-most if statement, "sprite_index=spr_text_box_selected", and also all of the code within the else statement, however none of the other if statements are checked. They work perfectly fine the object i mentioned, but these other 2 just wont work.
Here is the code:
Here is the code:
Code:
if (place_meeting(x,y,obj_mouse)) {
sprite_index=spr_text_box_selected
if(keyboard_check(vk_anykey) and string_length(text) < 20) {
text = text+string(keyboard_string);
keyboard_string = "";
}
if(keyboard_check(vk_backspace) and !keyboard_check_pressed(vk_backspace) and delete_timer = 2) {
text = string_delete(text,string_length(text),1);
delete_timer = 0;
keyboard_string = "";
}
if(keyboard_check_pressed(vk_backspace)) {
text = string_delete(text,string_length(text),1);
keyboard_string = "";
delete_timer = -4;
}
if(keyboard_check_pressed(vk_enter)) {
global.oauth = text
text = ""
keyboard_string = "";
}
//Handle Timer Update
if(delete_timer != 2) {
delete_timer ++;
}
}
else {
sprite_index=spr_text_box
keyboard_string=""
}