Go ![]() | New ![]() | Find ![]() | Notify ![]() | Tools ![]() | Reply ![]() | |
| Peregrine |
Alright I have my record mutator working as shownames with Scores/Deaths beside the name text above a player. It works great I belive^^. Now the next step is for me to create a .ini file in my system folder that stores everyones name and Score/Deaths. My question is, how would I go about saving and recalling the name, scores and death variables ? ================================================== PScore = P.PlayerReplicationInfo.Score; PDeaths = P.PlayerReplicationInfo.Deaths; PText = "/"; PName = P.PlayerReplicationInfo.PlayerName; PName = P.PlayerReplicationInfo.PlayerName; Canvas.SetPos(SX-(32*scale)*0.5, SY-(32*scale)); if(scale>0.3) Canvas.Font = Canvas.MedFont; else return; Canvas.DrawText(PName @PScore@PText@PDeaths); ================================================== anyone? thanks | ||
|
| Treasurer |
It's a three step process; first, declare your class to be “config”, followed by the name of the *.ini in parentheses: Next, declare your variables correctly:class myClass extends someClass config(myConfig) And at some arbitrary point in your class, run the SaveConfig() function. LoadConfig() calls the variables from the *.ini.var() config float mvVar; | |||
|
| Peregrine |
Loadconfig doesnt compile ================================================== class ladder extends Mutator config(ladder); var() config string PName; var() config int PScore ; var() config int PDeaths ; // Called before gameplay starts function PostBeginPlay() { Super.PostBeginPlay(); SaveConfig(); } // Called each time there is a kill function ScoreKill(Pawn Killer, Pawn Other) { Super.ScoreKill(Killer, Other); LoadConfig(); } ================================================== | |||
|
| Peregrine |
under info statlog there are a lot of good examples you can use too helpful | |||
|
| Treasurer |
Originally posted by Methril:Whoops; ResetConfig(). See object.uc, line 350. | |||
|
| Powered by Social Strata |
| Please Wait. Your request is being processed... |
|
© Low Caliber Club 2002-4

