This is a read only copy without any forum functionality of the old Modcraft forum.
If there is anything that you would like to have removed, message me on Discord via Kaev#5208.
Big thanks to Alastor for making this copy!

Menu

Author Topic: Character Create set a Character Race and Class.  (Read 781 times)

AgeofCraft

  • Registred Member
  • Polygonshifter
  • *****
  • Posts: 69
    • View Profile
Character Create set a Character Race and Class.
« on: July 25, 2015, 07:19:47 pm »
I try since 2 hours to remove the randomize from the CharacterCreate.lua, i want to create one class and one race that choosen at the start of the CharacterCreate Screen, i tried everything but i have 0 knowledge of coding.

i tried to change in the CharacterCreate.lua
Quote
function CharacterCreate_OnLoad(self)
   self:SetSequence(0);
   self:SetCamera(0);

   CharacterCreate.numRaces = 0;
   CharacterCreate.selectedRace = 1;
   CharacterCreate.numClasses = 0;
   CharacterCreate.selectedClass = 1;
   CharacterCreate.selectedGender = 0;

So the characterscreen sets on load the Race and Class to ID 1 that is The Human and the Warrior, but the randomize continues so i tried a another code
another line:

Quote
       function CharacterCreate_OnShow()

        SetCharacterRace(1);
   CharacterCreateEnumerateRaces(GetAvailableRaces());
   SetCharacterRace(GetSelectedRace());
   
   SetCharacterClass(1);
   CharacterCreateEnumerateClasses(GetAvailableClasses());
   local_,_,index = GetSelectedClass();
   SetCharacterClass(index);

So if the characterScreen is showing it sets the Race and Class to ID 1 but its not working, what iam doing wrong ?

« Last Edit: January 01, 1970, 01:00:00 am by Admin »