D
David Motta Miranda
Guest
My Create event generates a new variable named 'vida'. However, when I call for the variable in the Draw event, GM stops running. Are local variables connected to events (calling them when suitable)? should I create a new global variables to fix the problem?
Create:
Draw
Create:
Code:
var poder = 8;
var resistencia = 5;
var velocidade = 6;
var ataque = poder;
var critico = round(poder / 4);
var armadura = round(resistencia /4);
var vida = 30;
var esquiva = round(velocidade / 2);
var rapidez = round(velocidade / 2);
Code:
draw_set_colour(c_black);
draw_text(0,100,vida); // here the problem
draw_sprite(sprite2,0,x,y);
Last edited by a moderator: