draw_text(view_xview + 128, view_yview + 128, string(global.fuel));

Why isn't it drawing my variable?


Firstly, always use view's index:

draw_text(view_xview[0] + 128, view_yview[0] + 128, string(global.fuel));

Next, what you need check:

  1. Current alpha (draw_set_alha(1); before draw)
  2. Current blend mode (draw_set_blend_mode(bm_normal))
  3. Depth of the object. Maybe you drew behind other objects. Draw order is from biggest value to lower value. If two objects has same depth (and they overlaps) you need set different depth.
  4. Used font includes needed chars (and you set it usingdraw_set_font(...))
  5. Used correct alignment (draw_set_halign(...) and draw_set_valign(...))
  6. Object exists. Maybe you didn't create it. Or maybe you deactivated it. Or maybe you deleted it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.