Legacy:Help Desk

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to navigation Jump to search



Expontiental Damage in a Lava Field

I have been trying to write a script for exponiental lava damage following the inverse square law. Basically, a lavavolume that deals more damage to the player the closer it gets to the center of the lava. I've found everything I need except for a way to input the player's position. Is there any function that can call a player's x,y, and z coordinates?

MythOpus: Yes... and no. There is a function in LevelInfo called GetLocalPlayerController. It can be accessed using Level.GetLocalPlayerController. This will return the clients player controller. From there you simply need to get the location of the pawn. This will work wonders if it'll be used offline. The problems might start while online. I'm not sure if it'll work properly without simulating or replication but you can always try.

Problem Loading Maps

SenorDoom: I'm trying to load a map from one computer into another and keep receiving this error.

History: ULinkerLoad<<FName <- (LinkerLoad Package.LinkerLoad195 262305)) <- FPoly<< <- UPolys::Serialize <- LoadObject <- (Polys myLevel.Polys6081 262305==262305/1193606 111461 180953) <- ULinkerLoad::Preload <- PreLoadObjects <- UObject::EndLoad <- UObject::LoadPackage <- UEditorEngine::Exec_Map <- UEditorEngine::Exec <- (MAP LOAD FILE="L:\royZach_map1.ut2") <- UUnrealEdEngine::Exec <- FileOpen <- WEditorFrame::OnCommand <- WWindow::WndProc <- WWindow::StaticProc <- MessagePump <- MainLoop

I've been unsuccesful finding any help with this at all.

Raven: There is an error in loading up a brush. Possible that it an error coming in from something else. Are you using any custom packages (code, static meshes, textures, ect)?

SenorDoom: No, I'm not using any custom pacakages, its all from prefabs.

Raven: Another thing to check is that verion of UT on the computer that you are moving to is the same as the one you are comming from. (i.e. both are patched the same)

Editing Shaders

Hellborg: UT3, I would like to modify the standard postprocess (DOFAndBloomBlendPixelShader) used in Unreal Tournament 3. In the UT3 tech based Roboblitz I can simply edit the postprocess by directly editing the file DOFAndBloomBlendPixelShader.usf in the Engine/Shaders folder with notepad. I then simply remove the shadercache, run roboblitz, and the new shadercode is used. I can thereby implement cartoon shading in roboblitz. I tried the same with UT3, deleted the shadercashe (files RefShaderCache-PC-D3D-SM2.upk,RefShaderCache-PC-D3D-SM3.upk and RefShaderCache-PC-D3D-SM4.upk and edited DOFAndBloomBlendPixelShader.usf in notepad. However, the game gives a runtime error on startup even after the tiniest change in the shader script. I am sure,that the shader code is still fine - just changing a single constant produces this error. There is also no information given by the error message. Do I need to change certain configuration files to allow modified shader script, or is there a more general problem with my method in UT3? Or, is there a more elegant way to add a custom postprocess to the whole game scene? I asked this question in many formus already, but nobody seems to have a clue...

Third Person View

Stick: UT99, I would like to use UT in third Person view, using behindview 1 works, but the crosshair is not there, and the camera is at a bad angle, i have used a mutator called 'Bullet time 3.00' it fixes this, but i dont like the rest of the things on that mutator, i would like to know how to do this without out.

Polys Visible through walls "In-Game"

VENOM: UT99, I can "see" ALL my polys through walls, I have an open area map with a building in the middle, I can stand outside next to the wall and see the polycount (stat global) through the wall 900+!!, outside is about 300 polys, I can find nothing on this subject, and yes the wall is solid bsp, anyone?


vitaloverdoseIve been updating my vehicle booster script and a lot of people have suggested using a navigation point for the parent class. Ive re-written the script using smallnavigation point as the parent but i cant get the timer function to fire. Is the the function available using small navigation point as a parent?

Scriptable Trigger

Sopa de letras: I miss a scriptable trigger for UT1. I wish all triggering functions and conditions would be merged in one trigger :(. It's so time consuming to make chains of different triggers :(

Weapons Slowing Down Player When Holding It

Fey: I've been working for quite some time trying to figure out how to simulate weapons having weight. The idea being that if you were holding a gun in your hand, it would slow you down by some arbitrary amount. But if you changed that gun out for another one you'd speed back up again. Over the past several days I've hit several dead ends in trying to do this. Currently I'm thinking that I'm going to need to put a timer on somthing and then find a way to check if the characters are holding the gun, perhaps on the pawn that might be using the weapon. I can't seem to find a good page explaing (this is my first mutator ever) how timers work, and what functions might close them. I read on the inventory class page discription that timers are unmade in some functions. If I try to put a timer on a pawn, will it get erased after the pawn dies, or some other event that I may not realize? If so, I'll have to recrete the timer everytime the pawn spawns, I guess via ModifyPlayer().

Is using a timer really the best way to do this? I'm still trying to find a function on weapon or inventory that might trigger when a weapon is being readied or unreadied, but in the past few days I've not been able to find anything worked. I've also not been able to find a pre-existing mutator code that makes somthing happen when the player is holding a weapon, so I've got nothing to experiment with.

MythOpus: I suggest that instead of using the mutator to do the guts of what you're trying to do, use an Interaction instead. You could do what you're proposing in the Tick function.

Command Prompt/UCC Issue

VerteX: Command Prompt being strange

everytime i compile a code, it parsers, compiles, imports, then when it's done, it gives me warning

Warning: Failed to load 'UberLinkGun.u': Can't find file 'UberLinkGun.u'

Warning: Failed loading package: Can't find file 'UberLinkGun.u'

Log: Analyzing...

Log: FactoryCreateText: Class with ClassFactoryUC (0 1 UberLinkGun\Classes\DamTypeUberLinkGun.uc)

Log: Class: DamTypeUberLinkGun extends DamTypeRocket

Log: Imported: Class UberLinkGun.DamTypeUberLinkGun

Log: FactoryCreateText: Class with ClassFactoryUC (0 1 UberLinkGun\Classes\UberLinkGun.uc)

Log: Class: UberLinkGun extends LinkGun

Log: Imported: Class UberLinkGun.UberLinkGun

Log: FactoryCreateText: Class with ClassFactoryUC (0 1 UberLinkGun\Classes\UberLinkGunAttach.uc)

Log: Class: UberLinkGunAttach extends LinkAttachment

Log: Imported: Class UberLinkGun.UberLinkGunAttach

Log: FactoryCreateText: Class with ClassFactoryUC (0 1 UberLinkGun\Classes\UberLinkGunFire.uc)

Log: Class: UberLinkGunFire extends LinkAltFire

Log: Imported: Class UberLinkGun.UberLinkGunFire

Log: FactoryCreateText: Class with ClassFactoryUC (0 1 UberLinkGun\Classes\UberLinkGunPickup.uc)

Log: Class: UberLinkGunPickup extends LinkGunPickup

Log: Imported: Class UberLinkGun.UberLinkGunPickup

Log: FactoryCreateText: Class with ClassFactoryUC (0 1 UberLinkGun\Classes\UberLinkGunProj.uc)

Log: Class: UberLinkGunProj extends RocketProj

Log: Imported: Class UberLinkGun.UberLinkGunProj

Log: Parsing UberLinkGunAttach

Log: Parsing DamTypeUberLinkGun

Log: Parsing UberLinkGun

Log: Parsing UberLinkGunPickup

Log: Parsing UberLinkGunProj

Log: Parsing UberLinkGunFire

Log: Compiling UberLinkGunAttach

Log: Compiling DamTypeUberLinkGun

Log: Compiling UberLinkGun

Log: Compiling UberLinkGunPickup

Log: Compiling UberLinkGunProj

Log: Compiling UberLinkGunFire

Log: Importing Defaults for UberLinkGunAttach

Log: Importing Defaults for DamTypeUberLinkGun

Log: Importing Defaults for UberLinkGun

Log: Importing Defaults for UberLinkGunPickup

Log: Importing Defaults for UberLinkGunProj

Log: Importing Defaults for UberLinkGunFire

Log: Success: Compiled 43 line(s), 9 statement(s).

Log: Save=205.184198

Log: Moving '\System\Save.tmp' to '\System\UberLinkGun.u'

Warning: Failed to load '\System\UberLinkGun': Can't find file '\System\UberLinkGun'

Warning: Failed loading package: Can't find file '\System\UberLinkGun'

Warning: Error loading \System\UberLinkGun !!!

Log: Success - 0 error(s), 1 warning(s)

Exit: Preparing to exit.

Log: Purging garbage

Log: Unbound to Core.dll

Log: Unbound to Editor.dll

Log: Unbound to Engine.dll

Exit: Editor shut down

Log: Unbound to Fire.dll

Log: Unbound to IpDrv.dll

Log: Unbound to UWeb.dll

Log: Unbound to XGame.dll

Log: Unbound to XInterface.dll

Log: Unbound to Onslaught.dll

Log: Garbage: objects: 73914->0; refs: 0

Exit: Object subsystem successfully closed.

Exit: Exiting.

Log: FileManager: Reading 0 GByte 112 MByte 940 KByte 709 Bytes from HD took 0.836996 seconds (0.570996 reading, 0.266000 seeking).

Log: FileManager: 0.149000 seconds spent with misc. duties

Uninitialized: Name subsystem shut down

Uninitialized: Allocation checking disabled

Uninitialized: Log file closed, 07/15/07 15:19:17

MV was what i was trying to compile...i have no idea what to do seeing as it used to work, but recently it started giving me that warning

Question about native classes

Illiander I'm trying to make a UT2k4 vehicle that switches between a wheeled car-type, and a flyer. Basic problem, when I try to extend ONSVehicle, and just copy in all of ONSChopperCraft, it doen't pick up on any of the movement inputs. Same with ONSWheeledCraft. But when I extend those classes it picks up on the inputs. Am I doomed to failure in this, or is there some way for me to pick up on movement commands in UScript?


vertex I have an assault level i am making for my family to use for fun. I thought (since i'm the only mapper), that'd i'd make a little sniping area with a non-solid brush over it with the outside texture matching the wall and the inside texture transparent. The problem is, when i test it, the defending bots (who appear by a weapon locker with sniper rifles) kill me everytime i go to my secret place. Is there a way around that, so that people and bots can't see me, but i can see them and shoot them.

Questions about certain errors


I have had a problem with UnrealED 3 i got with UT 2004 whan i start the editor the part where the vieworts should be are just white all the other stuff is working, there just isnt any viewports

shadow21 I've been having a problem with UT99, I'm trying to compile a mod, and I'm having troubles with the Mesh=LODMesh command, the error that pops up is 'bad expression in '=', what should I do, I'm at a loss here =( any help at all will be appreciated.

Replication : Forcing client update for "prone" Pawn

SuperApe: I have a Pawn class that is updated (Physics, Location, Rotation, AnimSequence & Anim frame) on Clients only when the Player has a line of sight to it. Since this Pawn is prone (not moving, not animating), there is no reason for the bNetDirty to update this Actor. Is there a simple way to make sure this Pawn is properly updated before the Player sees it?

SuperApe: Is this question clear enough? Anyone have a suggestion, solution or comment on this problem?

Graphik: You've not properly explained what you're trying to accomplish or how you're trying to do it.

In case I've mentally translated your unworkable description into something partway logical: How is your code going to guess when the Player is about to change his line of sight so as to 'properly update before the player sees it'?

EricBlade: I would guess off hand that actually doing all this checking for line of sights is probably more costly than just letting the regular relevance code do what it's supposed to do?

SuperApe: Thank you. What I mean by updating before the player sees it, is to make a one-time forced update (from the default setting of a property, which the Client has automatically, to the setting this prone Pawn should have on the Server), perhaps at map start. For example, my Pawn should be set to PHYS_None (because of a special state it is in), but the default is PHYS_Falling. On the server this Physics special setting is known, on the Client it is not (until the Client machine gets an update from the Server). So, as it is now, the Player on the Client turns a corner, sees the Pawn, the Pawn falls (PHYS_Falling), then after a moment, it updates the Pawn's location, rotation, and Physics, and the Pawn *snaps* back to where it should be. My question is related to this example. How can I force this Pawn to update the Physics setting in time to prevent it from falling when the Client Player sees it? As of yet, I do not have a workable solution. It appears to me to be a limitation of the Replication scheme. But, I thought I bring the problem up here, in case anyone would like to help me find a solution.

Graphik: Your expanded description still leaves me guessing, but I recommend you use the ModifyPlayer function. Mutator features a description of the function as well as an example of its use.

SuperApe: My suspicion is that this is not something that Graphik can help me with. (No offense, Graphik) But I will try to elaborate one point that appears to have been missed. Replication, as Unreal uses it by default, causes the above example situation automatically, where the Pawn as it exists on the Client gets an update to important non-default settings on properties such as Physics only after the Client Player has seen it. Unreal Replication is able to handle elaborate maps because it does not replicate everything all the time, only the bare minimum that's needed, when it's needed, to simulate what's happening on the Server. This example I've described above shows that scheme in action, but I am looking for a clever workaround to somehow force this Client Pawn to update either instantly (when the Client Player sees it) perhaps do something that will ensure the Client Pawn is already set to the proper (not the default) Physics setting before this line of sight occurs. The goal would be to avoid the situation where the Client Players see this Pawn fall and then snap back to the proper location a moment later (depending on current netspeed conditions). IOW, I have not coded some nifty line of sight stuff, this is just how Unreal Replication works now. I'm looking for some kind of override, so the Client Pawn does not rely on it's default property setting. I would consider whatever workaround works, and use it on other properties as well, such as Animation-related properties, etc.

EricBlade: bAlwaysRelevant ?

SuperApe: I thought about that. It seemed like overkill for a prone Pawn, but at the moment that appears to be the only working idea I've run across. I'm also not sure how well that property works, being switched on/off, which I would want to do if this Pawn is in it's special state, and when it leaves it and should act more like a normal Pawn on Clients. Thanks for the idea. :) Hopefully a more economical idea can be found as well.

EricBlade: Seems like months since I last looked at this page, but it should probably work pretty well - if you set it bAlwaysRelevant, and it's not doing anything, it shouldn't cause any major changes in net traffic, as it'll do it's replication stuff when the player connects, but then otherwise it isn't doing anything. As far as I can tell, setting bAlwaysRelevant on and off works pretty well - I've seen several Land of the Dead maps that have used a Security Camera type thing, but had to install a volume that makes whatever enters it bAlwaysRelevant, so that you could monitor things in a remote room (pawns would not be relevant halfway across the map, so you couldn't see them on remote cameras)

EntropicLqd: I'm guessing you've solved this problem by now. But, wouldn't it be possible to use the bAlwaysRelevant flag with an inventory object? It seems like a really ugly hack work around to me ... just an off the wall idea. It's probably crazy though.

Control point status dissapearing from hud.

plugwash: a friend of mine has made a domination map based on the hall of champions (original UT) it works fine singleplayer but in netplay the control point status usually dissapears from the hud on first death (i think at least one control point captured by someone is also a prerequisite to the dissapearance). Ive tried removing all actors that seem to be designed for that map and even exporting and re-importing into a new map but still the issue persists any ideas on what this could be or how to track it down?


I having a problem with replication. For the past 2 weeks all I have been doing is researching it and nothing can barely explain it. I understand some of it, or at least I think I do. No replication I make works, at all, in any cases. It is just getting to me too much, how it simply does not work.

Anyways I wrote this script. Remember, some coding in this may seem "noobish" but this is just practice for me you could say. What it does is when this item is added to your inventory, it takes the value of an array in another actor. The variable is called LastPlayed. This value is not replicated to the client. So what I'm trying to do here is (since I cant replicate a variable that exists in another actor I didnt make) is assign the value of LastPlayed to ClientIP and then replicate ClientIP over to the client where they process it.

Here is the class...

<uscript>//============================================================================== class ClientAKA extends Inventory config(AKACheckerLog);

var config string ClientLP[6000];

Replication { reliable if(ROLE==ROLE_Authority) ClientLP; }

simulated function PostBeginPlay() { local AKA a; local int i;

log("Stage1"); Super.PostBeginPlay();

log("Stage2"); foreach AllActors(Class'AKA', a) break;

if(Level.NetMode == NM_DedicatedServer) { log("Stage3"); for(i=0; i<6000; i++) { ClientLP[i]=a.LastPlayed[i]; } } LogAKA(); SaveConfig(); }

simulated function LogAKA() { local int i;

log("Stage4"); if(Level.NetMode != NM_DedicatedServer) { log("Stage5"); PlayerPawn(Owner).ClientMessage("Logging..."); log("v*************************-AKA Checker-*************************v"); for(i=0; i<20000 && ClientLP[i]!=""; i++) //log the aka log in their ut log file { log("LastPlayed["$i$"]="$ClientLP[i]); } log("^*************************-AKA Checker-*************************^"); PlayerPawn(Owner).ClientMessage("Logged the AKA.ini to your UNREALTOURNAMENT.LOG in your UT system directory."); } }</uscript>

I cant see what is being doen wrong, ywt ClientIP simply wont replicate. I've tried several techneques and to replicate this variable NONE of them work. For weeks I've been working on this exact mod which is so exausting seeing as I have no more resources. And I also have several other mods that dont work souly because of replication. Can anyone help me?

Xian: Well, although I don't have experience with UE2, the same principles as in UE1 should apply. From what I seem to remember, arrays can't be replicated. The only way to do it is the nooby hack that seems to go like this:

<uscript> class Test extends Whatever;

var string Testers[3];

replication {

   reliable if (Role == ROLE_Authority)


function ServerStuff () {

   local int i;
   Testers[0] = "Me";
   Testers[1] = "You";
   Testers[2] = "Other";
   for (i = 0; i < ArrayCount(Testers); ++ i)  


simulated function ClientStuff (string Entry, int i) {

   Testers[i] = Entry;


Also, as you have probably guessed, the class you are using to replicate things (Weapon, Info, Actor, Emitter etc.) has to exist on both server and client. You chose Inventory, which exists on both sides IF it was spawned on the server. Also, giving it to the player and adding it to the chain ensures the simulation of the class' functions (as well as setting it to SimulatedProxy which, iirc Inventories have them). I used ArrayCount to show you a nice way to get the number of elements in case you didn't know it :)

I know that hack sucks, but it is the only way to do it (from what I know). Or at least, to do it in UE1. Hope it helps.

Change Direction of Weapon Spin

UltraN00b: I'm creating a level for UT2004, in which the weapon bases rotate around the inside of a large cylinder. While the weapons rotate around the cylinder, they angle of the weapon changes as well. This looks great, except for the fact that they still rotate on their horisontal axis.

Is there any way to change the direction of the weapon's spin while on the weapon pad? Tilt the rotation so they still apear to rotate normaly, but at a different angle?

Opening Classes

Tgusagalpa: I'm starting a mutator that a Pawn recieves the weapon they are shot with. Should I reference the gun they are shot with through Instigator.Weapon or Projectile properties?

Xian: So if I got it straight... you shoot me with a SnowGun (yes I am original :P) and I'll receive it either when being shot, either after respawning, right ? (well for short you want to know how to "save" it, as you said, reference, the Attacker's weapon, correct ?).

It's even simpler than that. You use TakeDamage() and then do InstigatedBy.Weapon (or whatever parameter name it has since it can vary). Hmm from a quick glance at the source now, I see you can use the GameRules class to hook in the game ReduceDamage function (it uses the pointer GameRulesModifiers iirc). And you can do your thing there :)

Crashing during garbage collection??

EricBlade: I am getting reports of crashing on level change, from people who are running my custom Land of the Dead game type. We are so far unable to find a condition that specifically triggers it, but after a period of time, typically ranging from an hour to two or three hours, and anywhere from 1 to 10 level changes, the server will crash on level change. It appears to me that it is happening during Garbage Collection at the end of level, as the following from the log shows:

Log: Collecting garbage
Log: Purging garbage
Critical: UObject::GetPathName

.. it crashes at this same point on nearly all of the crashes that i've been sent logs for. What could I be doing that would cause this?

Xian: I'd have to see the source but my quickest guess would be an object still has an actor pointer that wasn't set to None and/or an Actor has an Object pointer which is not set to None on Destroyed() events. Generally speaking if it's "in use" it can't be deleted and it will create that problem.

EricBlade: Hm. That's what I'd thought might be the problem, except that I don't have any code that references actors or objects in this, except in local variables, so i'm pretty confused as to how my code would be causing something like this. A couple of people have told me that they have run the stock game for days without crashing, but we are getting incredibly regular crashes with mine in use. .. almost every variable in here that's not local is a string, int, float, or bool .. i did just notice that i had a class variable set to a string, in default properties, but it looks like the engine handled converting that to the proper class. Haven't got back with the server guy yet to try it.. :|

Here's a link to the code: http://pastebin.com/714417

And here's a link to the most recent crashlog: http://pastebin.com/714329

Plugwash: If you really care about bandwidth shouldn't you set stuff up so you can monitor it at the IP level?

Nobody: I'd rather set it than monitor it.

Plugwash: but monitoring it on a per client ip/port combination basis would allow you to tell for sure if your attempts to set it had worked correctly.


tgusagalpa: Is there any way to create a .psk file for uPaint, when exporting from maya, instead of having to ActorX? I know on the PLE you cannot have ActorX, so how do you export, and get a .psk?


SuperApe: I see in SkaarjPack_rc.SkaarjMeshes, there are the MESH definitions including the Animation NOTIFY declarations using #exec directives. I'd like to add some NOTIFYs to this list. For example, the Skaarjw Mesh animation sequence 'guncheck' should have the Sound'blade1s' play. I'm trying to define a FUNCTION=PlayGunCheckSound from my own Skaarj subclass and having no luck using this command:

<uscript>#exec MESH NOTIFY MESH=Skaarjw SEQ=guncheck TIME=0.2 FUNCTION=PlayGunCheckSound</uscript>

Without changing SkaarjPack_rc.SkaarjMeshes, is there any place I can append to this list of MESH NOTIFYs? Where does SkaarjPack_rc.SkaarjMeshes get used/read?

Anyone have info on adding to the MESH NOTIFY list?

Xian: I am not sure if you have to redefine the mesh, anim and texture redefinitions by reimporting it into your own class, but it should, theoretically work without it if you did it right. I assume we are talking about UE1 here ?

SuperApe: Actually, we're talking about adding a Mesh Notify to an existing VertexMesh in UE2.

Crouching with new model size.

Stinky: I have made all the classes in the mod I’m working on larger then or smaller then the default ut model. Everything works accept the crouching. Does anyone know what code to replace to make it so the models don’t fall through the ground when you crouch a lot? Also when I crouch the model stays the same height but the eye height drops to the default for ut 2004, and also the model stays the same size but falls halfway through the ground so the top of the head is at the default height. If I crouch multiple times the model just falls through the ground. Any ideas?

SuperApe: Crouching code, including eyeheight changes, is in Pawn and its subclasses.

Stinky: Well, I have edited the code in a class extending Pawn, When I crouch though, the eye height is correct for the model, but the model falls thought hte ground as if it were the standard UT 2004 heigh. Should i post a screen?

SuperApe: No need to post a screenie, we get it from your description of the problem. So, you're extending Pawn. Did you check the crouch code in Pawn's other subclasses?

GroundSpeed PLEASE HELP!

Stinky: I am writing a class system very similar to the RegularEngine but I can’t seem to get the GroundSpeed to change with the class. I then downloaded the RegularEngine and compiled it and realized that the GroundSpeed does not change correctly in the RegularEngine either (The sniper speed is supposed to increase to 550 but it doesn’t). Is there something else I need to do so the GroundSpeed changes with each class? Also to add on to my description, when I use the redemer secondary fire then come back into the player view the running speed does take effect.

Stinky: Will someone please help. I came up with a temp solution but it seems really wrong to do. I set a timer at the beginning of each spawn to adjust the ground speed for a few ticks.

SuperApe: You're right, that does sound wrong. So, what you're saying is you're using the same Pawn class, but trying to adjust GroundSpeed? And this can't be done with a Mutator using ModifyPlayer() or something?

Stinky: Yeah, the way im doing it now works, but it seems a little too complicated for what i think should be a simple task. I am working on a total conversion so a mutator wont do. Any ideas?

When running a server is there a file that is viewable that contains all the actor events such as kills and who won/lost the match?

Superflygizmo: I have been trying to find a way of logging who won or lost a match into a text file. I'm lost in this department and on the forums i have been on no-one has really given me some specifics on ways of getting around this. Basically i need this info to be written to a text file so that an outside program can see who won etc. People gave me hints on extending the console to do this but i have no idea where to start (total programming novice). But then i thought that if i ran a server on the same machine and had my game connect to it then the server must store this information somewhere as it has to share these results with all the other clients. Its a university project to create a non linear game and i decided to use the unreal engine.to get around loading cutscenes and different endings i decided that i could use a program called macromedia director to do all the level loading. As the maps must have multiple exits i thought that if i made a game type mod that when you reached exit 1 you ranked first in the level,exit two you ranked second and so forth. Then this outcome would be written to a text file that director could read and then director would interpret these results and know which level to load. I just dont really know which way to turn. Please help!!!

Sweavo: You're crazy if you think you can do this with no scripting! But what you want to do is not too hard once you understand how to script. Look in the wiki for getting started information. You want to build a Mutator. Mutator contains a method that is called at game end and you can extend this to write "XYZ won!" or whatever you like into the UT2004.log file. It's a steep curve to get started in scripting, but once you get the hang of it, you might even throw Director away and do the whole thing in the engine.

Nobody: Read up on Config Vars And .Ini Files and SaveConfig(). You can write a mutator that creates and writes to its own ini file (which is all text) and create variables that are saved to that file at the end of the game. Then all you need to do is have your external program open that ini file for read. Its really pretty simple as far as scripting goes; just a matter of using the correct syntax @ class declaration and variable declaration. After that just set the varibles you created equal to the data you want to save in that ini file and use SaveConfig() at the game end event.
Oh, you might also consider using ngstats and parsing the Unicode log it will save in the Logs folder in the ut dir. Might be easier just to script your own ini file, easier to parse.

Sweavo: Also: GameStats might be your friend


craze: hey, I could never get this to work correctly, can someone write something up on how exactly to make it work?

craze: guess new questions go at teh top... heh

Low gravity levels in UT99 the Right way

McNutcase: This seems blatantly obvious, but I can't find it: how does UT99 handle making levels low-gravity by default? I haven't been able to figure it out... I got approximately the right effect by setting bGravityZone to True in the LevelInfo properties and halving the magnitude of the Z-gravity, but that's an egregious hack and will break in conjunction with the LowGrav mutator. There's obviously another way to do it, since that "fix" isn't active in DM-Morpheus, but I haven't been able to find it. What am I missing here?

Tarquin: I suspect Morpheus does it at the ZoneInfo level, since the indoor areas have normal gravity.

McNutcase: Looks like it might have to break, then... I'll go and look for at least the right official magnitude, so as to keep the feel consistent...

Ch3z: I don't know if this helps or not, but the code in Botpack.LowGrav is very simple. It expands Mutator, gets rid of all UtJumpboots and sets the ZoneGravity properties of all ZoneInfo in the map to vect(0,0,-200) in the CheckReplacement function. That's all it does. I was also thinking you might look into embedding a mutator into your map that unregisters the lowgrav mutator if in the chain?? A thought.

McNutcase: in that case, hacking the LevelInfo properties won't break with LowGrav... although I suspect I want the gravity a bit higher than 200, since the default is 950. Certainly 200 is a bit low. Now I just need to figure out how to deal with exiting a WaterZone via a WarpZone...

Evilmrfrank: Low gravity shouldn't be changed in the level info. It should be changed in the zone info only. You can change the gravity settings there to whatever you want it to be.

Attaching karma actors to movers

Blue Ion: The deal is as simple as the question. I want to attach a karma actor to a mover so when it is triggered the karma actor would follow the mover and at the same time swing, be shot, and other fun stuff to do with karma actors.

The idea is to make an elevator that is held with chains that could swing and ultimately break when shot.

The KBSJoint should do the trick except that it won't work with anything that is either BSP geometry or an other karma actor, and during gameplay, when the karma is activated, the thing shoots of to the center of the world.

Foxpaw: It is possible that you are not setting up the KBSJoint correctly. It is intended to go between either a Karma simulated actor and another Karma simulated actor, or a Karma simulated actor and the world.

I believe that attaching to a mover will require a modest amount of coding. However, if you are going to have to custom code something it might not make sense to use Karma at all, and instead code your own elevator physics, since it is a fairly simple case.

Alternatively, you could get rid of the mover and make the whole thing work on Karma. That would also require some amount of scripting.

Calling movement(moveforward etc) from within script

Simul: Hi Im creating a script that reads in movement information from a java program on a remote computer and moves the player in unreal. That is working fine, and now I have 3 values (X,Y,Z) in my script, however I cant for the life of me work out how to emulate a keyboard/mouse input to use the information (like moveForward). At the moment I am able to use move() on xpawn however there has to be a less dodgy way to do this. I can get the rotation of the player working fine, its just the movement.

Xian: Hello! Unfortunately I don't know anything about UE 2, only UE 1, but I assume the best way (and possibly only way ?) is to modify the aBaseY variable in PlayerInput. One way would be changing the InputClass in Engine.PlayerController to your class extending PlayerInput and possibly adding hooking functions there (or simply do it easier by changing them directly in Engine.PlayerController). The reason I told you to use an Input class is that the input moments are best accessed in the PlayerInput ticking event, therefore you need to do it there. This was doing a quick skimming of the UT2kX code so it is not guaranteed to work, but may be a push in the right direction :)

Overriding a native source function in script.

Baz: Hi Im trying to override AONSWheeledCraft:: ProcessCarInput() in a subclass of ONSWheeledCraft. is this at all possible, or are all native functions final. Are native functions with the same name as script functions considered different because they dont have the same number?

Foxpaw: You can override UnrealScript functions declared as native, if they are not final. (Many are, but not all.) However, the function you have indicated does not have a corresponding UnrealScript function, so you cannot override it with UnrealScript. There is probrably an UnrealScript function that you can override to get the same result as you are trying to achieve.

Baz: oh well, my problem is that bIsInverted is set and checked in the native code, and if bIsInverted is true a vehicle wont reverse when its are upsidedown. Ive got a scorpian driving on the celing, but when you drive into a corner you cant drive out again.

Nobody: I don't know the code you are refering to, but can you intercept it when the user attempts reverse and check to see if bIsInverted=true and if so set vehicle's rotation 180º from current? If you do that in increments, maybe a for loop, then it might feel like it is some automatic feature of the vehicle, and not some funky hack of the game, like driving on the ceiling hehehehe just kiddin'.

Xian: Loops is a bad idea. best way to smoothen rotation changes is using DeltaTime.

Converting BSP to static mesh no longer evil?

UTF8_REPLACEMENT9;Tarquin:' There used to be this: udn2:ConvertingBspBrushesIsSuboptimal. However, I was looking for this page just now, and I couldn't see it linked from ANY other page on the UDN. Does that mean that maybe it's ok to do it now? Maybe they've improved the way UnrealEd converts to static meshes?

Ragdoll: I dont know of any improvements in the BSP->Static Mesh conversion. It seems ok for basic shapes like cubes etc but from my experience for complex meshes it is better to use a external 3D modelling application. This page explains it quite well:http://angelmapper.com/tutorials/uedmeshes.htm

Registering GameRules

Tarquin: Everywhere I've sene examples of using a GameRules class, I've seen this sort of code used to register it:


 if ( Level.Game.GameRulesModifiers == None ) {
   Level.Game.GameRulesModifiers = myRules;
 } else {


However, there's an AddGameModifier function in GameInfo that handles the case where no game rules are in the linked list. So you can just do this:




This seems simpler... or is there a reason it might not always work?

Nobody: I don't believe AddGameModifier was implemented until UT2004. That GameInfo link only goes to the UT2003 version of the class.

Hud with mouse problems?

Okay... I have been trying to create a little user interface for my game. Instead of the player looking around with the mouse, the player will have an overhead perspective and is able to interact with things via their mouse. The problem is, I can't exactly make that work. Here's what I've got so far. A custom PlayerController with some game related variables but also a call to Player.GUIController to turn it on... like this.

<uscript> class CustomPlayerController extends PlayerController;

var BaseGUIController HudController;

exec function MakeGUI() //it's an exec function just to make things easier for testing purposes {

  HudController = MQ_HudController(Player.GUIController);

} </uscript>

MQ_HudController is a custom GUIController that I thought I would need to add custom functionality. So, what that does is turns on the GUIController which activates mouse functionality. Here's where things get hard for me. I can't for the life of me figure out how the actual GUI pages and components for the menu's are 'activated' once the mouse is clicked on them. I've looked through all relevant classes (from BaseGUIController to GUI, GUIComponent etc...) Currently, I have no overhead perspective working because I wanted to get this completed first. All I want for the player to be able to do right now is be able to click anywhere on the ground (with the mouse of course) and then have the pawn of the player move there. Later I want to add other stuff, but I figure if I figure this out first, I can do the other stuff pretty fast. Can anyone help me to get the mouse able to be clicked on the ground and have the pawn move there? PS. I don't really want like an invisible GUIPage or anything infront of the hud.. if that's possible.

Nobody: Sounds like a 2D curser in a 3D world. He's gonna get teased in school. =( I think I would be going at it in this fasion:
Make curser invisible.
Declare an object with a location in 3D space (and a mesh or a sprite),
and set it's x and y = to the curser's x and y keeping it's z.
Change z in response user input via their configured jump and crouch keys.
if this objects vector location is = to another objects vect location (within it's collision radius maybe) when the mouse is clicked, or possibly the object fire(...)'s or whatever, then dostuff().
Maybe the lil guy will make friends in the 3D world now, hehehe. But this is like your the curser and it's in 3rd person view, why not make it firstperson view in fly mode? Then already have the navigation done, and you can use trace or watch for the other objects vector location and rotation to be where it would be right in front of you but not right in your face. My two cents. Fun Idea, I'd sure like to see it when it's done.

Almost ready to launch mod, but a few questions

Kou: Okay, I'm about ready to release a demo of a mod I just made, but I (stupidly) designed the text in my windows based on pixels, and I'm running on 1280x1024 resolution. Is there a simple way to snap everything into place or am I going to have to set it for each resolution each time? This is an example of what I currently have...


      C.SetPos(550, 292);
      C.DrawColor.R = 255;
      C.DrawColor.G = 255;
      C.DrawColor.B = 255;
      C.DrawText( "Error!", False );


Foxpaw: The typical way to resolve this is to multiply by some value based on the resolution. Usually fractional numbers are used and they are multiplied by the resolution, but you can just as easily multiply by the resolution divided by 1280x1024.


<uscript> local float XRes, YRes;

XRes = C.SizeX / 1280; YRes = C.SizeY / 1024;

C.SetPos(550*XRes, 292*YRes); </uscript>

Kou: Thanks, that (kinda) fixed the problem. I'm wondering how I may play different music in the Instant Action game configuration area rather than the generic UT2k4 menu music.

Warp Zones

Jezinator: Right, erm sorry if this looks a bit wierd but I've never written like this before. I have a problem with Warp Zones you see. Im creating a fundamentally mind boggling map using warp zones, not loads of warp zones, just two pairs of them. I have textured the sheet that defines the zone with AssaultFilmGrain becuase i couldn't find a transparent texture anywhere :) im using UT2K4 btw. Anyways the problem is that there is an area of the map behind the warp zone and the geometry is showing through in a very wierd way whenever I play the map. Its like the corridor behind the Zone (which has nothing to do with the zone itself) Is overriding the corridor that the Zone links to. The zone still works perfectly, but its just a glaring aesthetic problem. I am aware that that was perhaps not the best explanation ever but its a wierd problem. If there were some way of posting the map here.... Dunno, if anyone has any help, i would seriously appreciate it. Also I have two other, complete maps which I would like to distribute and don't know how.

'evil_blue_dude:UTF8_REPLACEMENT9;Rotate one of the zone portals 180 degress. If that doesnt work then rotate them both 180 degrees. (but be sure to try the first before trying the second)

Jezinator: Yes i did try that, even before I asked here, it doesn't help. I can't figure out why that happened.

Foxpaw: I'm not sure if I'm understanding the problem correctly, but it sounds like you might want to try setting the walls of the corridor that has the warpzone info in it to fake backdrop.

MythOpus: The author probably hasn't been here for some time now but don't the WarpZoneInfos override the texture they have on the surface anyways? Having that transparent texture could be throwing the WarpZoneInfo off and having it reveal BSP on the other side.

Collision And caft

FODHi im making a mod which is a subclass of decoration the only problem is that when i assign a static mesh to the class and play the level im finding all the wheeled craft are sinking into the meshes. I've got collision meshes on the objects and they work fine as just static meshs, but as soon as i use them in a script i find i can drive right through them? Im sure they were fine at one point, but my head so full of code im realy not sure anymore.lol.

MythOpus:By Wheeled Craft do you mean to imply you're using the karma system? If so you will need to create Karam Collision Hulls. Don't know if you already do have them or not though :S

FODI think the collision hulls are set ok (if i choose View colision in unrealed the meshs all have pink outlines.) ive got all the settings in collision in the actors properties set to on. Should i be using the simplified collision hull karma/line or box. Its real odd as im using the same static meshs for things like vehicle lifts and the collision is fine there. When i say wheeled craft i mean the scorpion,helbender,hovertenk,artillery and the shock tank. They dont go right through the mesh...just sink up to about their wheel axle. Like being in quicksand? Im sure the answer is blindingly obvious but its winding me up to be getting these sort of problems after all the coding ive just done.For a test made script that just places an actor onto the level:-

<uscript> class MyActor extends Actor placeable;

defaultproperties {



Now if i try to drive over this in a wheeled craft...quicksand!

but if i simply just place a static mesh into the map next to it ..the static mesh one is solid and

can be driven over? im confused.

The collision is fine if you side swipe the mesh or hit it with a flying craft or even if i just drive directly at it.

Just did another test..used the same script as above but this time made it a subclass of 'mover' and the collision is ok.?! I suppose i could derive the mod from a mover rather than a decoration but i think there are certain network issues with the 'mover' class which may upset the way my mod works.What are the properties that mover have that make it more solid?

ACTION_ShootTarget... what are the firing modes?

Tomko: Trying to setup the above action, but the bot just doesnt want to fire at the SetViewTarget I've assigned. Through reading this udn page (http://udn.epicgames.com/Two/ScriptedSequenceActions#ShootTarget), it lists AssaultRifle Modes, but I can't get those working either. I have an ACTION_SetViewTarget above it, which points to another xPawn for him to shoot, but it's a no go. The other pawn is in view, in distance, etc... just can't figure out what I might be doing wrong.

Any assistance would be greatly appreciated, there doesn't seem to be a wealth of information on this action, anywhere!

p.s. I've also tried the ACTION_FireWeaponAt to no avail.

Make bots/monsters ignore you?

Missilemaster: I'm very new to coding; right now I'm finishing up a modified Raptor with a "cloaking device", which puts an invisible skin on it. It works well, but, of course, bots and monsters can "see" it when it's cloaked. Besides map botpathing, I know basically nothing about bot AI. Does anyone know a relatively simple way to make computer opponents ignore this vehicle when it's cloaked (that is, when a variable is a certain value)?

Defx: I suggest taking a look at Invis Combo, there seems to be a function called SetInvisibility, hope this helps

Console Commands / exec function doesn't work

Jan: Which classes (UT99) can I use for adding new console commands? I used PlayerPawn but nothing happens if I typed in the command into the console. UT returns with "unrecognized command" message. I've tested it with a simple class like that:

<uscript>class something expands PlayerPawn

exec function LogStuff() {

 log("log tah f****** stuff");


Xian: UScript: Engine.PlayerPawn, Engine.Console, Engine.Inventory, Engine.HUD (and subclasses obviously)

Native: (apart from the above) Engine.Player, Engine.SubSystem, Engine.Client, Engine.Engine, Engine.GameInfo, Engine.Input, Engine.Level (NOT ENGINE.LEVELINFO), and of course, all their subclasses...

It isn't as simple as subclassing PlayerPawn and that's it... you need to subclass a proper player controller subclass (namely something like TMale1 or TMale2 which are children of TournamentPlayer which is a child class of PlayerPawn) and then insert them in the game with a mutator by hooking Engine.Mutator.ModifyLogin()

MythOpus: Well I'm pretty sure PlayerPawn DOES work with exec functions but as you said, you DO have to get it into the game somehow. If you created a class and put an exec function in it and thats it, its like... er... trying to use a coffee maker thats still in the car. You have to take it out of the car, i.e. have the player take 'control' of the PlayerPawn, take the coffeemaker out of the box and use it, i.e. Call the exec function on that PlayerPawn. If the player doesn't have control of the PlayerPawn when you call the exec function, then engine gives you the "unrecognized command" because it really doesn't know that command even exists.

Recent Changes & Image Upload/Deletion

Kartoshka: I noticed that the Recent Changes page doesn't show my username when uploading or deleting an image, only my IP address. My username does show up after a normal page edit though. Not a big deal, but maybe something to look at...:)

Mychaeel: It does show mine when I do anything – support for that is built in. I've noticed that I seem to be the only Unreal Wiki user whose user name is displayed when doing anything in the image uploader, though – I wonder why that is. Which URL do you use to access the Unreal Wiki? (Perhaps it's a cookie-related issue.)

Kartoshka: I use wiki.beyondunreal.com. I tried www.unrealwiki.com, but this just redirected me to wiki.beyondunreal.com. I tried logging in after entering www.unrealwiki.com just to be sure, and the same thing happened. (no username, just IP on upload and deletion). I am even using a different computer with a different IP address than before, so it doesn't seem likely to be a problem on my end.

Static Array Limit?

MM: Is there a limit to the [length] of a static array? (In Unreal Engine 1) Such as <uscript>var string testtxt[1000000] </uscript>

MythOpus: Yes I do believe there is a limit and its probably lower then UE 2.x. I can't give you exact specifics but you can try different values for the length of an array and see if the compiler complains. I'm not sure if it will but if it doesn't you should also try writing/reading to the last index of the array just to be sure.

Ambershee: If it's something that's going to be replicated, then the limit is horribly low. It's 9. I found that out the hard and horrible way.

Projectile Options changing replication

Neo_b: Hello, I wrote an item that changes nearby projectiles heading player's way acceleration in an opposite direction. Works fine in singleplayer, although It doesnt' work in multiplayer, presumably because of missing replication. I have no idea how to replicate it. Can anybody help me? I used foreach AllActors and if a projectile heads player on at least one axe, it its acceleration is changed to reversed velocity and rotation is also reversed by 180 degrees.