W
Warianos
Guest
Guys im making a cut-scene with 3 characters in it. I have a script that creates an obj_text with a text box and some animation.
The problem now is that i want to fast forward the animation of only the textBox that is appearing on the screen.
For that i´m doing another script that will receive the character´s obj that will speak, and detect if an object with the name "txt" is created inside that character. The problem here is that if the text box is not yet created this does not work.
//obj,speedText
if(object_exists(argument0)){
with(argument0){
if(instance_exists(argument0.txt)){
with(txt){
if (spd = 10){
instance_destroy();
timeline_position = timeline_position + 1
}
else{
spd = argument1;
}
}
}
}
}
Other problem is that if i just go and change
if(object_exists(argument0)){
with(argument0){
if(instance_exists(obj_text)){
with(obj_text){
if (spd = 10){
instance_destroy();
timeline_position = timeline_position + 1
}
else{
spd = argument1;
}
}
}
}
}
The speed will be incremented in all the textbox visible or not will stay in the create, making all the textbox really quick without even been clicked the mouse button.
Im calling this script here:
if (timeline_running){
if mouse_check_button_pressed(mb_left){
script_execute(FastText,obj_player,10)
script_execute(FastText,obj_cry_girl,10)
script_execute(FastText,obj_enemy_goblin,10)
}
}
The problem now is that i want to fast forward the animation of only the textBox that is appearing on the screen.
For that i´m doing another script that will receive the character´s obj that will speak, and detect if an object with the name "txt" is created inside that character. The problem here is that if the text box is not yet created this does not work.
//obj,speedText
if(object_exists(argument0)){
with(argument0){
if(instance_exists(argument0.txt)){
with(txt){
if (spd = 10){
instance_destroy();
timeline_position = timeline_position + 1
}
else{
spd = argument1;
}
}
}
}
}
Other problem is that if i just go and change
if(object_exists(argument0)){
with(argument0){
if(instance_exists(obj_text)){
with(obj_text){
if (spd = 10){
instance_destroy();
timeline_position = timeline_position + 1
}
else{
spd = argument1;
}
}
}
}
}
The speed will be incremented in all the textbox visible or not will stay in the create, making all the textbox really quick without even been clicked the mouse button.
Im calling this script here:
if (timeline_running){
if mouse_check_button_pressed(mb_left){
script_execute(FastText,obj_player,10)
script_execute(FastText,obj_cry_girl,10)
script_execute(FastText,obj_enemy_goblin,10)
}
}
Last edited by a moderator: