Random name create caracter

  • Autor subiect #TrC
  • Dată creare
  • Răspunsuri: Răspunsuri 9
  • Vizualizări: Vizualizări 1K

#TrC

Fondator
Membru personal
11 Oct 2017
7.557
6.750
113
Monede Dragon
94
cc2a7b04b715ef6aff0896a0ed21f18d.gif


introCreate.py
Cod:
import os
import app
#import the above lines if you don't have them already

def __randomizeName(self):
    dir = os.path.dirname(os.path.abspath("introCreate.py"))
    list = open("%s\\nume.list" % dir, "r").read().split("\n")
    rng = app.GetRandom(0, len(list)-1)
    randomName = list[rng]
    self.heroName.SetText("%s" % randomName) ## schimba numele cu ce ai pus tu in nume.list
 
you are only given the name you choose in nume.list, but a function must be made to block the names you have already chosen
if I have time to do that