VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Random name creator (For creating nicknames and RPGs names)

by Vitaly (7 Submissions)
Category: String Manipulation
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

The code generates a random name. I am giving basically two simple functions with which you can create a loop that will make many thousands of nicknames or names for roleplay games. Check it out.

Rate Random name creator (For creating nicknames and RPGs names)

Function C() As String
  Const Consonants = "bcdfghijklmnpqrstvwxz"
  Randomize
  C = Mid(Consonants, Int(Rnd * 21) + 1, 1)
End Function
Function V() As String
  Const Vowels = "aeiouy"
  Randomize
  V = Mid(Vowels, Int(Rnd * 6) + 1, 1)
End Function
'Now lets create few random names in the debug window.
'Write there: print C & V & C & V & C
'And run this line a few times. Here are the results I got:
'bapai
'zymam
'luler
'zaio
'I am sure that you would find to these two functions 1001 uses.

Download this snippet    Add to My Saved Code

Random name creator (For creating nicknames and RPGs names) Comments

No comments have been posted about Random name creator (For creating nicknames and RPGs names). Why not be the first to post a comment about Random name creator (For creating nicknames and RPGs names).

Post your comment

Subject:
Message:
0/1000 characters