T
Thiago Sabin
Guest
I really searched and found no solution for this simple problem, i must be missing something simple...
In the create event of my object im doing this:
var hp = 10;
Then in the draw event im trying to draw a bar with that var like
draw_rectangle( -50, -40, 100/global.slime_max_hp*hp-50, -30, 0 );
And the draw event is not finding that var... i really don't know what to do...
Error:
FATAL ERROR in
action number 5
of Draw Event
for object slime:
Variable slime.hp(100005, -2147483648) not set before reading it.
at gml_Object_slime_DrawGUI_5 (line 1) - action_draw_rectangle( -50, -40, 100/global.slime_max_hp *hp-50, -30, 0 );
In the create event of my object im doing this:
var hp = 10;
Then in the draw event im trying to draw a bar with that var like
draw_rectangle( -50, -40, 100/global.slime_max_hp*hp-50, -30, 0 );
And the draw event is not finding that var... i really don't know what to do...
Error:
FATAL ERROR in
action number 5
of Draw Event
for object slime:
Variable slime.hp(100005, -2147483648) not set before reading it.
at gml_Object_slime_DrawGUI_5 (line 1) - action_draw_rectangle( -50, -40, 100/global.slime_max_hp *hp-50, -30, 0 );