View Full Version: Drawing sprites inside text example

Kousou Games > Programming and Game Elements > Drawing sprites inside text example


Title: Drawing sprites inside text example


Killswitch - March 18, 2009 11:00 PM (GMT)
Can you draw sprites inside the text example on Kou? I am using it for speaking, but also for reading signs and have a sprite that contains frames of a pointer arrow in left, right,up and down and wanted to have ...

Kakariko Village Pointer Right
Hyrule Field East Pointer Left
Hyrule Castle Pointer Up

Is this possible? I was thinking if so, I would be using the "This is text" + draw_sprite etc etc ??

Edit - The more I think about this, it wouldnt work due to setting the X and Y in draw sprite...

mit - March 18, 2009 11:47 PM (GMT)
There's no reason why not.

A really simple way of doing it, if it's just little arrows you want, would be to add them as characters to the font. You could replace some obscure characters that you're not using.


Otherwise, you'd have to work out the current x and y value of the character it's drawing using string_width() and so on, which might get quite confusing, but not impossible. I might have a go later.

Killswitch - March 19, 2009 12:46 AM (GMT)
The more I looked at it I figured it could weed it in there, but trying to sort through that code and figure out exactly where I could get the dimensions from will prob. be kinda diffecult.

I was gonna have it set to replace -sprPointerL with the image and so on, but it might be better to add the character as a sprite. I don't know how to work with it at that point, if it has to be set to a current position, so time to go check the manual ( if its even in there ). Wish the GML manual was more like PHPs manual...

EDIT - I replaced in my font sprite the #$%& signs with the actual arrows and it works now :D




Hosted for free by InvisionFree