center print != draw_centered_text
Works:
Message = ""
Pos = 0
Colour = {r = 0, g = 0, b = 0, a = 1}
font_type = FONTS.SMALL
function mytestmess(str, pos,r,g,b)
Message = str
Pos = pos
Colour.r = r
Colour.g = g
Colour.b = b
end
function draw2d()
if(Message ~= "") then
set_color(Colour.r,Colour.g,Colour.b,Colour.a)
draw_centered_text(Message, Pos, font_type)
end
end
add_hook("draw2d","moo",draw2d)
add_hook ("new_game", "test", function() mytestmess("Kool-Aid man says: Oooh Yeah!", 100,1,0,0)end)
add_hook ("joint_select", "test", function() mytestmess("You like selecting joints?", 100,0,1,0)end)
add_hook ("enter_frame", "test", function() mytestmess("Next frame, please!", 100,0,0,1)end)
Last edited by Blam; Aug 30, 2008 at 11:44 AM.