W/E you want to call it but this code makes tags for objects to have their names over head of them... *NOTE* This is taken directly from my game DO so you may have to make a few changes but it works
Function :
function CreateNameTag(Parentobj as integer, TagText$ as string, R as integer, G as integer, B as integer)
for Tag = 523 to 651
if TagExist(Tag) = 0
for Oldtag = 523 to 651
if TagParentObj(Oldtag) = Parentobj
TagExist(Oldtag) = 0
TagParentObj(Oldtag) = 0
TagObj(Oldtag) = 0
TagText$(Oldtag) = ""
TagRed(Oldtag) = 0
TagGreen(Oldtag) = 0
TagBlue(Oldtag) = 0
Delete image Oldtag
Delete Object Oldtag
Tag = Oldtag
Oldtag = 651
endif
next Oldtag
TagExist(Tag) = 1
TagParentObj(Tag) = Parentobj
TagObj(Tag) = Tag
TagText$(Tag) = TagText$
TagRed(Tag) = R
TagGreen(Tag) = G
TagBlue(Tag) = B
CurrentTS = TEXT SIZE()
CurrentR = 255
CurrentG = 255
CurrentB = 255
GET IMAGE 9999, 0,0, 200,200,1
INK RGB(0,0,0),RGB(0,0,0)
Box 0,0,0 + 200,0 + 200
INK RGB(R,G,B),RGB(0,0,0)
set text size 20
MAKE OBJECT PLAIN Tag, 0 + TEXT WIDTH(TagText$), 0 + TEXT HEIGHT(TagText$)
text 0,0,TagText$
GET IMAGE Tag, 0,0, 0 + TEXT WIDTH(TagText$), 0 + TEXT HEIGHT(TagText$)
TEXTURE OBJECT Tag, Tag
SET OBJECT TRANSPARENCY Tag, 1
SCALE OBJECT Tag, 12, 12, 12
yrotate object Tag,180
fix object pivot Tag
SET OBJECT LIGHT Tag, 0
Paste image 9999,0,0
Delete image 9999
Tag = 651
INK RGB(CurrentR,CurrentG,CurrentB),RGB(255,255,255)
set text size CurrentTS
endif
next Tag
endfunction
Handler:
Taghandler:
for Tag = 523 to 651
if TagExist(Tag) = 1
if Object exist(TagParentObj(Tag)) = 1
POSITION OBJECT Tag,OBJECT POSITION X(TagParentObj(Tag)), (OBJECT POSITION Y(TagParentObj(Tag)) + OBJECT SIZE Y(TagParentObj(Tag))) + 5,OBJECT POSITION Z(TagParentObj(Tag))
set object to camera orientation Tag
else
TagExist(Tag) = 0
TagParentObj(Tag) = 0
TagObj(Tag) = 0
TagText$(Tag) = ""
TagRed(Tag) = 0
TagGreen(Tag) = 0
TagBlue(Tag) = 0
Delete Object Tag
endif
endif
next Tag
return
and dim these arrays
Global dim TagExist(MaxObjects) as Integer
Global dim TagParentObj(MaxObjects) as Integer
Global dim TagObj(MaxObjects) as Integer
Global dim TagText$(MaxObjects) as string
Global dim TagRed(MaxObjects) as Integer
Global dim TagGreen(MaxObjects) as Integer
Global dim TagBlue(MaxObjects) as Integer
Making better games everday!
Oh yeah and just so you know its Oh-nek-a not One-ka!