How do I make random letter appear within a spritefont

Get help using Construct 2

Post » Tue Sep 16, 2014 1:41 am

I've really struggling to find a way to random generate any letter randomly within a spriteFont

the main rule for the random letters would be..
- to limit the number of letters that are generated based on an instance variable
B
29
S
6
G
2
Posts: 232
Reputation: 2,893

Post » Tue Sep 16, 2014 2:23 am

Set Text=mid("abcdefgghijklmnopqrstuvwxyz", int(random(26)), 1)
ImageImageImage
B
71
S
21
G
220
Posts: 3,649
Reputation: 123,727

Post » Tue Sep 16, 2014 7:13 am

@blackhornet Thanks!, this is really awesome i could use it sometime in my game.

I made a quick thing with the method you posted, my name is "Amro" btw :D

Mysterious text.capx
You do not have the required permissions to view the files attached to this post.
B
21
S
6
Posts: 244
Reputation: 2,655

Post » Tue Sep 16, 2014 11:32 pm

@blackhornet thanks man you're a life saver
@Wisdoms i see what you did there

i ended up changing it up abit taking into account numbers

mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", int(random(36)), CPUSprite.NumberOfCharacters)
B
29
S
6
G
2
Posts: 232
Reputation: 2,893


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983, marcoscodas, Yahoo [Bot] and 12 guests