This comment has two parts:
SECOND PART
// a part where we read values from our configuration file
PlayerSpeed.SliderValue.CurrentValue = class'PlayerTweak. PlayerTweakMutator'.default.Speed;
PlayerJumpHeight.SliderValue.CurrentValue = class'PlayerTweak. PlayerTweakMutator'.default.JumpHeight;
PlayerStartHealth.SliderValue.CurrentValue = class'PlayerTweak. PlayerTweakMutator'.default.StartHealth;
PlayerMaxHealth.SliderValue.CurrentValue = class'PlayerTweak. PlayerTweakMutator'.default.MaxHealth;
}
}
function SetupButtonBar()
{
ButtonBar.AppendButton( "<Strings:UTGameUI.ButtonCallouts.Back>", OnButtonBar_Back);
}
function bool OnButtonBar_Back(UIScreenObject InButton, int InPlayerIndex)
{
class'PlayerTweak. PlayerTweakMutator'.default.Speed = PlayerSpeed.GetValue();
... like in Ambershee code
}
DefaultProperties
{
}
(Ignore all spaces which I did after some dots after "PlayerTweak." word. Don't do them in your code.)
Basically we just have to load saved values from the configuration file - they are not loaded by the engine itself (I think I am right here but who knows). Also it would be better if after compilation of your code you set the starting default values in your configuration file yourself so they would appear when you first run the game (Configuration file == UTPlayerTweak.ini if somebody has already forgot).
It should work, hopefully :)
Great tutorials Ambershee
xmai
Xeno joined
This member has provided no bio about themself...