-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactor-ut-functions.html
200 lines (195 loc) · 27.5 KB
/
actor-ut-functions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head lang="en">
<title>UnrealWiki: Actor (UT)/Functions</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" media="screen, print"
href="shared/stylebase.structural.css">
<link rel="stylesheet" type="text/css" media="screen"
href="shared/template-default.css">
<link rel="stylesheet" type="text/css" media="screen"
href="shared/styles.chblue.css">
<link rel="stylesheet" type="text/css" media="print"
href="shared/template-default-print.css">
<!--[if IE 6]>
<style>
/* dirty hack for IE6. */
#quickbar {
position: absolute;
}
</style>
<![endif]-->
<link rel="start" href="http://wiki.beyondunreal.com/">
<link rel="glossary" href="http://wiki.beyondunreal.com/wiki/Terminology">
<link rel="help" href="http://wiki.beyondunreal.com/wiki/Using_The_Wiki">
<script type="text/javascript" src="shared/dhtml.js"></script>
<script type="text/javascript" src="shared/dhtml-menu.js"></script>
<style type="text/css">#dhtml-menu { background: #eee; padding: 5px 0px; margin-right: -20px; border: 1px solid #888; border-left: 1px solid #ccc; border-top: 1px solid #ccc; border-right: 1px solid #888; border-bottom: 1px solid #888 }
#dhtml-menu td { color: #000; font-family: Arial,Helvetica,sans-serif; font-size: 9pt; line-height: 13pt; padding: 1px 10px; cursor: default }
#dhtml-menu a { color: #000; font-family: Arial,Helvetica,sans-serif; font-size: 9pt; line-height: 13pt; text-decoration: none }
#dhtml-menu tt { font-family: monospace; font-size: 9pt }
#dhtml-menu-separator { height: 1px; background: red }
#dhtml-menu-anchor { cursor: default }
</style>
<script type="text/javascript" src="shared/expandable.js"></script>
</head>
<body onLoad="menuInit(); document.cookie='page=Actor_(UT)/Functions; path=/'" class="default">
<div id="scrolling"><!-- contains all except the fixed sidebar -->
<div id="topbar" class="bar">
<div class="righthalf">
<form class="inline" method="post" action="/wiki" enctype="application/x-www-form-urlencoded"><input type="text" name="search" size="20" /> <input type="submit" name="search" value="search" /></form>
</div>
<div class="lefthalf">
<script type="text/javascript"><!--
menuAlignRight = false;
//--></script>
<span><script type="text/javascript"><!--
menuWriteAnchor("Quick Navigation") //--></script></span> | <a href="(start).html">Home Page</a> | <a href="recent-changes.html">Recent Changes</a> | <a href="http://wiki.beyondunreal.com/wiki?action=editprefs">Preferences</a>
</div>
</div>
<div id="content"><!-- contains the title and article -->
<h1 class='pagetitle'><a href="actor-ut.html">Actor (UT)</a>/<a href="http://wiki.beyondunreal.com/wiki?back=Actor+(UT)/Functions">Functions</a></h1>
<div class="wiki"><h2><a name="0.1"></a>Native Functions</h2>
<h3><a name="0.1.1"></a>General Functions</h3>
<dl><dt>string ConsoleCommand (string Command) [native, but not final]</dt><dd>Execute a console command.</dd><dt>Error (coerce string S)</dt><dd>Handle an error and kill this one actor.</dd><dt><a href="actor.html">Actor</a> Spawn (class<<a href="actor.html">Actor</a>> SpawnClass, optional <a href="actor.html">Actor</a> SpawnOwner, optional name SpawnTag, optional vector SpawnLocation, optional rotator SpawnRotation)</dt><dd>Spawn an actor. Returns an actor of the specified class, not of class Actor (this is hardcoded in the compiler). Returns None if the actor could not be spawned (either the actor wouldn't fit in the specified location, or the actor list is full). Defaults to spawning at the spawner's location and with the spawner's rotation.</dd><dt>bool Destroy()</dt><dd>Destroy this actor. Returns true if destroyed, false if indestructable. Destruction is latent. It occurs at the end of the tick.</dd><dt>SetTimer (float NewTimerRate, bool bLoop)</dt><dd>If bLoop is true, causes <tt>Timer()</tt> events every NewTimerRate seconds. Otherwise, causes <tt>Timer()</tt> to be called once in NewTimerRate seconds. <code>SetTimer(0.0, False);</code> stops the timer.</dd></dl>
<h3><a name="0.1.2"></a>Latent Functions</h3>
<p><a href="latent-function.html">Latent Function</a> are special native functions that can only be used in <a href="state.html">state</a> code. (i.e. in labels outside of functions within states. See ScriptedPawn's script for excellent examples). They will cause script execution within the state to pause until some condition is met. All other functions and states in other classes will continue to execute normally.</p>
<p>While you cannot define new latent functions, it possible to pull a similar effect:</p>
<pre class="uscript"><span class="uscript-keyword">While</span> <span class="uscript-operator">(</span><span class="uscript-operator">!</span>SomeConditionIsMet<span class="uscript-operator">(</span><span class="uscript-operator">)</span><span class="uscript-operator">)</span> <span class="uscript-comment">//Pause until this function returns true</span>
Sleep<span class="uscript-operator">(</span><span class="uscript-number">0.0</span><span class="uscript-operator">)</span><span class="uscript-operator">;</span></pre><dl><dt>Sleep (float Seconds)</dt><dd>Waits for the specified amount of time. Note using continual low values of sleep() (<0.1) is not recommended, as this creates signnificant dependance on frame rate. For instance, the minigun has this problem, where different frame rates make it fire different amounts of bullets in a second. See <a href="http://www.clanvikings.org/tnse/images/minishots.jpg?nopic">[this graph]</a>.</dd><dt>FinishAnim ( )</dt><dd>Waits till the current animation is finished. WARNING: If you have an AnimEnd() that plays a new animation, this will never pass!</dd><dt>FinishInterpolation ( )</dt><dd>Only used mostly in movers. Pauses until the mover has finished interpolated to the next key.</dd></dl>
<h3><a name="0.1.3"></a>Collision</h3>
<dl><dt>SetCollision (optional bool NewColActors, optional bool NewBlockActors, optional bool NewBlockPlayers)</dt><dd></dd><dt>bool SetCollisionSize (float NewRadius, float NewHeight)</dt><dd></dd><dt><a href="actor.html">Actor</a> Trace (out vector HitLocation, out vector HitNormal, vector TraceEnd, optional vector TraceStart, optional bool bTraceActor, optional vector Extent)</dt><dd>Trace a line and see what it collides with first. Takes this actor's collision properties into account. Returns first hit actor, the <a href="levelinfo.html">LevelInfo</a> if hit level geometry, or <em class="em1">None</em> if hit nothing. bTraceActors specifies whether Trace should check for actors at all.</dd></dl>
<p><em class="em2">Highlander:</em> UT2003 info, Trace returns as expected the static mesh actor if it hits a static mesh, and returns the TerrainInfo if it hits terrain.</p>
<dl><dt>bool FastTrace (vector TraceEnd, optional vector TraceStart)</dt><dd>Returns <em class="em1">True</em> when there is no world geometry between the two points. The actor's location is used as start if no <em class="em1">TraceStart</em> is specified.</dd></dl>
<h3><a name="0.1.4"></a>Movement</h3>
<dl><dt>bool Move (vector Delta)</dt><dd>Moves an actor to Location + Delta. Stops if is blocked.</dd><dt>bool SetLocation (vector NewLocation)</dt><dd>Self-explanatory</dd><dt>bool SetRotation (rotator NewRotation)</dt><dd>Self-explanatory. See also <a href="rotator.html">rotator</a>.</dd><dt>bool MoveSmooth (vector Delta)</dt><dd>Moves an actor to Location + Delta. If blocked, the actor will slide on the object it collided with (i.e. as your player does when you walk into a wall).</dd><dt>AutonomousPhysics (float DeltaSeconds)</dt><dd>Used in PlayerPawn in netgames. Causes Physics to be handed with a DeltaTime of DeltaSeconds.</dd><dt>SetPhysics (EPhysics newPhysics)</dt><dd>Sets the actor's movement physics.</dd></dl>
<h3><a name="0.1.5"></a>Relations</h3>
<dl><dt>SetBase (<a href="actor.html">Actor</a> NewBase)</dt><dd></dd><dt>SetOwner (<a href="actor.html">Actor</a> NewOwner)</dt><dd></dd></dl>
<h3><a name="0.1.6"></a>Animations</h3>
<dl><dt>PlayAnim (name Sequence, optional float Rate, optional float TweenTime)</dt><dd>Plays an Animation (must have a mesh set for this to work!) Sequence=Anim sequence Name ; Rate = Animation Rate multiplier ; TweenTime = Amount of Time to "tween" into the first frame of this animation sequence if in a different sequence.</dd><dt>LoopAnim (name Sequence, optional float Rate, optional float TweenTime, optional float MinRate)</dt><dd>Plays an animation that loops until another animation is played.</dd><dt>TweenAnim (name Sequence, float Time)</dt><dd>Tween into a new animation.</dd><dt>bool IsAnimating ( )</dt><dd>Returns whether the actor's mesh currently plays an animation.</dd><dt>name GetAnimGroup (name Sequence)</dt><dd>Returns the group of the actor's current animation.</dd><dt>bool HasAnim (name Sequence)</dt><dd>Returns whether the specified animation is present for the actor's current mesh.</dd><dt>LinkSkelAnim (Animation Anim)</dt><dd>Generally never used. Will Link a Skeletal animation to a skeletal mesh.</dd></dl>
<h3><a name="0.1.7"></a>Sounds</h3>
<dl><dt>PlaySound (sound Sound, optional ESoundSlot Slot, optional float Volume, optional bool bNoOverride, optional float Radius, optional float Pitch)</dt><dd>Plays a sound. Slot = Sound slot (allows actors to play multiple sounds at once) ; bNoOverride: If true and a sound is currently playing in the specified slot, the new sound will not play (override the current sound).</dd><dt>PlayOwnedSound (sound Sound, optional ESoundSlot Slot, optional float Volume, optional bool bNoOverride, optional float Radius, optional float Pitch) [simulated]</dt><dd>This plays a sound that will not be replicated to network clients. It is generally used for first-person weapon sound effects, HUD notifications, etcetera.</dd><dt>DemoPlaySound (sound Sound, optional ESoundSlot Slot, optional float Volume, optional bool bNoOverride, optional float Radius, optional float Pitch) [simulated]</dt><dd></dd><dt>float GetSoundDuration (sound Sound)</dt><dd>Returns the length of the sound in seconds.</dd></dl>
<h3><a name="0.1.8"></a>AI Functions</h3>
<dl><dt>MakeNoise (float Loudness)</dt><dd>Inform other creatures that you've made a noise they might hear (they are sent a HearNoise message). Senders of MakeNoise should have an Instigator if they are not <a href="pawn-ut.html">Pawn (UT)</a>s.</dd><dt>bool PlayerCanSeeMe ( )</dt><dd>PlayerCanSeeMe returns true if some player has a line of sight to actor's location.</dd></dl>
<h3><a name="0.1.9"></a>Other Functions</h3>
<dl><dt>string GetMapName (string NameEnding, string MapName, int Dir)</dt><dd>The horribly slow function that uses an O(X^2) algorithm to find maps. When searching for maps it's useful to set the <em class="em1">NameEnding</em> parameter to the prefix for the type of maps you are looking for. The <em class="em1">MapName</em> parameter can be set to any map name (possibly even maps that don't exist) and its value is used to derive the name of the next map returned by this function. The <em class="em1">Dir</em> parameter should be set to 1 to move forwards in the list of map names, -1 to move backwards, and 0 to return the same map. A <em class="em1">Dir</em> of 0 is onle every used with a <em class="em1">MapName</em> value of "" to obtain the first map in the list of maps for a given map prefix. Be aware that this function will loop from the last map in a "list" to the "first" map in the list without warning.</dd><dt>GetNextSkin (string Prefix, string CurrentSkin, int Dir, out string SkinName, out string SkinDesc)</dt><dd>Another slow function that finds skins.</dd><dt>string GetURLMap ( )</dt><dd>Supposedly returns the current map's filename. (although gives false results in save games and demos).</dd><dt>string GetNextInt (string ClassName, int Num)</dt><dd>Reads through the INT files in the system directory and returns the classname of entries with a MetaClass given by ClassName.</dd><dt>GetNextIntDesc (string ClassName, int Num, out string Entry, out string Description)</dt><dd>Like GetNextINT, only supports the Description tag in INT files.</dd><dt>bool GetCacheEntry (int Num, out string GUID, out string Filename)</dt><dd>Reads through the cache.ini and returns the FileName and GUID of files within the cache directory.</dd><dt>bool MoveCacheEntry (string GUID, optional string NewFilename)</dt><dd>Will "move" an entry somewhere... (haven't fully tested it).</dd></dl>
<h2><a name="0.2"></a>Scripted Functions and Engine Notifications</h2>
<h3><a name="0.2.1"></a>General Notifications</h3>
<dl><dt>AnimEnd ( )</dt><dd>Called when an animation has completed.</dd><dt>Destroyed ( )</dt><dd>Called when the actor is destroyed.</dd><dt>Expired ( )</dt><dd>Called when the actor's LifeSpan has reached 0.</dd><dt>GainedChild (<a href="actor.html">Actor</a> Other)</dt><dd>Called when this actor becomes the Owner of other.</dd><dt>LostChild (<a href="actor.html">Actor</a> Other)</dt><dd>Called when this actor is no longer the Owner of other (including other being destroyed()).</dd><dt>Tick (float DeltaTime)</dt><dd>Called once each frame. DeltaTime is the time that has passed since the last frame.</dd><dt>Timer ( )</dt><dd>Called when the Timer has expired (Launched by SetTimer()).</dd><dt>TravelPreAccept ( )</dt><dd>Called when carried onto a new level, before AcceptInventory.</dd><dt>TravelPostAccept ( )</dt><dd>Called when carried into a new level, after AcceptInventory.</dd><dt>BecomeViewTarget ( )</dt><dd>Called by PlayerPawn when this actor becomes its ViewTarget.</dd></dl>
<h3><a name="0.2.2"></a>Initialisation</h3>
<p>(also see <a href="creating-actors-and-objects.html">Creating Actors and Objects</a>)</p>
<dl><dt>Spawned ( )</dt><dd>Called only when the actor is created using the Spawn method.</dd><dt>PreBeginPlay ( )</dt><dd>Called immediately before gameplay begins.</dd><dt>BeginPlay ( )</dt><dd>Called when gameplay begins.</dd><dt>PostBeginPlay ( )</dt><dd>Called after gameplay begins, before variables have been replicated to the clients.</dd><dt>SetInitialState ( ) [simulated]</dt><dd>Called after PostBeginPlay to set the initial state of the actor.</dd><dt>PostNetBeginPlay ( ) [simulated]</dt><dd>Called on net clients after the data packet that spawned this actor has been completely processed. However, replicated variables are NOT guarenteed to have reached the client.</dd></dl>
<h3><a name="0.2.3"></a>Triggers</h3>
<dl><dt>Trigger (<a href="actor.html">Actor</a> Other, <a href="pawn-ut.html">Pawn (UT)</a> EventInstigator)</dt><dd>Handled in subclasses.</dd><dt>UnTrigger (<a href="actor.html">Actor</a> Other, <a href="pawn-ut.html">Pawn (UT)</a> EventInstigator)</dt><dd>Handled in subclasses.</dd><dt>BeginEvent ( )</dt><dd></dd><dt>EndEvent ( )</dt><dd></dd></dl>
<h3><a name="0.2.4"></a>Physics and World Interaction</h3>
<dl><dt>HitWall (vector HitNormal, <a href="actor.html">Actor</a> HitWall)</dt><dd>Called when the actor hits a fall. ( NB, defined for projectile actors only and called from within touch() if the touching actor has blockall set. )</dd><dt>Falling ( )</dt><dd>Called when Pawns begin to fall.</dd><dt>Landed (vector HitNormal)</dt><dd>Called when an actor hits the ground. (What is the angle in relation to a flat plane that the ground must be at to be considered ground and not a wall?)</dd><dt>ZoneChange (<a href="zoneinfo.html">ZoneInfo</a> NewZone)</dt><dd>Called when actor is about to enter a new <a href="zone.html">Zone</a>.</dd><dt>Touch (<a href="actor.html">Actor</a> Other)</dt><dd>Called when Other touches this actor (and this actor doesn't block that actor).</dd><dt>PostTouch (<a href="actor.html">Actor</a> Other)</dt><dd>// called for PendingTouch actor after physics completes</dd><dt>UnTouch (<a href="actor.html">Actor</a> Other)</dt><dd>Called when Other is no longer touching this actor.</dd><dt>Bump (<a href="actor.html">Actor</a> Other)</dt><dd>Called when an actor bumps into this actor and is blocked.</dd><dt>BaseChange ( )</dt><dd>Called when the actor's base changes.</dd><dt>Attach (<a href="actor.html">Actor</a> Other)</dt><dd></dd><dt>Detach (<a href="actor.html">Actor</a> Other)</dt><dd></dd><dt>KillCredit (<a href="actor.html">Actor</a> Other)</dt><dd>Not implemented in Epic's Code.</dd><dt><a href="actor.html">Actor</a> SpecialHandling (<a href="pawn-ut.html">Pawn (UT)</a> Other)</dt><dd>Used by the navigation system to modify results.</dd><dt>bool EncroachingOn (<a href="actor.html">Actor</a> Other)</dt><dd>Called when this actor is trying to take up the same space as Other. (and block each other?)</dd><dt>EncroachedBy (<a href="actor.html">Actor</a> Other)</dt><dd>Called when Other has taken up this actor's space. (and block each other).</dd><dt>InterpolateEnd (<a href="actor.html">Actor</a> Other)</dt><dd></dd><dt>EndedRotation ( )</dt><dd>Called when an actor's rotation has reached DesiredRotation?</dd><dt>FellOutOfWorld ( )</dt><dd>This is called when an actor enters zone 0. Zone 0 is the region of non-subtracted space in your level. Actors can enter this zone through BSP errors or if they are of a type that does not collide with the world.</dd><dt>bool PreTeleport (<a href="teleporter.html">Teleporter</a> InTeleporter)</dt><dd>Called by InTeleporter when trying to Teleport this actor. Return true to prevent Teleporter from Teleporting.</dd><dt>PostTeleport (<a href="teleporter.html">Teleporter</a> OutTeleporter )</dt><dd>Not implemented?</dd></dl>
<h3><a name="0.2.5"></a>Damage</h3>
<dl><dt>KilledBy (<a href="pawn-ut.html">Pawn (UT)</a> EventInstigator)</dt><dd></dd><dt>TakeDamage (int Damage, <a href="pawn-ut.html">Pawn (UT)</a> EventInstigator, vector HitLocation, vector Momentum, name DamageType)</dt><dd>Implemented in subclasses.</dd></dl>
<h3><a name="0.2.6"></a>Rendering</h3>
<dl><dt>RenderOverlays (<a href="canvas.html">Canvas</a> Canvas)</dt><dd>Draw on canvas before flash and fog are applied. (used for drawing weapons). Note that only the PlayerPawn receives this call from the engine.</dd><dt>RenderTexture (<a href="scriptedtexture-ut.html">ScriptedTexture (UT)</a> Tex)</dt><dd>Called when a scripted texture with this Actor set as NotifyActor needs rendering.</dd><dt>SetDisplayProperties (ERenderStyle NewStyle, texture NewTexture, bool bLighting, bool bEnviroMap)</dt><dd>Set the display properties of an actor. By setting them through this function, it allows the actor to modify other components (such as a <a href="pawn-ut.html">Pawn (UT)</a>'s <a href="weapon-ut.html">Weapon (UT)</a>) or to adjust the result based on other factors (such as a <a href="pawn-ut.html">Pawn (UT)</a>'s other <a href="inventory-ut.html">Inventory (UT)</a> wanting to affect the result)</dd><dt>SetDefaultDisplayProperties ( )</dt><dd>Sets the default display properties similar to SetDisplayProperties.</dd></dl>
<h3><a name="0.2.7"></a>Messages</h3>
<dl><dt>BroadcastMessage (coerce string Msg, optional bool bBeep, optional name Type)</dt><dd>Broadcast a string message to all players. This calls ClientMessage on all <a href="pawn-ut.html">Pawn (UT)</a>s (see <a href="pawn-ut-events.html">Pawn (UT)/Events</a>). See <a href="specialevent.html">SpecialEvent</a> for an example. Type can be one of 'Event' (default), 'CriticalEvent', 'Say', 'TeamSay', 'DeathMessage', 'Pickup' and maybe other types for custom HUD classes.</dd><dt>BroadcastLocalizedMessage (class<<a href="localmessage-ut.html">LocalMessage (UT)</a>> Message, optional int Switch, optional <a href="playerreplicationinfo.html">PlayerReplicationInfo</a> RelatedPRI_1, optional <a href="playerreplicationinfo.html">PlayerReplicationInfo</a> RelatedPRI_2, optional <a href="object.html">Object</a> OptionalObject)</dt><dd>Broadcast a localized message to all players. Most message deal with 0 to 2 related PRIs. The <a href="localmessage-ut.html">LocalMessage (UT)</a> class defines how the PRI's and optional actor are used.</dd></dl>
<h3><a name="0.2.8"></a>Other Functions</h3>
<dl><dt>HurtRadius (float DamageAmount, float DamageRadius, name DamageName, float Momentum, vector HitLocation) [final]</dt><dd>Hurt other actors within a radius of this actor. <a href="explosionchain.html">ExplosionChain</a> uses this, for example.</dd><dt>string GetItemName (string FullName)</dt><dd>Returns the string representation of the name of an object without the package prefixes.</dd><dt>string GetHumanName ( )</dt><dd>Returns the human readable string representation of an object.</dd></dl>
<hr class="thin"><p><em class="em2">Mychaeel:</em> I've seen that elsewhere too – I really think that everything up to and including the "function" keyword should be stripped from function prototype here on the Wiki in order to keep the clutter at a minimum. It's much more important to see that a function returns a string value than knowing that it's native(123).</p>
<p><em class="em2">Wormbo:</em> Ok, how about putting really important stuff (final, static, etc.) in brackets behind the function definition?<br>HurtRadius (float DamageAmount, float DamageRadius, name DamageName, float Momentum, vector HitLocation) [final]</p>
<p><em class="em2">Mychaeel:</em> I could live with that. <img alt=":-)" src="emoticons/smile.gif" align="middle"></p>
<p><em class="em2">Wormbo:</em> How's that?</p>
<p><em class="em2">Mychaeel:</em> Much tidier <img alt=":-)" src="emoticons/smile.gif" align="middle"></p>
<p><em class="em2">Hugh:</em> I've just made a change to the SetTimer() description - I think I'm right, but can someone confirm?</p>
<p><em class="em2">Zedsquared:</em> Looks good but has anyone experimented to see what happens if timer() takes longer than TimerRate to execute? do you get another event fired or will it wait?</p>
<p><em class="em2">Mychaeel:</em> Since UnrealScript code doesn't execute in parallel and lengthy execution of code in Timer blocks everything else, the engine will simply fire the next timer event in the next tick.</p>
<p><em class="em2">BesigedB:</em> Tick, tock, tick, tock.</p>
<p><em class="em2">Highlander:</em> I guess this is a Trace related question, ive noticed that when a trace() hits terrain the HitLocation points towards the TerrainInfo actor ?? Am i correct or am i loosing my mind?</p>
<p><em class="em2">Claw:</em> Hmm, are you certain it's the HitLocation? I experienced something similar in UT; when a Trace hit the Level, the HitActor would be the LevelInfo (maybe ZoneInfo if one existed, I never checked). Maybe your code uses HitActor.Location?</p>
<p><em class="em2">Highlander:</em> Positive, it doesnt matter as i found a way around the particular problem that uses less traces. It does return the TerrainInfo as the actor however, the vsize of the hitlocation was 3000units + in my tests. (The trace was 128 units long) and i was approximately 3000 units from the center of the map where the terrain info was.</p>
<p><em class="em2">Foxpaw:</em> Hitlocation is relative to the center of the world, as far as I know... I think that the terraininfo and center of the map just coincided. Can someone confirm this? I've noticed that in UT2003 instantfire weapons scratch the hitlocation and replace it with the end of the trace instead of the point where the trace actually impacted the map, that seems silly but I expect it's done that way for a reason.</p>
<p><em class="em2">Claw:</em> Strange, when I just tested it again with the newest patch, the HitLocation definitely wasn't the HitActor's Location. It wasn't the correct spot either. But I verified the error is linked to the position where the trace starts. From the center of the map Trace works allright.</p>
<p><em class="em2">Foxpaw:</em> HitLocation isn't usually the location of the actor you hit, but instead the point upon that objects collision sphere/cylinder/whatever. I'm not sure why your traces would not be returning the correct location for hitlocation when you hit the world - it works fine for me.</p>
<script type="text/javascript"><!--
menuItemAdd("Native Functions", "#0.1");
menuItemAdd("<tt> </tt>General Functions", "#0.1.1");
menuItemAdd("<tt> </tt>Latent Functions", "#0.1.2");
menuItemAdd("<tt> </tt>Collision", "#0.1.3");
menuItemAdd("<tt> </tt>Movement", "#0.1.4");
menuItemAdd("<tt> </tt>Relations", "#0.1.5");
menuItemAdd("<tt> </tt>Animations", "#0.1.6");
menuItemAdd("<tt> </tt>Sounds", "#0.1.7");
menuItemAdd("<tt> </tt>AI Functions", "#0.1.8");
menuItemAdd("<tt> </tt>Other Functions", "#0.1.9");
menuItemAdd("Scripted Functions and Engine Notifications", "#0.2");
menuItemAdd("<tt> </tt>General Notifications", "#0.2.1");
menuItemAdd("<tt> </tt>Initialisation", "#0.2.2");
menuItemAdd("<tt> </tt>Triggers", "#0.2.3");
menuItemAdd("<tt> </tt>Physics and World Interaction", "#0.2.4");
menuItemAdd("<tt> </tt>Damage", "#0.2.5");
menuItemAdd("<tt> </tt>Rendering", "#0.2.6");
menuItemAdd("<tt> </tt>Messages", "#0.2.7");
menuItemAdd("<tt> </tt>Other Functions", "#0.2.8");
menuWrite() //--></script></div>
</div>
<div id="footer" class="bar">
<p><form method="post" action="http://wiki.beyondunreal.com/wiki" enctype="application/x-www-form-urlencoded">
<a href="(start).html">Home Page</a> | <a href="actor-ut.html">Actor (UT)</a> | <a href="recent-changes.html">Recent Changes</a> | <a href="http://wiki.beyondunreal.com/wiki?action=editprefs">Preferences</a><br>
<a href="http://wiki.beyondunreal.com/wiki?action=edit&id=Actor_(UT)/Functions">Edit text of this page</a> | <a href="http://wiki.beyondunreal.com/wiki?action=history&id=Actor_(UT)/Functions">View other revisions</a><br>Last edited September 8, 2006 12:03 <a href="http://wiki.beyondunreal.com/wiki?action=browse&diff=1&id=Actor_(UT)/Functions">(diff)</a><br>Search: <input type="text" name="search" size="20" /><input type="hidden" name="dosearch" value="1" /><br><br><small><a href="http://wiki.beyondunreal.com/wiki/Actor_(UT)/Functions">Original page</a> – copy created Sat, Jun 23, 2007</small><div></div>
</form>
</p>
<p>Describe the new page here.
</p>
</div>
</div><!-- close of "scrolling" div -->
<div id="quickbar">
<div id="logo"><a href="http://wiki.beyondunreal.com/"><img src="shared/wikilogo.jpg" width="143" height="100" border="0"></a>
</div>
<div class="qbsitename">
<p>The Unreal Engine Documentation Site</p>
</div>
<div class="qbsection">
<p><a href="metatopics.html">Wiki Community</a></p>
<p><a href="category-category.html">Topic Categories</a></p>
<p><a href="/cgi-bin/imageupload.cgi/wiki-ext/imageupload.htt" target="_blank ">Image Uploads</a></p>
<p><a href="http://wiki.beyondunreal.com/wiki?action=random">Random Page</a></p>
<p><a href="recent-changes.html">Recent Changes</a></p>
<p><a href="offline-wiki.html">Offline Wiki</a></p>
</div><div class="qbsection">
<p><a href="unreal-engine.html">Unreal Engine</a></p>
<p><a href="console-commands.html">Console Commands</a></p>
<p><a href="terminology.html">Terminology</a></p>
<p><a href="category-faq.html">FAQs</a></p>
<p><a href="help-desk.html">Help Desk</a></p>
</div><div class="qbsection">
<p><a href="topics-on-mapping.html">Mapping Topics</a></p>
<p><a href="mapping-lessons.html">Mapping Lessons</a></p>
<p><a href="unrealed-3.html">UnrealEd Interface</a></p>
</div><div class="qbsection">
<p><a href="unrealscript.html">UnrealScript Topics</a></p>
<p><a href="unrealscript-lessons.html">UnrealScript Lessons</a></p>
<p><a href="making-mods.html">Making Mods</a></p>
<p><a href="class-tree.html">Class Tree</a></p>
</div><div class="qbsection">
<p><a href="topics-on-modeling.html">Modeling Topics</a></p>
</div><div class="qbsection">
<p><a href="chongqing-page.html">Chongqing Page</a></p>
<p><a href="log-in.html">Log In</a></p></div>
</div>
</body></html>