How do I fill space using sprite font?

Get help using Construct 2

Post » Wed Nov 05, 2014 9:53 am

Hi I'm wondering if there is a way to make sprite font have a space "image". My font sheet is not transparent but black and I don't want gaps between the words. Perhaps this picture is telling.

Image

I'm guessing space is just a rule in numbers for how many pixels between words rather than a peace of the sheet itself.

I thought of a ugly solution and that is to have a special character as a "blank space" instead of actual, hit key on keyboard, space. So all my text would look like "Hi$I$love$C2!" But I puke fountains in my mouth just thinking about that ugly solution.

Any suggestions are welcome!
My game Petrolhead Tactics is now on Steam Greenlight. I could not have done this without C2 ? Please rate, if you like!

Steam client already open: petrolheadtactics.com/steam
Web: petrolheadtactics.com/greenlight
B
20
S
4
G
4
Posts: 132
Reputation: 4,130

Post » Wed Nov 05, 2014 10:10 am

You could just paint the $ black in your image editor and use

replace(src, find, rep)
Find all occurrences of find in src and replace them with rep.

That way your texts would look normal..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Nov 05, 2014 10:17 am

Why not have a blank square in the spritefont and add a "space" in the string in character set box on the left.

No need to find and replace anything.

spritefont.capx


**EDIT

My spritefont has A-Z then a blank square then 0-9. My character set is ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
You do not have the required permissions to view the files attached to this post.
B
46
S
23
G
7
Posts: 459
Reputation: 6,763

Post » Thu Nov 06, 2014 11:06 am

I swab up the vomit and tip my hat in your direction @Minor ty ty
My game Petrolhead Tactics is now on Steam Greenlight. I could not have done this without C2 ? Please rate, if you like!

Steam client already open: petrolheadtactics.com/steam
Web: petrolheadtactics.com/greenlight
B
20
S
4
G
4
Posts: 132
Reputation: 4,130


Return to How do I....?

Who is online

Users browsing this forum: Lancifer and 9 guests