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
37
S
6
G
2
Posts: 249
Reputation: 3,127

Post » Tue Sep 16, 2014 2:23 am

Set Text=mid("abcdefgghijklmnopqrstuvwxyz", int(random(26)), 1)
ImageImageImage
B
71
S
22
G
259
Posts: 3,793
Reputation: 143,702

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,710

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
37
S
6
G
2
Posts: 249
Reputation: 3,127


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests