I'm trying the following secuense: when certain button is pressed the martial art title go down out of the view and then returns from bellow but with a diferent name, for this I tried this code:
- Code: Select all
if (martial_art_act1==0)//martial_art_act1 is a variable for this
{
CreateTimer("Event Actor", "tiempo_de_canje", 1000);//tiempo_de_canje is the time it takes on the action
}
if (martial_art_act1==1)
{
CreateTimer("Event Actor", "tiempo_de_canje2", 1000);//same a tiempo_de_canje
}
And I'm putting on timers:
- Code: Select all
p1_artemarcial.yvelocity=p1_artemarcial.yvelocity+10;//p1_artemarcial is the text name actor for this
p1_artemarcial_b.yvelocity=p1_artemarcial_b.yvelocity+10;//same here
martial_art_act1=1;
In tiempo_de_canje2:
- Code: Select all
strcpy(p1_artemarcial.text, "CHOLITZU");
strcpy(p1_artemarcial_b.text, "CHOLITZU");
p1_artemarcial.yvelocity=p1_artemarcial.yvelocity-10;
p1_artemarcial_b.yvelocity=p1_artemarcial_b.yvelocity-10;
martial_art_act1=0;
Also I add a collision state with frame in order to make those texts stay in a certain range:
For some odd reason (or maybe because I still don't master GE) this code don't work, what happens is that pass some seconds when nothing happens and later the text go down and never return.
I hope you guys can solve my trouble because I don't know what to do.
Thanks