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
31
S
6
G
2
Posts: 236
Reputation: 2,951

Post » Tue Sep 16, 2014 2:23 am

Set Text=mid("abcdefgghijklmnopqrstuvwxyz", int(random(26)), 1)
ImageImageImage
B
71
S
22
G
240
Posts: 3,734
Reputation: 133,994

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
22
S
6
Posts: 244
Reputation: 2,690

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
31
S
6
G
2
Posts: 236
Reputation: 2,951


Return to How do I....?

Who is online

Users browsing this forum: bclikesyou, kalibark2 and 29 guests