(Using Build 108)
Hello.
I’m having a problem with AGK’s sprites interfering with text, and I wondered if you guys would let me know if I’m going completely mad (probably), or whether there’s a bug in AGK.
The simple code below:
1. loads an image font (attached)
2. creates a sprite
3. creates a text object
4. creates another sprite
5. creates another text object.
This is where it goes wrong! The first text object disappears! If line 4 (in my pseudo-code above) is commented out, then the first text object does NOT disappear. The act of creating the second sprite seems to bodge up the text object.
SetVirtualResolution (1024,768)
global imgFont as integer
imgfont = LoadImage("output.png")
iSprite1 = createsprite(0)
iText1 = createtext("First")
settextfontimage(iText1,imgfont)
settextsize(iText1,50)
settextspacing(iText1,-15)
settextalignment(iText1,1)
settextposition(iText1,50,10)
iSprite2 = createsprite(0)
iText2 = createtext("Second")
settextfontimage(iText2,imgfont)
settextsize(iText2,50)
settextspacing(iText2,-15)
settextalignment(iText2,1)
settextposition(iText2,50,200)
do
Sync()
loop
Pretty strange. The same thing happens if you set sprite/text IDs manually, rather than letting AppGameKit do it.
Anyone have any idea about this?
Thanks,
JamesB