S
Stratos.la
Guest
I have an object that handles a switch statement of 3 instances. and i want it to link to another object so i can draw on the screen certain values.
so far i have the controller that each instance on the room links to a case.
create event:
and here i have the object that spawns with another button and am hoping to link to the object above to display stats.
draw_gui event:
buuut yeah it doenst work like it is! can anyone help or spot my mistake??
so far i have the controller that each instance on the room links to a case.
create event:
GML:
if instance_exists(ospellBook)
{
switch(menus)
{
case 0: page = 1;
break;
case 1: page = 2;
break;
case 2: page = 3;
break;
}
}
draw_gui event:
GML:
with (oMenuSelect)
{
switch(page)
{
case 1:
draw_text(ospellBook.x-568,ospellBook.y-340,"XP:" + string(global.p_exp))
draw_text(ospellBook.x-568,ospellBook.y-320,"XP NEXT:" + string(global.p_exptolevel))
draw_text(ospellBook.x-568,ospellBook.y-300,"LEVEL:" + string(global.p_level))
draw_text(ospellBook.x-568,ospellBook.y-280,"SKILL POINTS:" + string(global.skp))
draw_text(ospellBook.x-568,ospellBook.y-260,"HEALTH:" + string(global.hp_max))
draw_text(ospellBook.x-568,ospellBook.y-240,"MANA:" + string(global.mp_max))
break;
case 2:
draw_text(ospellBook.x-568,ospellBook.y-340,"second page")
break;
case 3:
draw_text(ospellBook.x-568,ospellBook.y-340,"third page")
break;
}
}