T
Tchangla
Guest
I have being coding a turn-based combat system for my Dungeon Crawler, but it is making weird things.
I have the codes distributed in diferent "execute codes" in one Step event (every "Execute code" uses a diferent variable, for moving in different "Execute codes" (sorry if I'm being redundant, I don't know exactly how to explain this better).
The problem I'm having, is in the last "Execute code".
///Restar/sumar vida y mostrar daño en pantalla
if(showDamage==1){
scr_battleText("b0001",damage);
showDamage=0;
}
The "scr_battleText("b0001",damage); creates a textbox with a certain text in it on screen. For some reason, the textox appear, but I can't make it dissapear pressing A (like it would work if I call it from any part of the code). I supposed that maybe the step event created X numbers of it, but since "showDamage=0" underneath of it, it should only execute that script one time. (in the picture below, the textbox is shown, but I can't interact with it).
Maybe I misenderstood the way GML do its things (i've programmed in Java and C#).
Any ideas? Thanks in advance.
I have the codes distributed in diferent "execute codes" in one Step event (every "Execute code" uses a diferent variable, for moving in different "Execute codes" (sorry if I'm being redundant, I don't know exactly how to explain this better).
The problem I'm having, is in the last "Execute code".
///Restar/sumar vida y mostrar daño en pantalla
if(showDamage==1){
scr_battleText("b0001",damage);
showDamage=0;
}
The "scr_battleText("b0001",damage); creates a textbox with a certain text in it on screen. For some reason, the textox appear, but I can't make it dissapear pressing A (like it would work if I call it from any part of the code). I supposed that maybe the step event created X numbers of it, but since "showDamage=0" underneath of it, it should only execute that script one time. (in the picture below, the textbox is shown, but I can't interact with it).
Maybe I misenderstood the way GML do its things (i've programmed in Java and C#).
Any ideas? Thanks in advance.