For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
is it even possible?..
-
[]KAOS[]Casey
- OldUnreal Member
- Posts: 4497
- Joined: Sun Aug 07, 2011 4:22 am
- Location: over there
is it even possible?..
to create an actor/object that will persist from level change to keep some information on travel, specifically stored variables such as bools, strings etc. Just wanted to ask here before I bust out the c++ compiler and do some read/write file input/output with the headers.
-
.:..:
- OldUnreal Member
- Posts: 1637
- Joined: Tue Aug 16, 2005 4:35 am
Re: is it even possible?..
Yes! there is 1 way which works based on a hack and it works both on dedicated server and single player mode.
First do this:
Create a new class under 'Console' (in here called class 'StaticData').
On some actor (or object) set the Engine default console class to that (example: Class'Engine'.Default.Console = Class'StaticData') to force engine to keep the information about the class so it dosent get garbage collected.
add variables to 'StaticData' class what you wish to store information about, I.E:
Then fill in the variables:
And so you can read the data after mapchange:
Which would give some output like:
Hope this made any sense at all.
First do this:
Create a new class under 'Console' (in here called class 'StaticData').
On some actor (or object) set the Engine default console class to that (example: Class'Engine'.Default.Console = Class'StaticData') to force engine to keep the information about the class so it dosent get garbage collected.
add variables to 'StaticData' class what you wish to store information about, I.E:
Code: Select all
Class StaticData extends Console;
var MyMapData MapObject;
var bool bBooleanA;
Code: Select all
Class'StaticData'.Default.MapObject = New(None) Class'MyMapData';
Class'StaticData'.Default.bBooleanA = True;
Code: Select all
Log(Class'StaticData'.Default.MapObject@Class'StaticData'.Default.bBooleanA)
Code: Select all
ScriptLog: Transient.MyMapData0 True
Last edited by .:..: on Sat Nov 10, 2007 8:31 pm, edited 1 time in total.
(ಠ_ಠ)1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD
-
.:..:
- OldUnreal Member
- Posts: 1637
- Joined: Tue Aug 16, 2005 4:35 am
Re: is it even possible?..
So a practical example would be:
And summon ActorCounter in 2 maps and you see the output will be on second map something like
"ScriptLog: Found old data: Transient.MyMapData0 2734"
Code: Select all
Class ActorCounter extends Actor;
var MyMapData MyData;
function PostBeginPlay()
{
local Actor A;
if( Class'Engine'.Default.Console==Class'StaticData' )
{
MyData = Class'StaticData'.Default.MapData;
Log("Found old data:"@MyData@MyData.ActorCount);
}
else
{
Log("Generating new data");
MyData = New(None) Class'MyMapData';
ForEach AllActors(Class'Actor',A)
MyData.ActorCount++;
Class'StaticData'.Default.MapData = MyData;
Class'Engine'.Default.Console = Class'StaticData';
Log("Counted map actors to"@MyData.ActorCount);
}
}
Code: Select all
Class MyMapData extends Object;
var int ActorCount;
Code: Select all
Class StaticData extends Console;
var MyMapData MapData;
"ScriptLog: Found old data: Transient.MyMapData0 2734"
(ಠ_ಠ)1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD
-
Shivaxi
- OldUnreal Member
- Posts: 2232
- Joined: Wed Mar 08, 2006 4:43 pm
-
[]KAOS[]Casey
- OldUnreal Member
- Posts: 4497
- Joined: Sun Aug 07, 2011 4:22 am
- Location: over there
Re: is it even possible?..
I found another way before Dots posted, it uses an Object and config(myconfig) with variables flagged as Config, and it saves them using saveconfig();
It works for what I want to do, but i may switch to the method dots has depending if i require it in the long run.
It works for what I want to do, but i may switch to the method dots has depending if i require it in the long run.
-
Bane
- OldUnreal Member
- Posts: 493
- Joined: Sun Mar 03, 2002 6:32 pm
Re: is it even possible?..
Hmm. I see that it'd work for data storage, but is there anyway to call functions using that method, dots? A while back I had tried to make a better chatlog for ICD but gave up after I realized that I had to make a new file for every map because the statlogfile automatically closes on map change and you can't re-open a file in UScript (and I can't figure out native code. Casey don't tell me you finally got it and didn't tell me...).
Author of Hide and Seek mod, and the NALIBALL mod
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
-
[]KAOS[]Casey
- OldUnreal Member
- Posts: 4497
- Joined: Sun Aug 07, 2011 4:22 am
- Location: over there
Re: is it even possible?..
I gave up because i couldn't get it to work with 225 at all due to no 225 headers, but hopefully we can get some 227 headers so i wont be discouraged.Hmm. I see that it'd work for data storage, but is there anyway to call functions using that method, dots? A while back I had tried to make a better chatlog for ICD but gave up after I realized that I had to make a new file for every map because the statlogfile automatically closes on map change and you can't re-open a file in UScript (and I can't figure out native code. Casey don't tell me you finally got it and didn't tell me...).
