![]() |
|
|
#1 |
|
Accessing Engine.GameEngine?
I'm sorry to have to ask this, but how can I access things like GameEngine.LastURl and GameEngine.GPendingLevel
And then next question.. LOL.. How/where can I see the PendingLevel or Level properties/methods? (cause I couldn't find them anywhere).. |
|
|
|
|
|
|
#2 |
|
MSPA
Join Date: Aug. 7th, 2002
Location: The Netherlands (yes, that's Holland)
Posts: 246
|
You can always try to find the GameEngine with Allobjects()
As for those properties/methods, if it's about map switching, looking at one of the current map votes could be a nice idea. |
|
|
|
|
|
#3 | |
|
Quote:
Code:
local GameEngine ge;
ge = Gameengine(Findobject('Package.GameEngine'), class'GameEngine');
if(ge.GLever==none)
Log("Ohno GLever is none");
But I'll check out the latest map switching stuff |
||
|
|
|
|
|
#4 | |
|
Quote:
Code:
ge = GameEngine(FindObject("GameEngine", class'GameEngine'));
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
||
|
|
|
|
|
#5 |
|
MSPA
Join Date: Aug. 7th, 2002
Location: The Netherlands (yes, that's Holland)
Posts: 246
|
I use this code in my main menu class to add serverpackages. Maybe it helps.
It's from a main menu. (I'm not going to distubute my mod with it's own ini file because that seems to mess up on some systems) Code:
if (bFirstRun)
{
// LOG("First run, fixing up Serverpackages and stuff");
foreach AllObjects(class'GameEngine', gEngine)
{
bAddServerPackage1 = True;
bAddServerPackage2 = True;
for (i=0;i<gEngine.ServerPackages.Length;i++)
{
if (gEngine.ServerPackages[i] == "UMS_Code")
bAddServerPackage1 = False;
if (gEngine.ServerPackages[i] == "UMS_Mutators")
bAddServerPackage2 = False;
}
if (bAddServerPackage1)
gEngine.ServerPackages[gEngine.ServerPackages.Length] = "UMS_Code";
if (bAddServerPackage2)
gEngine.ServerPackages[gEngine.ServerPackages.Length] = "UMS_Mutators";
gEngine.LoadingClass = "UMS_Code.UMS_GuiVignette";
// gEngine.ConnectingMenuClass = "" //Not even used? the default 'MenuConnecting' class can't even be found.
gEngine.DisconnectMenuClass = "UMS_Code.UMS_GuiNetworkStatusMsg";
gEngine.SaveConfig();
}
bFirstRun = False;
SaveConfig();
}
|
|
|
|
|
|
#6 |
|
Hmmm Daid303, you've got something there
as there normally is only 1 GameEngine this would also be a good solution..And @ Wormbo, thanx, I'll definitly will check out the code I'm really using at the moment, cause I think it's nicer coding to do it with the findobject way as there is only one GameEngine active.. |
|
|
|
|
|
|
#7 |
|
LOL @ daid303 about the ConnectingClass, I've found that out too, Searched the whole damn code, but couldn't find the Class Epic is refering too.. LOL..
|
|
|
|
|
|
|
#8 |
|
ConnectingClass is hardcoded, like a **** load of other stuff
__________________
elmuerte.com - Magicball Network - UnrealWiki - The Unreal Admin page - UT3 WebAdmin Explode Mode! - Idle Ballad - Year of the PS3 - igndotcom - IdleThumbs |
|
|
|
|
|
|
#9 |
|
Hmmm,
Code:
FindObject("GameEngine", class'GameEngine')
Code:
foreach AllObjects(class'GameEngine', ge)
{
Log("ge is none="$(ge==none));
}
Weird as hell. But Now I have the ge, where can I find info on the Level object, since I can't find anything on UDN or wiki.. Last edited by SuperDre; 22nd Sep 2003 at 05:14 PM. |
|
|
|
|
|
|
#10 | |
|
Quote:
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
||
|
|
|
|
|
#11 | |
|
Quote:
And Any Idea why the findobject wouldn't work but the foreach method does? |
||
|
|
|
|
|
#12 |
|
FindObject requires you to specify the exact object name nad that doesn't need to be "GameEngine" in your case. Try logging the GameEngine object you found in the ForEach loop.
The Engine.Level class doesn't have any UnrealScript code, so you can only access the properties inherited from Object. It's the same with more useful classes like Engine.Input: You can propably use console commands to access certain properties, but you can't use UnrealScript.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
|
|
#13 |
|
Damn, I hoped to use those for retrieving the current Server info.. Cause I want to show some extra server info when loading the map.. And I can't seem to find any other info on how to optain the current server.
|
|
|
|
|
|
|
#14 |
|
Most information are accessible through LevelInfo, GameInfo or GameReplicationInfo.
TRy to find out where the F2 server info gets its details from.
__________________
Wormbo's UT/UT2004/UT3 mods | YouTube channel | PlanetJailbreak | Unreal Wiki | Liandri Archives Everything you ever wanted to know about replication | UnrealScript security considerations <elmuerte> you shouldn't do all-nighters, it's a waste of time and effort <TNSe> nono <TNSe> its always funny to find code a week later you dont even remember writing <Pfhoenix> what's worse is when you have a Star Wars moment <Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!" |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|