S
Stratos.la
Guest
Hey everyone! i cant seem to be able to make it! i have a controller that records gold and exp mid level to display on level end how much xp and gold gained but i also want if the player levels up mid game to show it at the end. the way i have it only works if the player levels up exactly at level end.
this is my level end vew object (displaying the stats)
and this is the object that holds the variables
Room Start
end step event
i also tried this code in the step end and just draw the lvtext in the object that shows the stats but still nothing
this is my level end vew object (displaying the stats)
GML:
with (oLevelEndStats)
{
if lvend > prev_level
{
draw_set_font(fntTeutonic)
draw_set_color(c_black)
draw_set_halign(fa_center)
draw_text(x,y-320,"Level up!" + " " + "level:"+ " " + string(global.p_level))
draw_text(x,y-260,"You Gained" + " " + string(global.skp) + " " + "Skill Points")
draw_set_halign(-1)
draw_set_color(-1)
draw_set_font(-1)
}
}
Room Start
GML:
prev_level = global.p_level
GML:
lvend = global.p_level
GML:
textlv ="Level up!" + " " + "level:"+ " " + string(lvend + prev_level)
Last edited by a moderator: