A byte that travels

Hello there!
I'm trying to make my own portrait system for DX single player, it works like that:
Player chooses his portrait and starts a new game, so Skin Number is equals the Portrait Number:
DRMenuNewGameScreen
It was suppose to Skin Number still the same as Portrait Index, but it just resets when player travels to Start Map!
Here:
DRHuman
It works fine while in the MenuNewGameScreen menu but after the game starts the value is reseted.
How can I fix that?
EDIT:
It seens it does not work in MenuGameScreen:
I'm trying to make my own portrait system for DX single player, it works like that:
Player chooses his portrait and starts a new game, so Skin Number is equals the Portrait Number:
DRMenuNewGameScreen
- Code: Select all
function SaveSettings()
{
local DRHuman player;
(...)
player.DRSkinNumber = portraitIndex;
}
It was suppose to Skin Number still the same as Portrait Index, but it just resets when player travels to Start Map!
Here:
DRHuman
- Code: Select all
var travel byte DRSkinNumber;
event TravelPostAccept()
{
local DeusExLevelInfo info;
Super.TravelPostAccept();
if (DRSkinNumber == 0)
{
}
if (DRSkinNumber == 1)
{
}
if (DRSkinNumber == 2)
{
}
if (DRSkinNumber == 3)
{
}
if (DRSkinNumber == 4)
{
}
CarcassShouldBe = DRSkinNumber;
}
It works fine while in the MenuNewGameScreen menu but after the game starts the value is reseted.
How can I fix that?
EDIT:
It seens it does not work in MenuGameScreen:
- Code: Select all
PORTRAIT INDEX VALUE:2
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:001E) Accessed None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0026) Attempt to assigned variable through None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0039) Accessed None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0041) Attempt to assigned variable through None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:004E) Accessed None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:0056) Attempt to assigned variable through None
ScriptWarning: DRMenuScreenNewGame DX.DRHuman0.DeusExRootWindow0.DRMenuScreenNewGame0 (Function Deranged.DRMenuScreenNewGame.SaveSettings:006B) Accessed None
PLAYERSKIN VALUE:0