https://wiki.beyondunreal.com/w/api.php?action=feedcontributions&user=SeriousBarbie&feedformat=atomUnreal Wiki - User contributions [en]2017-11-17T21:17:09ZUser contributionsMediaWiki 1.25.1https://wiki.beyondunreal.com/UE1:SkaarjTrooper_(UT)?diff=46431UE1:SkaarjTrooper (UT)2017-07-17T14:35:16Z<p>SeriousBarbie: -"<br>"</p>
<hr />
<div>{{infobox class<br />
| package = UnrealI<br />
| parent1 = Skaarj<br />
| parent2 = ScriptedPawn<br />
| parent3 = Pawn<br />
| parent4 = Actor<br />
| parent5 = Object<br />
}}<br />
{{autogenerated}}<br />
SkaarjTrooper.<br />
<br />
==Properties==<br />
===Property group 'SkaarjTrooper'===<br />
====WeaponType====<br />
'''Type:''' [[class]]<{{cl|Weapon}}><br />
<br />
<!-- enter variable description --><br />
<br />
'''Default value:''' [[Types#Class|Class]]'{{cl|DispersionPistol|UnrealShare}}'<br />
<br />
===Internal variables===<br />
====duckTime====<br />
'''Type:''' [[float]]<br />
<br />
<!-- enter variable description --><br />
<br />
====myWeapon====<br />
'''Type:''' {{cl|Weapon}}<br />
<br />
<!-- enter variable description --><br />
<br />
===Default values===<br />
{| class="list defaults"<br />
! Property<br />
! Value<br />
|-<br />
| {{tl|Buoyancy||Actor properties}}<br />
| 125.0<br />
|-<br />
| {{tl|CarcassType||ScriptedPawn properties}}<br />
| [[Types#Class|Class]]'{{cl|TrooperCarcass|UnrealI}}'<br />
|-<br />
| {{tl|ClawDamage||Skaarj}}<br />
| 10<br />
|-<br />
| {{tl|CollisionHeight||Actor properties}}<br />
| 42.0<br />
|-<br />
| {{tl|CollisionRadius||Actor properties}}<br />
| 32.0<br />
|-<br />
| {{tl|CombatStyle||Pawn}}<br />
| 0.3<br />
|-<br />
| {{tl|GroundSpeed||Pawn}}<br />
| 400.0<br />
|-<br />
| {{tl|Health||Pawn}}<br />
| 170<br />
|-<br />
| {{tl|LungeDamage||Skaarj}}<br />
| 20<br />
|-<br />
| {{tl|Mass||Actor properties}}<br />
| 125.0<br />
|-<br />
| {{tl|Mesh||Actor properties}}<br />
| {{cl|LodMesh}}'UnrealI.sktrooper'<br />
|-<br />
| {{tl|RangedProjectile||ScriptedPawn properties}}<br />
| None<br />
|-<br />
| {{tl|Skin||Actor properties}}<br />
| {{cl|Texture}}'UnrealI.Skins.sktrooper1'<br />
|-<br />
| {{tl|SpinDamage||Skaarj}}<br />
| 15<br />
|}<br />
<br />
==Functions==<br />
===Events===<br />
====PreBeginPlay====<br />
{{code|event '''PreBeginPlay''' ()}}<br />
<br />
'''Overrides:''' {{tl|PreBeginPlay|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
===Other instance functions===<br />
====CanFireAtEnemy====<br />
{{code|function [[bool]]&nbsp;'''CanFireAtEnemy''' ()}}<br />
<br />
'''Overrides:''' {{tl|CanFireAtEnemy|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====ChangedWeapon====<br />
{{code|function '''ChangedWeapon''' ()}}<br />
<br />
'''Overrides:''' {{tl|ChangedWeapon|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====Died====<br />
{{code|function '''Died''' ({{cl|Pawn}}&nbsp;'''Killer''', [[name]]&nbsp;'''damageType''', {{tl|Vector|Object|structs}}&nbsp;'''HitLocation''')}}<br />
<br />
'''Overrides:''' {{tl|Died|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayChallenge====<br />
{{code|function '''PlayChallenge''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayChallenge|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayCock====<br />
{{code|function '''PlayCock''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayCock|Skaarj|instance functions}}<br />
<br />
If SkaarjTrooper's weapon and ''Weapon.CockingSound'' is given, that sound is played on ''SLOT_Interact''.<br />
<br />
Probably a bug is playing ''Weapon.CockingSound'', if it is empty but ''Weapon.SelectSound'' is given:<br />
<pre>if ( Weapon.CockingSound != None )<br />
PlaySound(Weapon.CockingSound, SLOT_Interact,,,700);<br />
else if ( Weapon.SelectSound != None )<br />
PlaySound(Weapon.CockingSound, SLOT_Interact,,,700);</pre><br />
<br />
====PlayFiring====<br />
{{code|function '''PlayFiring''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayFiring|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayLanded====<br />
{{code|function '''PlayLanded''' ([[float]]&nbsp;'''impactVel''')}}<br />
<br />
'''Overrides:''' {{tl|PlayLanded|Skaarj|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayMovingAttack====<br />
{{code|function '''PlayMovingAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayMovingAttack|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayPatrolStop====<br />
{{code|function '''PlayPatrolStop''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayPatrolStop|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRangedAttack====<br />
{{code|function '''PlayRangedAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRangedAttack|Skaarj|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRunning====<br />
{{code|function '''PlayRunning''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRunning|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayTakeHit====<br />
{{code|function '''PlayTakeHit''' ([[float]]&nbsp;'''tweentime''', {{tl|Vector|Object|structs}}&nbsp;'''HitLoc''', [[int]]&nbsp;'''damage''')}}<br />
<br />
'''Overrides:''' {{tl|PlayTakeHit|Skaarj|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayThreatening====<br />
{{code|function '''PlayThreatening''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayThreatening|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayVictoryDance====<br />
{{code|function '''PlayVictoryDance''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayVictoryDance|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====Shield====<br />
{{code|function '''Shield''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====TossWeapon====<br />
{{code|function '''TossWeapon''' ()}}<br />
<br />
'''Overrides:''' {{tl|TossWeapon|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TryToDuck====<br />
{{code|function '''TryToDuck''' ({{tl|Vector|Object|structs}}&nbsp;'''duckDir''', [[bool]]&nbsp;'''bReversed''')}}<br />
<br />
'''Overrides:''' {{tl|TryToDuck|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====WarnTarget====<br />
{{code|function '''WarnTarget''' ({{cl|Pawn}}&nbsp;'''shooter''', [[float]]&nbsp;'''projSpeed''', {{tl|Vector|Object|structs}}&nbsp;'''FireDir''')}}<br />
<br />
'''Overrides:''' {{tl|WarnTarget|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
==States==<br />
===Charging===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|Charging|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====Charging.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|Charging.EndState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
===Hunting===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|Hunting|Skaarj}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|EnemyNotVisible||Pawn}}<br />
<br />
====Hunting.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|Hunting.EndState|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
===MeleeAttack===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|MeleeAttack|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|Bump||ScriptedPawn}}, {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
===RangedAttack===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|RangedAttack|Skaarj}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====RangedAttack.AnimEnd====<br />
{{code|event '''AnimEnd''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.AnimEnd|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.Bump====<br />
{{code|event '''Bump''' ({{cl|Actor}}&nbsp;'''Other''')}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.Bump|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.EndState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.TakeDamage====<br />
{{code|event '''TakeDamage''' ([[int]]&nbsp;'''Damage''', {{cl|Pawn}}&nbsp;'''instigatedBy''', {{tl|Vector|Object|structs}}&nbsp;'''hitlocation''', {{tl|Vector|Object|structs}}&nbsp;'''momentum''', [[name]]&nbsp;'''damageType''')}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.TakeDamage|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.KeepAttacking====<br />
{{code|function '''KeepAttacking''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.KeepAttacking|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.PlayRangedAttack====<br />
{{code|function '''PlayRangedAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.PlayRangedAttack|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.TryToDuck====<br />
{{code|function '''TryToDuck''' ({{tl|Vector|Object|structs}}&nbsp;'''duckDir''', [[bool]]&nbsp;'''bReversed''')}}<br />
<br />
'''Overrides:''' {{tl|TryToDuck}} ''(global)''<br />
<br />
<!-- enter function description --><br />
<br />
===Retreating===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|Retreating|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|EnemyNotVisible||Pawn}}, {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====Retreating.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|EndState|Object}} ''(global)''<br />
<br />
<!-- enter function description --><br />
<br />
===Startup===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|StartUp|ScriptedPawn}}<br />
<br />
'''[[States#Modifiers|Modifiers]]:''' auto<br />
<br />
====Startup.BeginState====<br />
{{code|event '''BeginState''' ()}}<br />
<br />
'''Overrides:''' {{tl|StartUp.BeginState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====Startup.SetHome====<br />
{{code|function '''SetHome''' ()}}<br />
<br />
'''Overrides:''' {{tl|StartUp.SetHome|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
===TacticalMove===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|TacticalMove|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====TacticalMove.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|TacticalMove.EndState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
===TakeHit===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|TakeHit|Skaarj}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|Bump||ScriptedPawn}}, {{tl|HearNoise||ScriptedPawn}}, {{tl|HitWall||Actor events}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====TakeHit.BeginState====<br />
{{code|event '''BeginState''' ()}}<br />
<br />
'''Overrides:''' {{tl|TakeHit.BeginState|Skaarj}}<br />
<br />
<!-- enter function description --></div>SeriousBarbiehttps://wiki.beyondunreal.com/UE1:Skaarj_instance_functions_(UT)?diff=46430UE1:Skaarj instance functions (UT)2017-07-17T01:14:15Z<p>SeriousBarbie: PlayCock: description</p>
<hr />
<div>{{infobox class part<br />
| class = Skaarj<br />
| part = instance functions<br />
| parent1 = ScriptedPawn<br />
| parent2 = Pawn<br />
| parent3 = Actor<br />
| parent4 = Object<br />
}}<br />
{{autogenerated}}<br />
==Instance functions==<br />
====AttitudeToCreature====<br />
{{code|function {{tl|EAttitude|Pawn}}&nbsp;'''AttitudeToCreature''' ({{cl|Pawn}}&nbsp;'''Other''')}}<br />
<br />
'''Overrides:''' {{tl|AttitudeToCreature|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====ClawDamageTarget====<br />
{{code|function '''ClawDamageTarget''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayAcquisitionSound====<br />
{{code|function '''PlayAcquisitionSound''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayAcquisitionSound|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayBigDeath====<br />
{{code|function '''PlayBigDeath''' ([[name]]&nbsp;'''DamageType''')}}<br />
<br />
'''Overrides:''' {{tl|PlayBigDeath|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayCock====<br />
{{code|function '''PlayCock''' ()}}<br />
<br />
Empty function in this abstract class; may be overridden in child classes.<br />
<br />
====PlayDive====<br />
{{code|function '''PlayDive''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayDive|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayFearSound====<br />
{{code|function '''PlayFearSound''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayFearSound|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayGutDeath====<br />
{{code|function '''PlayGutDeath''' ([[name]]&nbsp;'''DamageType''')}}<br />
<br />
'''Overrides:''' {{tl|PlayGutDeath|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayHeadDeath====<br />
{{code|function '''PlayHeadDeath''' ([[name]]&nbsp;'''DamageType''')}}<br />
<br />
'''Overrides:''' {{tl|PlayHeadDeath|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayInAir====<br />
{{code|function '''PlayInAir''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayInAir|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayLanded====<br />
{{code|function '''PlayLanded''' ([[float]]&nbsp;'''impactVel''')}}<br />
<br />
'''Overrides:''' {{tl|PlayLanded|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayLeftDeath====<br />
{{code|function '''PlayLeftDeath''' ([[name]]&nbsp;'''DamageType''')}}<br />
<br />
'''Overrides:''' {{tl|PlayLeftDeath|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayMeleeAttack====<br />
{{code|function '''PlayMeleeAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayMeleeAttack|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayOutOfWater====<br />
{{code|function '''PlayOutOfWater''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayOutOfWater|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRangedAttack====<br />
{{code|function '''PlayRangedAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRangedAttack|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRightDeath====<br />
{{code|function '''PlayRightDeath''' ([[name]]&nbsp;'''DamageType''')}}<br />
<br />
'''Overrides:''' {{tl|PlayRightDeath|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRoamingSound====<br />
{{code|function '''PlayRoamingSound''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRoamingSound|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlaySwimming====<br />
{{code|function '''PlaySwimming''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayTakeHit====<br />
{{code|function '''PlayTakeHit''' ([[float]]&nbsp;'''tweentime''', {{tl|Vector|Object|structs}}&nbsp;'''HitLoc''', [[int]]&nbsp;'''damage''')}}<br />
<br />
'''Overrides:''' {{tl|PlayTakeHit|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayTakeHitSound====<br />
{{code|function '''PlayTakeHitSound''' ([[int]]&nbsp;'''Damage''', [[name]]&nbsp;'''damageType''', [[int]]&nbsp;'''Mult''')}}<br />
<br />
'''Overrides:''' {{tl|PlayTakeHitSound|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayThreateningSound====<br />
{{code|function '''PlayThreateningSound''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayThreateningSound|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayTurning====<br />
{{code|function '''PlayTurning''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayTurning|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayWaiting====<br />
{{code|function '''PlayWaiting''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayWaiting|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayWaitingAmbush====<br />
{{code|function '''PlayWaitingAmbush''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayWaitingAmbush|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayWalking====<br />
{{code|function '''PlayWalking''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayWalking|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PreSetMovement====<br />
{{code|function '''PreSetMovement''' ()}}<br />
<br />
'''Overrides:''' {{tl|PreSetMovement|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PushButtons====<br />
{{code|function '''PushButtons''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====RunStep====<br />
{{code|function '''RunStep''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====SetMovementPhysics====<br />
{{code|function '''SetMovementPhysics''' ()}}<br />
<br />
'''Overrides:''' {{tl|SetMovementPhysics|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====Speak====<br />
{{code|function '''Speak''' ()}}<br />
<br />
'''Overrides:''' {{tl|Speak|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====SpeakOrderTo====<br />
{{code|function '''SpeakOrderTo''' ({{cl|ScriptedPawn}}&nbsp;'''TeamMember''')}}<br />
<br />
'''Overrides:''' {{tl|SpeakOrderTo|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====SpeakTo====<br />
{{code|function '''SpeakTo''' ({{cl|ScriptedPawn}}&nbsp;'''Other''')}}<br />
<br />
'''Overrides:''' {{tl|SpeakTo|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====SpinDamageTarget====<br />
{{code|function '''SpinDamageTarget''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====TweenToFalling====<br />
{{code|function '''TweenToFalling''' ()}}<br />
<br />
'''Overrides:''' {{tl|TweenToFalling|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TweenToFighter====<br />
{{code|function '''TweenToFighter''' ([[float]]&nbsp;'''tweentime''')}}<br />
<br />
'''Overrides:''' {{tl|TweenToFighter|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TweenToPatrolStop====<br />
{{code|function '''TweenToPatrolStop''' ([[float]]&nbsp;'''tweentime''')}}<br />
<br />
'''Overrides:''' {{tl|TweenToPatrolStop|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TweenToRunning====<br />
{{code|function '''TweenToRunning''' ([[float]]&nbsp;'''tweentime''')}}<br />
<br />
'''Overrides:''' {{tl|TweenToRunning|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TweenToSwimming====<br />
{{code|function '''TweenToSwimming''' ([[float]]&nbsp;'''tweentime''')}}<br />
<br />
'''Overrides:''' {{tl|TweenToSwimming|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TweenToWaiting====<br />
{{code|function '''TweenToWaiting''' ([[float]]&nbsp;'''tweentime''')}}<br />
<br />
'''Overrides:''' {{tl|TweenToWaiting|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TweenToWalking====<br />
{{code|function '''TweenToWalking''' ([[float]]&nbsp;'''tweentime''')}}<br />
<br />
'''Overrides:''' {{tl|TweenToWalking|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====WalkStep====<br />
{{code|function '''WalkStep''' ()}}<br />
<br />
<!-- enter function description --></div>SeriousBarbiehttps://wiki.beyondunreal.com/UE1:SkaarjTrooper_(UT)?diff=46429UE1:SkaarjTrooper (UT)2017-07-17T01:11:22Z<p>SeriousBarbie: PlayCock: description</p>
<hr />
<div>{{infobox class<br />
| package = UnrealI<br />
| parent1 = Skaarj<br />
| parent2 = ScriptedPawn<br />
| parent3 = Pawn<br />
| parent4 = Actor<br />
| parent5 = Object<br />
}}<br />
{{autogenerated}}<br />
SkaarjTrooper.<br />
<br />
==Properties==<br />
===Property group 'SkaarjTrooper'===<br />
====WeaponType====<br />
'''Type:''' [[class]]<{{cl|Weapon}}><br />
<br />
<!-- enter variable description --><br />
<br />
'''Default value:''' [[Types#Class|Class]]'{{cl|DispersionPistol|UnrealShare}}'<br />
<br />
===Internal variables===<br />
====duckTime====<br />
'''Type:''' [[float]]<br />
<br />
<!-- enter variable description --><br />
<br />
====myWeapon====<br />
'''Type:''' {{cl|Weapon}}<br />
<br />
<!-- enter variable description --><br />
<br />
===Default values===<br />
{| class="list defaults"<br />
! Property<br />
! Value<br />
|-<br />
| {{tl|Buoyancy||Actor properties}}<br />
| 125.0<br />
|-<br />
| {{tl|CarcassType||ScriptedPawn properties}}<br />
| [[Types#Class|Class]]'{{cl|TrooperCarcass|UnrealI}}'<br />
|-<br />
| {{tl|ClawDamage||Skaarj}}<br />
| 10<br />
|-<br />
| {{tl|CollisionHeight||Actor properties}}<br />
| 42.0<br />
|-<br />
| {{tl|CollisionRadius||Actor properties}}<br />
| 32.0<br />
|-<br />
| {{tl|CombatStyle||Pawn}}<br />
| 0.3<br />
|-<br />
| {{tl|GroundSpeed||Pawn}}<br />
| 400.0<br />
|-<br />
| {{tl|Health||Pawn}}<br />
| 170<br />
|-<br />
| {{tl|LungeDamage||Skaarj}}<br />
| 20<br />
|-<br />
| {{tl|Mass||Actor properties}}<br />
| 125.0<br />
|-<br />
| {{tl|Mesh||Actor properties}}<br />
| {{cl|LodMesh}}'UnrealI.sktrooper'<br />
|-<br />
| {{tl|RangedProjectile||ScriptedPawn properties}}<br />
| None<br />
|-<br />
| {{tl|Skin||Actor properties}}<br />
| {{cl|Texture}}'UnrealI.Skins.sktrooper1'<br />
|-<br />
| {{tl|SpinDamage||Skaarj}}<br />
| 15<br />
|}<br />
<br />
==Functions==<br />
===Events===<br />
====PreBeginPlay====<br />
{{code|event '''PreBeginPlay''' ()}}<br />
<br />
'''Overrides:''' {{tl|PreBeginPlay|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
===Other instance functions===<br />
====CanFireAtEnemy====<br />
{{code|function [[bool]]&nbsp;'''CanFireAtEnemy''' ()}}<br />
<br />
'''Overrides:''' {{tl|CanFireAtEnemy|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====ChangedWeapon====<br />
{{code|function '''ChangedWeapon''' ()}}<br />
<br />
'''Overrides:''' {{tl|ChangedWeapon|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====Died====<br />
{{code|function '''Died''' ({{cl|Pawn}}&nbsp;'''Killer''', [[name]]&nbsp;'''damageType''', {{tl|Vector|Object|structs}}&nbsp;'''HitLocation''')}}<br />
<br />
'''Overrides:''' {{tl|Died|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayChallenge====<br />
{{code|function '''PlayChallenge''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayChallenge|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayCock====<br />
{{code|function '''PlayCock''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayCock|Skaarj|instance functions}}<br />
<br />
If SkaarjTrooper's weapon and ''Weapon.CockingSound'' is given, that sound is played on ''SLOT_Interact''.<br />
<br />
Probably a bug is playing ''Weapon.CockingSound'', if it is empty but ''Weapon.SelectSound'' is given:<br />
<pre>if ( Weapon.CockingSound != None )<br />
PlaySound(Weapon.CockingSound, SLOT_Interact,,,700);<br />
else if ( Weapon.SelectSound != None )<br><br />
PlaySound(Weapon.CockingSound, SLOT_Interact,,,700);</pre><br />
<br />
====PlayFiring====<br />
{{code|function '''PlayFiring''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayFiring|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayLanded====<br />
{{code|function '''PlayLanded''' ([[float]]&nbsp;'''impactVel''')}}<br />
<br />
'''Overrides:''' {{tl|PlayLanded|Skaarj|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayMovingAttack====<br />
{{code|function '''PlayMovingAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayMovingAttack|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayPatrolStop====<br />
{{code|function '''PlayPatrolStop''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayPatrolStop|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRangedAttack====<br />
{{code|function '''PlayRangedAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRangedAttack|Skaarj|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRunning====<br />
{{code|function '''PlayRunning''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRunning|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayTakeHit====<br />
{{code|function '''PlayTakeHit''' ([[float]]&nbsp;'''tweentime''', {{tl|Vector|Object|structs}}&nbsp;'''HitLoc''', [[int]]&nbsp;'''damage''')}}<br />
<br />
'''Overrides:''' {{tl|PlayTakeHit|Skaarj|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayThreatening====<br />
{{code|function '''PlayThreatening''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayThreatening|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayVictoryDance====<br />
{{code|function '''PlayVictoryDance''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayVictoryDance|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====Shield====<br />
{{code|function '''Shield''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====TossWeapon====<br />
{{code|function '''TossWeapon''' ()}}<br />
<br />
'''Overrides:''' {{tl|TossWeapon|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====TryToDuck====<br />
{{code|function '''TryToDuck''' ({{tl|Vector|Object|structs}}&nbsp;'''duckDir''', [[bool]]&nbsp;'''bReversed''')}}<br />
<br />
'''Overrides:''' {{tl|TryToDuck|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====WarnTarget====<br />
{{code|function '''WarnTarget''' ({{cl|Pawn}}&nbsp;'''shooter''', [[float]]&nbsp;'''projSpeed''', {{tl|Vector|Object|structs}}&nbsp;'''FireDir''')}}<br />
<br />
'''Overrides:''' {{tl|WarnTarget|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
==States==<br />
===Charging===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|Charging|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====Charging.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|Charging.EndState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
===Hunting===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|Hunting|Skaarj}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|EnemyNotVisible||Pawn}}<br />
<br />
====Hunting.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|Hunting.EndState|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
===MeleeAttack===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|MeleeAttack|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|Bump||ScriptedPawn}}, {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
===RangedAttack===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|RangedAttack|Skaarj}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====RangedAttack.AnimEnd====<br />
{{code|event '''AnimEnd''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.AnimEnd|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.Bump====<br />
{{code|event '''Bump''' ({{cl|Actor}}&nbsp;'''Other''')}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.Bump|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.EndState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.TakeDamage====<br />
{{code|event '''TakeDamage''' ([[int]]&nbsp;'''Damage''', {{cl|Pawn}}&nbsp;'''instigatedBy''', {{tl|Vector|Object|structs}}&nbsp;'''hitlocation''', {{tl|Vector|Object|structs}}&nbsp;'''momentum''', [[name]]&nbsp;'''damageType''')}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.TakeDamage|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.KeepAttacking====<br />
{{code|function '''KeepAttacking''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.KeepAttacking|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.PlayRangedAttack====<br />
{{code|function '''PlayRangedAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|RangedAttack.PlayRangedAttack|Skaarj}}<br />
<br />
<!-- enter function description --><br />
<br />
====RangedAttack.TryToDuck====<br />
{{code|function '''TryToDuck''' ({{tl|Vector|Object|structs}}&nbsp;'''duckDir''', [[bool]]&nbsp;'''bReversed''')}}<br />
<br />
'''Overrides:''' {{tl|TryToDuck}} ''(global)''<br />
<br />
<!-- enter function description --><br />
<br />
===Retreating===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|Retreating|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|EnemyNotVisible||Pawn}}, {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====Retreating.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|EndState|Object}} ''(global)''<br />
<br />
<!-- enter function description --><br />
<br />
===Startup===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|StartUp|ScriptedPawn}}<br />
<br />
'''[[States#Modifiers|Modifiers]]:''' auto<br />
<br />
====Startup.BeginState====<br />
{{code|event '''BeginState''' ()}}<br />
<br />
'''Overrides:''' {{tl|StartUp.BeginState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
====Startup.SetHome====<br />
{{code|function '''SetHome''' ()}}<br />
<br />
'''Overrides:''' {{tl|StartUp.SetHome|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
===TacticalMove===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|TacticalMove|ScriptedPawn}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|HearNoise||ScriptedPawn}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====TacticalMove.EndState====<br />
{{code|event '''EndState''' ()}}<br />
<br />
'''Overrides:''' {{tl|TacticalMove.EndState|ScriptedPawn}}<br />
<br />
<!-- enter function description --><br />
<br />
===TakeHit===<br />
<!-- enter state description --><br />
<br />
'''Inherits from:''' {{tl|TakeHit|Skaarj}}<br />
<br />
'''[[Ignores statement|Ignores]]:''' {{tl|Bump||ScriptedPawn}}, {{tl|HearNoise||ScriptedPawn}}, {{tl|HitWall||Actor events}}, {{tl|SeePlayer||ScriptedPawn}}<br />
<br />
====TakeHit.BeginState====<br />
{{code|event '''BeginState''' ()}}<br />
<br />
'''Overrides:''' {{tl|TakeHit.BeginState|Skaarj}}<br />
<br />
<!-- enter function description --></div>SeriousBarbiehttps://wiki.beyondunreal.com/UE1:SkaarjWarrior_(UT)?diff=46428UE1:SkaarjWarrior (UT)2017-07-17T01:03:01Z<p>SeriousBarbie: PlayCock: description</p>
<hr />
<div>{{infobox class<br />
| package = UnrealShare<br />
| parent1 = Skaarj<br />
| parent2 = ScriptedPawn<br />
| parent3 = Pawn<br />
| parent4 = Actor<br />
| parent5 = Object<br />
}}<br />
{{autogenerated}}<br />
Skaarj.<br />
<br />
==Properties==<br />
===Property group 'Sounds'===<br />
====Blade====<br />
'''Type:''' {{cl|Sound}}<br />
<br />
<!-- enter variable description --><br />
<br />
'''Default value:''' {{cl|Sound}}'UnrealShare.Skaarj.blade1s'<br />
<br />
===Default values===<br />
{| class="list defaults"<br />
! Property<br />
! Value<br />
|-<br />
| {{tl|ClawDamage||Skaarj}}<br />
| 14<br />
|-<br />
| {{tl|CombatStyle||Pawn}}<br />
| 0.6<br />
|-<br />
| {{tl|Mesh||Actor properties}}<br />
| {{cl|LodMesh}}'UnrealShare.Skaarjw'<br />
|-<br />
| {{tl|SpinDamage||Skaarj}}<br />
| 16<br />
|}<br />
<br />
==Functions==<br />
===Events===<br />
====PostBeginPlay====<br />
{{code|event '''PostBeginPlay''' ()}}<br />
<br />
'''Overrides:''' {{tl|PostBeginPlay|Pawn}}<br />
<br />
<!-- enter function description --><br />
<br />
===Other instance functions===<br />
====CanFireAtEnemy====<br />
{{code|function [[bool]]&nbsp;'''CanFireAtEnemy''' ()}}<br />
<br />
'''Overrides:''' {{tl|CanFireAtEnemy|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayChallenge====<br />
{{code|function '''PlayChallenge''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayChallenge|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayCock====<br />
{{code|function '''PlayCock''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayCock|Skaarj|instance functions}}<br />
<br />
<br />
Plays the sound given in 'Blade' on ''SLOT_Interact''.<br />
<br />
====PlayMovingAttack====<br />
{{code|function '''PlayMovingAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayMovingAttack|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayPatrolStop====<br />
{{code|function '''PlayPatrolStop''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayPatrolStop|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRangedAttack====<br />
{{code|function '''PlayRangedAttack''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRangedAttack|Skaarj|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayRunning====<br />
{{code|function '''PlayRunning''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayRunning|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayThreatening====<br />
{{code|function '''PlayThreatening''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayThreatening|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====PlayVictoryDance====<br />
{{code|function '''PlayVictoryDance''' ()}}<br />
<br />
'''Overrides:''' {{tl|PlayVictoryDance|Pawn|instance functions}}<br />
<br />
<!-- enter function description --><br />
<br />
====SpawnTwoShots====<br />
{{code|function '''SpawnTwoShots''' ()}}<br />
<br />
<!-- enter function description --><br />
<br />
====TryToDuck====<br />
{{code|function '''TryToDuck''' ({{tl|Vector|Object|structs}}&nbsp;'''duckDir''', [[bool]]&nbsp;'''bReversed''')}}<br />
<br />
'''Overrides:''' {{tl|TryToDuck|ScriptedPawn|instance functions}}<br />
<br />
<!-- enter function description --></div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Actor_(UT)/Advanced?diff=46418Legacy:Actor (UT)/Advanced2017-04-09T05:22:43Z<p>SeriousBarbie: +link to game_goals</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Object (UT)|Object (UT)]] >> [[Legacy:Actor (UT)|Actor (UT)]] (Property group: Advanced)}}<br />
<br />
Properties every [[Legacy:Actor (UT)|Actor (UT)]] has under the ''Advanced'' section. See [[Legacy:Actor/Advanced|Actor/Advanced]] for the [[Legacy:UT2003|UT2003]] version.<br />
<br />
; bAlwaysRelevant : [[Legacy:Replication|Replication]] &ndash; If set, then this actor is always relevant to gameplay. As a result, the server will always be keeping tabs on this actor and constantly sending data to its clients about it, regardless of any other circumstances. For example, [[Legacy:ReplicationInfo|ReplicationInfo]]s are always relevant.<br />
<br />
; bCanTeleport : If something attempts to teleport the actor, then the attempt will be successful. For example, this is ''True'' for [[Legacy:Pawn (UT)|Pawn (UT)]]s and ''False'' for [[Legacy:Inventory (UT)|Inventory (UT)]] items.<br />
<br />
; bCollideWhenPlacing : When being placed using the editor, this actor will not allow itself to be moved through walls and other such things.<br />
<br />
; bDirectional : An actor which has this flag set will display a directional arrow in UnrealEd when selected. This directional arrow matches the current setting of the actor's Movement -> Rotation property (see [[Legacy:Actor (UT)/Movement|Actor (UT)/Movement]]). It also allows the actor to be rotated the same way as a brush in an [[Legacy:UnrealEd Viewport|UnrealEd Viewport]] (see [[Legacy:Brush Rotate|Brush rotate]]). By default, [[Legacy:Spotlight|Spotlight]]s, [[Legacy:PlayerStart|PlayerStart]]s and some [[Legacy:Decoration|Decoration]]s are directional, but [[Legacy:Trigger|Trigger]]s and ordinary [[Legacy:Light (UT)|Light (UT)]]s are not.<br />'''Tip:''' Set this to ''True'' for brushes (including the [[Legacy:Red Builder Brush|red builder brush]]) to see whether they have rotation applied.<br />
<br />
; bEdShouldSnap : In the editor, this actor should snap to the grid when it is being placed. This is set by default to ''True'' for [[Legacy:Brush|Brush]]es and ''False'' for other actors. It's often useful to set this to ''True'' for actors such as [[Legacy:Trigger|Trigger]] or [[Legacy:BlockAll|BlockAll]], as they can then be aligned to the grid exactly. The value of this property determines whether an actor has a [[Legacy:Pivot|pivot]].<br />
<br />
; bForceStasis : In stand-alone games, this actor can be forced into stasis when it doesn't need to be updated, even if it has physics is something more meaningful than simple rotation.<br />
<br />
; bGameRelevant : This actor is relevant to gameplay. For example, this is ''True'' for such things as [[Legacy:GameInfo (UT)|GameInfo (UT)]] and [[Legacy:ReplicationInfo|ReplicationInfo]]. If this is set to True mutators won't change or replace the actor.<br />
<br />
; bHidden : During the game, this actor should not be displayed. Obviously, things like [[Legacy:Pawn (UT)|Pawn (UT)]]s are not hidden, but [[Legacy:Triggers (UT)|Triggers (UT)]] are.<br />
<br />
; bHiddenEd : In the editor, this actor should not be displayed. It's for instance used for the [[Legacy:LevelInfo|LevelInfo]] actor that is automatically added when you create a new map. (The [[Legacy:LevelInfo|LevelInfo]] actor's properties can be set with [[Legacy:UnrealEd Main Menu|UnrealEd Main Menu]] -> View -> Level Properties)<br /><br />Some mappers set this flag on the brushes in their levels. To reveal a brush that has been hidden like this, first find it in the [[Legacy:Actor Search|Actor Search]] window. Double-clicking its name there will selected it even though it isn't visible in any [[Legacy:UnrealEd Viewport|UnrealEd Viewport]]. Then open the [[Legacy:Actor Properties Window|Actor Properties window]] (F4) and set this flag to ''False''. The object in question should re-appear.<br />
<br />
; bHighDetail : This actor will only show up if the game is set to render high detail. This is typically used with [[Legacy:SkyZoneInfo|SkyZoneInfo]] objects to provide two [[Legacy:SkyBox|SkyBox]]es. One used when high detail is set, and the other used when high detail is not set.<br />
<br />
; bIsItemGoal : This actor will count in the item count of some such mechanic. [[Legacy:Inventory (UT)|Inventory (UT)]] items are examples of this.<br />
<br />
; bIsKillGoal : This actor will count in the death tally. [[Legacy:ScriptedPawn|ScriptedPawn]]s are examples of this.<br />
<br />
; bIsSecretGoal : This actor will count in the [[Legacy:GameInfo_%28UT%29#game_goals|list of secrets]]. I can't think of any examples of this that are used in Unreal or Unreal Tournament.<br />
<br />
; bMovable : This actor is not just stuck in place; it can move or be moved around the level. Some [[Legacy:Decoration|Decoration]]s are movable and some aren't. [[Legacy:NavigationPoint|NavigationPoint]]s are never movable. [[Legacy:Pawn (UT)|Pawn (UT)]]s are almost always movable.<br />
<br />
; bNetOptional : [[Legacy:Replication|Replication]] &ndash; In online games, it can sometimes be necessary to forego the replication of some relevant actors. In such a case, the list needs to be pruned further, and actors that are bNetOptional are of a type that should only be replicated to clients if there is enough bandwidth for it.<br />
<br />
; bNetTemporary : [[Legacy:Replication|Replication]] &ndash; Tear-off simulation in network play. When set to true, the actor and its variables are replicated only when it is first spawned. Thereafter everything is handled client-side &ndash; and no longer relevant to the server, which retains its own, game-relevant copy &ndash; thus preventing excessive bandwidth consumption. Generally used with actors which adhere to movement which can be predicted solely by standard physics types or client-side calculation (noncontrollable projectiles, decorations, effects).<br />
<br />
; bNoDelete : This actor cannot be deleted during play. For most actors, this is ''False''. [[Legacy:Pawn (UT)|Pawn (UT)]]s, some [[Legacy:Decoration|Decoration]]s, and [[Legacy:Triggers (UT)|Triggers (UT)]] can be deleted, but such things as [[Legacy:Brush|Brush]]es and [[Legacy:NavigationPoint|NavigationPoint]]s should not be deleted.<br />
<br />
; bOnlyOwnerSee : If an actor has an owner, then this owner is the only other actor that can see it.<br />
<br />
; bOwnerNoSee : If an actor has an owner, then this owner is prevented from seeing the actor. This property is used for the [[Legacy:ShieldBeltEffect|ShieldBeltEffect]], for instance.<br />
<br />
; bStasis : This actor is capable of entering stasis. In standalone games, an actor that doesn't need to be updated because of the player's location can enter stasis, especially if its physics is nonexistent or the actor is simply rotating in place.<br />
<br />
; bStatic : This actor doesn't move or change at all over the course of time. [[Legacy:PathNode|PathNode]]s are bStatic, for example, because they don't need to be updated during the game, thus saving processing resources.<br />'''Note:''' Neither Tick nor Timer are executed for bStatic actors.<br />'''''Another Note:''''' '''Never''' use this to prevent items from rotating. There's the '''bRotatingPickup''' property for a reason, so use it.<br />
<br />
; bTravel : This actor is capable of travelling between levels and between servers. This is pretty much only ''True'' for such things as [[Legacy:PlayerPawn|PlayerPawn]]s and [[Legacy:Inventory (UT)|Inventory (UT)]] items.<br />
<br />
; LifeSpan : This is a float that tells how many seconds the object gets to exist before it is automatically destroyed. Most actors have a LifeSpan of 0.0, which means that they are allowed to exist forever. However, some things such as [[Legacy:Effects (UT)|Effects (UT)]] and [[Legacy:Projectile (UT)|Projectile (UT)]]s do have a definite LifeSpan.<br />
<br />
'''Evilmrfrank:''' Ayone have any clue how to get the directional property to work in the classic UT? I have tried to use it a number of times but it never seems to work correctly.<br />
<br />
'''Xian:''' From what I know, it's used by UED mostly to set the initial rotation of an actor (say the AmbushSpot). Tell me what you need/want to do and I'll do my best to explain it as clear as possible :)<br />
<br />
'''Evilmrfrank:''' I have needed it for many things in UT from teleporters, to playerstarts, etc. According to this article you only need to change the setting to bdirectional=true, but that doesnt work.... I never see any red arrow like I do in Unreal Ed 3.0<br />
<br />
'''Xian:''' Tried it on a weapon and the arrow appeared.<br />
<br />
==Related Topics ==<br />
* [[Legacy:Actor Overview|Actor overview]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:GameInfo_(UT)?diff=46417Legacy:GameInfo (UT)2017-04-09T05:18:12Z<p>SeriousBarbie: added anchor</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Object|Object]] >> [[Legacy:Actor|Actor]] >> [[Legacy:Info (UT)|Info (UT)]] >> GameInfo (Package: Engine)}}<br />
<br />
A GameInfo subclass contains the rules for a gametype. This includes timelimit, fraglimit, scoring, difficulty, game speed, allowed playerpawn classes, default inventory assignment, and if appropriate, team assignment and general bot behavior.<br />
<br />
This is assigned to a map in the [[Legacy:Level Properties|Level Properties]] window, under LevelInfo -> DefaultGameType.<br />
<br />
The <tt>GameInfo</tt> for the current game can be retrieved from every actor in that game via <tt>Level.Game</tt>, but ''only'' on the server. <tt>GameInfo</tt> is not replicated to network clients; only [[Legacy:GameReplicationInfo (UT)|GameReplicationInfo (UT)]] is.<br />
<br />
See [[Legacy:GameInfo|GameInfo]] for the UT200x version of this class.<br />
<br />
==Properties==<br />
<br />
===Globalconfig Properties===<br />
; bool bMuteSpectators : Whether spectators are allowed to speak.<br />
; bool bLowGore : Whether or not to reduce gore.<br />
; bool bVeryLowGore : Greatly reduces gore.<br />
; bool bNoCheating : Disallows cheating. Hehe.<br />
; bool bAllowFOV : Allows FOV changes in net games<br />
; bool bExternalBatcher : <br />
; float AutoAim : How much autoaiming to do (1 = none, 0 = always). (cosine of max error to correct)<br />
; float GameSpeed : Scale applied to game rate.<br />
; int MaxSpectators : Maximum number of spectators.<br />
; private string AdminPassword : Password to receive bAdmin privileges.<br />
; private string GamePassword : Password to enter game.<br />
; int MaxPlayers : <br />
; string ServerLogName : Server Log<br />
; bool bLocalLog : <br />
; bool bWorldLog : <br />
; bool bBatchLocal : <br />
; int DemoBuild : <br />
; int DemoHasTuts : <br />
; string IPPolicies[50] : <br />
<br />
===Config Properties===<br />
; bool bNoMonsters : Whether monsters are allowed in this play mode.<br />
; bool bHumansOnly : Whether non human player models are allowed.<br />
; bool bCoopWeaponMode : Whether or not weapons stay when picked up.<br />
; bool bClassicDeathmessages : Weapon deathmessages if false.<br />
<br />
===Localized Properties===<br />
; bool bAlternateMode : <br />
; string SwitchLevelMessage : <br />
; string DefaultPlayerName : <br />
; string LeftMessage : <br />
; string FailedSpawnMessage : <br />
; string FailedPlaceMessage : <br />
; string FailedTeamMessage : <br />
; string NameChangedMessage : <br />
; string EnteredMessage : <br />
; string GameName : <br />
; string MaxedOutMessage : <br />
; string WrongPassword : <br />
; string NeedPassword : <br />
; string IPBanned : <br />
<br />
===Other Properties===<br />
; <span ID="game_goals"></span>int ItemGoals, KillGoals, SecretGoals : Special game goals.<br />
; byte Difficulty : In Unreal: 0=easy, 1=medium, 2=hard, 3=very hard. In UT: 0=Novice, 1=Average, 2=Experienced, 3=Skilled, 4=Adept, 5=Masterful, 6=Inhuman, 7=Godlike.<br />
; bool bRestartLevel : <br />
; bool bPauseable : Whether the level is pauseable.<br />
; bool bCanChangeSkin : Allow player to change skins in game.<br />
; bool bTeamGame : This is a teamgame.<br />
; bool bDeathMatch : This game is some type of deathmatch (where players can respawn during gameplay)<br />
; bool bGameEnded : set when game ends<br />
; bool bOverTime : <br />
; bool bCanViewOthers : <br />
; float StartTime : <br />
; class<[[Legacy:PlayerPawn|PlayerPawn]]> DefaultPlayerClass : <br />
; class<[[Legacy:Weapon (UT)|Weapon (UT)]]> DefaultWeapon : Default weapon given to player at start.<br />
; int NumSpectators : Current number of spectators.<br />
; class<[[Legacy:ScoreBoard|ScoreBoard]]> ScoreBoardType : Type of scoreboard this game uses.<br />
; class<[[Legacy:Menu|Menu]]> GameMenuType : Type of oldstyle game options menu to display.<br />
; string BotMenuType : Type of bot menu to display.<br />
; string RulesMenuType : Type of rules menu to display.<br />
; string SettingsMenuType : Type of settings menu to display.<br />
; string GameUMenuType : Type of Game dropdown to display.<br />
; string MultiplayerUMenuType : Type of Multiplayer dropdown to display.<br />
; string GameOptionsMenuType : Type of options dropdown to display.<br />
; class<[[Legacy:HUD (UT)|HUD (UT)]]> HUDType : HUD class this game uses.<br />
; class<[[Legacy:MapList|MapList]]> MapListType : Maplist this game uses.<br />
; string MapPrefix : Prefix characters for names of maps for this game type.<br />
; string BeaconName : Identifying string used for finding LAN servers.<br />
; string SpecialDamageString : <br />
; int SentText : <br />
; int NumPlayers : <br />
; int CurrentID : <br />
; class<[[Legacy:LocalMessage (UT)|LocalMessage (UT)]]> DeathMessageClass : <br />
; class<[[Legacy:LocalMessage (UT)|LocalMessage (UT)]]> DMMessageClass : A message class to be used for commonly used messages. For example, the [[Legacy:DeathMatchPlus|DeathMatchPlus]] gametype sets [[Legacy:DeathMatchMessage|DeathMatchMessage]] as the default, which contains messages for overtime, players leaving and joining the game, players changing names, and players switching teams.<br />
; class<[[Legacy:Mutator|Mutator]]> MutatorClass : Class of this gametype's base mutator. (Default is Engine.[[Legacy:Mutator|Mutator]], [[Legacy:DeathMatchPlus|DeathMatchPlus]] uses Botpack.[[Legacy:DMMutator|DMMutator]].)<br />
; [[Legacy:Mutator|Mutator]] BaseMutator : <br />
; [[Legacy:Mutator|Mutator]] DamageMutator : [[Legacy:Linked List|Linked list]] of mutators which affect damage.<br />
; [[Legacy:Mutator|Mutator]] MessageMutator : [[Legacy:Linked List|Linked list]] of mutators which get localized message queries.<br />
; class<[[Legacy:ZoneInfo|ZoneInfo]]> WaterZoneType : Default waterzone entry and exit effects<br />
; name DefaultPlayerState : What state a player should start in for this game type<br />
; class<[[Legacy:GameReplicationInfo|GameReplicationInfo]]> GameReplicationInfoClass : <br />
; [[Legacy:GameReplicationInfo|GameReplicationInfo]] GameReplicationInfo : <br />
; [[Legacy:StatLog|StatLog]] LocalLog : <br />
; [[Legacy:StatLog|StatLog]] WorldLog : <br />
; bool bLoggingGame : Does this gametype log?<br />
; string LocalLogFileName : <br />
; string WorldLogFileName : <br />
; class<[[Legacy:StatLog|StatLog]]> StatLogClass : <br />
; string EnabledMutators : Server query info<br />
<br />
==Methods ==<br />
; AdminLogin ([[Legacy:PlayerPawn|PlayerPawn]] P, string Password) : This function will allow a player to log in as the administrator if the password entered is correct. The function also broadcasts a notification message to the other players.<br />
; AdminLogout ([[Legacy:PlayerPawn|PlayerPawn]] P) : This function is called when a player leaves administrator mode. It ensures that the player is forced to "Walk", and kills them. <i>There is code in there to preserve the players score when they die from logging out of admin mode but I'm sure it doesn't work in practice. &ndash; must check</i>.<br />
; InitLogging ( ) : Called from <tt>PostBeginPlay()</tt>. Logs more stuff than you can shake a big stick at. Calls functions on the WorldLog, Log, and LocalLog objects to do so.<br />
; InitGameReplicationInfo ( ) : This function is responsible for placing the values of the attributes of the GameInfo class important to the client onto the [[Legacy:GameReplicationInfo|GameReplicationInfo]] object.<br />
; string GetInfo ( ) : Returns the status of the World log.<br />
; string GetRules ( ) : This function builds up a description of the server from the list of mutators currently in use, the type of server (Listen or otherwise), and whether there is a password on the server or not.<br />
; int GetServerPort ( ) : This functon returns the port the server is runing on by interrogating the level URL.<br />
; bool SetPause (bool bPause, [[Legacy:PlayerPawn|PlayerPawn]] P) : If the level can be paused then the player who paused the game is stored and the function returns ''true''. If the game is not pausable then the function will return ''false''.<br />
; LogGameParameters ([[Legacy:StatLog|StatLog]] StatLog) : This function writes the general game parameters to the <tt>StatLog</tt>.<br />
; SetGameSpeed (float T) : This function sets the game speed (but never below 0.1).<br />
; bool IsRelevant ([[Legacy:Actor|Actor]] Other) : This function is called from any [[Legacy:Actor|Actor]]'s <tt>PreBeginPlay()</tt>. If this function returns ''true'' the actor continues to exist. If the function returns ''false'' the actor is removed from the game. This function calls the <tt>AlwaysKeep()</tt> and <tt>IsRelevant()</tt> functions on any mutators within the game prior to checking actor difficulty levels and "odds of appearing" values. The function also counts the number of remaining <tt>SecretGoals</tt>, <tt>ItemGoals</tt>, and <tt>KillGoals</tt> left within the level (also see [[Legacy:Creating Actors And Objects|Creating Actors And Objects]]).<br />
; bool GrabOption (out string Options, out string Result) : Grabs the next left option from a string. ''Result'' contains the part between the first "?" and the next "?" (if exist). ''Result'' is removed then from ''Options''. If ''Options'' starts with "?", ''true'' is returned, otherwise ''false''.<br />
; GetKeyValue (string Pair, out string Key, out string Value) : Break up a ''key=value'' pair into its key and value.<br />
; bool HasOption (string Options, string InKey) : See if an option was specified in the options string.<br />
; string ParseOption (string Options, string InKey) : Find the most left option of kind "''InKey''=Value" in ''Options'' and returns ''Value'' if ''InKey'' has been found, an empty string else. ''Options'' stays unchanged.<br />
; ProcessServerTravel (string URL, bool bItems) : Called when a map changes. Is responsible for handling the transfer of players and their inventory as well as ensuring that all logging for the level just played is tidied up.<br />
; bool AtCapacity (string Options) : This function returns ''true'' if the server has the maximum number of players allowed on it.<br />
; bool CheckIPPolicy (string Address) : Returns ''true'' if the IP address of the client is allowed to connect to the server.<br />
; int GetIntOption( string Options, string ParseString, int CurrentValue ) : Same as '''ParseOption''' but returns an Integer. If the key ''ParseString'' is not found, ''CurrentValue'' is returned.<br />
; Logout ([[Legacy:Pawn (UT)|Pawn (UT)]] Exiting) : Logs the player out and tells the logging engine about it.<br />
; AddDefaultInventory ([[Legacy:Pawn (UT)|Pawn (UT)]] PlayerPawn) : Add any default inventory to the player.<br />
; NavigationPoint FindPlayerStart ([[Legacy:Pawn (UT)|Pawn (UT)]] Player, optional byte InTeam, optional string incomingName) : Locates the "best" player start for the player.<br />
; bool RestartPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] aPlayer) : Restart a player after he has died. This function adds the default inventory by calling <tt>AddDefaultInventory()</tt>, finds a start location by calling <tt>FindPlayerStart()</tt>. Once this has been acomplished, sets the player's stats back to defaults.<br />
; StartPlayer ([[Legacy:PlayerPawn|PlayerPawn]] Other) : Start a player. <i>Finish me</i><br />
; Killed ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other, name damageType) : Called when someone gets killed. This function broadcasts the death message, logs the event, and calls the <tt>ScoreKill()</tt> function.<br />
; BroadcastRegularDeathMessage ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other, name damageType) : Calls on to <tt>BroadcastLocalizedMessage()</tt>.<br />
; ScoreKill ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Increases the Killer's killCount and score by 1 unless it was a suicide - in which case the killed pawn loses a point.<br />
; string KillMessage (name damageType, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) [static] : Returns " died." as a default catch all death message.<br />
; bool CanSpectate ([[Legacy:Pawn (UT)|Pawn (UT)]] Viewer, [[Legacy:Actor|Actor]] ViewTarget) : Returns whether ''Viewer'' is allowed to use ''ViewTarget'' as its point of view. GameInfo's return value is unconditionally ''true''.<br />
; RegisterDamageMutator ([[Legacy:Mutator|Mutator]] M) : Adds a damage mutator at the front of the list of damage mutators.<br />
; RegisterMessageMutator ([[Legacy:Mutator|Mutator]] M) : Adds a message mutator at the front of the list of message mutators.<br />
; int ReduceDamage (int Damage, name DamageType, [[Legacy:Pawn (UT)|Pawn (UT)]] injured, [[Legacy:Pawn (UT)|Pawn (UT)]] instigatedBy) : This function returns a damage of 0 if the injured [[Legacy:Pawn (UT)|Pawn (UT)]] is in a zone that has it's <tt>bNeutralZone</tt> property set to ''true''. Otherwise the original damage is returned.<br />
; bool ShouldRespawn ([[Legacy:Actor|Actor]] Other) : Returns whether an actor item should respawn. In death matches this function should return ''true'' for weapon and item pickups.<br />
; bool PickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] Item) : Called when pawn has a chance to pick Item up (i.e. when the pawn touches a weapon or item pickup). Should return ''true'' if it is allowed to pick it up, ''false'' if not.<br />
; DiscardInventory ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Discard a player's inventory after he dies.<br />
; float PlayerJumpZScaling ( ) : Returns 1.0, but could be overidden for "low grav" game types.<br />
; ChangeName ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, coerce string S, bool bNameChange) : Attempt to change a players name.<br />
; bool ChangeTeam ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, int N) : Return whether a player can change teams or not.<br />
; float PlaySpawnEffect ([[Legacy:Inventory (UT)|Inventory (UT)]] Inv) : Play an inventory respawn effect.<br />
; string PlayerKillMessage (name damageType, [[Legacy:PlayerReplicationInfo|PlayerReplicationInfo]] Other) [static] : returns " was killed by ".<br />
; string CreatureKillMessage (name damageType, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) [static] : returns "was killed by a "<br />
; SendPlayer ([[Legacy:PlayerPawn|PlayerPawn]] aPlayer, string URL) : Send the player specified to the URL passed to the function.<br />
; RestartGame ( ) : Called to restart the current game.<br />
; bool AllowsBroadcast ([[Legacy:Actor|Actor]] broadcaster, int Len) : Returns ''true'' if the [[Legacy:Actor|Actor]] passed to the function is allowed to broadcast a message.<br />
; EndGame (string Reason) : Called at the end of the game. If first calls <tt>BaseMutator.HandleEndGame()</tt> and <tt>SetEndCams()</tt> and if both returns ''false'' game is not ended but <tt>bOverTime</tt> set to ''true''. Otherwise <tt>bGameEnded</tt> is set to ''true'', the event 'EndGame' is risen and game logging is closed down.<br />
; bool SetEndCams (string Reason) : Puts all player pawns into a ''GameEnded'' state and calls the <tt>ClientGameEnded()</tt> function on them. The function returns ''true''.<br />
; ResetGame ( ) [static] : GameInfo's <tt>ResetGame( )</tt> does nothing. In Game type ''Assault'' it is overridden and some default values are reset and saved there.<br />
; bool AddBot ( ) : GameInfo's <tt>AddBot( )</tt> does nothing. It is overwitten in derivied game types, for example in ''DeathMatchPlus''.<br />
; bool ForceAddBot ( ) : GameInfo's <tt>ForceAddBot( )</tt> does nothing. It is overridden in ''DeathMatchPlus''.<br />
; PlayTeleportEffect ([[Legacy:Actor|Actor]] Incoming, bool bOut, bool bSound) : It is intended to play a teleporting special effect, but GameInfo's <tt>PlayTeleportEffect( )</tt> does nothing. Overridden for example in ''DeathMatchPlus''.<br />
<br />
===Native Functions ===<br />
; string GetNetworkNumber() : <i>(unknown)</i><br />
; string ParseKillMessage (string KillerName, string VictimName, string WeaponName, string DeathMessage) [static] : Parses the kill message. Replaces the first occurances of <tt>%k</tt>, <tt>%o</tt> and <tt>%w</tt> with <tt>KillerName</tt>, <tt>VictimName</tt> and <tt>WeaponName</tt> respectively (also see [[Legacy:Message Placeholder|Message Placeholder]]).<br />
<br />
===Events ===<br />
; GameEnding ( ) : This functon is called when a game is shut down. It halts any world logging and local logging.<br />
; DetailChange ( ) : This function is called whenever the client changes their level of detail (high to low, or low to high). Apart from re-linking all of the zones to a SkyBox, any actors with their <tt>bHighDetailMode</tt> property set to ''true'' will be destroyed on entry to a "low detail" mode.<br />
; InitGame (string Options, out string Error) : This function is called before the [[Legacy:Actor|Actor]]s <tt>PreBeginPlay()</tt> function. It sets up some of the game options and spawns the [[BaseMutator]].<br />
; string GetBeaconText ( ) : Returns ''Level.ComputerName'', the length truncated ''Level.Title'', the ''BeaconName'' and the number of players and ''MaxPlayers''. Used by <tt>UdpBeacon.BroadcastBeacon()</tt>.<br />
; PreLogin (string Options, string Address, out string Error, out string FailCode) : Accepts or rejects a player based upon any game password validation, IP bans, and current server capacity.<br />
; [[Legacy:PlayerPawn|PlayerPawn]] Login (string Portal, string Options, out string Error, class<[[Legacy:PlayerPawn|PlayerPawn]]> SpawnClass) : Log a player in. Fails login if you set the Error string. <tt>PreLogin()</tt> is called before <tt>Login()</tt>, but significant game time may pass before <tt>Login()</tt> is called, especially if content is downloaded.<br />
; PostLogin ([[Legacy:PlayerPawn|PlayerPawn]] NewPlayer) : Called after a successful login. This is the first place it is safe to call replicated functions on the PlayerPawn. <i>finish me</i><br />
; AcceptInventory ([[Legacy:Pawn (UT)|Pawn (UT)]] PlayerPawn) : Called when new inventory is accepted. Calls the function <tt>AddDefaultInventory()</tt>.<br />
; ScoreEvent (name EventName, [[Legacy:Actor|Actor]] EventActor, [[Legacy:Pawn (UT)|Pawn (UT)]] InstigatedBy) : Intended to award a score to an actor. GameInfo's <tt>ScoreEvent()</tt> does nothing.<br />
<br />
==Known subclasses ==<br />
* [[Legacy:UnrealGameInfo|UnrealGameInfo]]<br />
* [[Legacy:TournamentGameInfo|TournamentGameInfo]]<br />
<br />
==Comments ==<br />
<br />
We could do with a nice time diagram showing when all of the different functions and events (including those on the mutators) get called.<br />
<br />
==Related Topics ==<br />
<br />
See [[Legacy:Function Syntax|Function Syntax]] and [[Legacy:Variable Syntax|Variable Syntax]] for additional background information.<br />
<br />
----<br />
<br />
[[:Category:Legacy Class (UT)]]<br />
<br />
----<br />
<br />
'''Fearless''': Hmmm, some interesting information here even if it's basic. I'd really like to do a mutator that changes gamespeed without the intervention of an admin. I have also a little question concerning the adminlogout command. It says here that the player is killed when the command is invoked. This does happen on our Linux 4.40 server but this doesn't happen on a server you're hosting yourself. Does anyone have any idea why this is :P ?<br />
<br />
'''NogginBasher''': You can do that using a combination of x3dfxMapVote and IdeFiX's ServerMode. In ServerMode.ini you need something like: "Commands[11]=SET Engine.GameInfo GameSpeed 1.25". I'm currently testing: "Commands[12]=SET Botpack.DeathMatchPlus bHardcoreMode True"<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:UMOD_Extractor?diff=46415Legacy:UMOD Extractor2017-02-08T01:58:09Z<p>SeriousBarbie: URL has changed</p>
<hr />
<div>[http://www.acordero.org/projects/unreal-tournament-umod-extractor/ UMOD Extractor]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:T3D_File?diff=46414Legacy:T3D File2017-01-27T03:42:34Z<p>SeriousBarbie: removed my signature - seems I put it accidentally there</p>
<hr />
<div>The '''T3D file format''' or '''Unreal Text File''' holds a text list of Unreal map objects. An entire map can be saved as this file format, or just a single actor or brush.<br />
<br />
Note that while brushes, their applied textures and light actors are saved, the [[Legacy:Unreal Geometry|Unreal Geometry]] itself is not saved: upon importing a T3D file the map must be built.<br />
<br />
Copying objects from UnrealEd and pasting into a text editor produces the same format.<br />
<br />
Unreal Text format <br />
<br />
Exported brushes and (other) actors. See [[Legacy:T3D File|T3D file]].<br />
* Created by:<br />
** UnrealEd's File -> Import command<br />
** UnrealEd's Brush -> Import command (see [[Legacy:Data Import And Export|Data Import and Export]] for more on both these commands).<br />
** is this created by external stuff too? <br />
<br />
===Exporting T3D ===<br />
* Export the whole map<br />
** File -> Export... (UnrealEd 1,2,3)<br />
** File -> Export -> All.. (UnrealEd 4 - UT3)<br />
* Export selected actors: File-> Export-> Selected Only ... (UnrealEd 4 only - UT3)<br />
* Export one brush: Brush -> Export ...<br />
* Copy/Paste: can copy paste any actor from any UnrealEd version to another one (Except for UnrealEd 4) or to any text editor such as notepad (Windows)<br />
<br />
===Importing T3D ===<br />
<br />
File -> Import...<br />
<br />
(note importing may take a LONG time)<br />
<br />
Overheard on #utjb... :-)<br />
<br />
<tarquin> t3d stores brushes & actors but not texturing, right?<br />
<Mychaeel> Texturing as well.<br />
(melds into the opening speech from Reservoir Dogs...)<br />
<DaveA>Stores links to textures, and texture transforms, but not the pixels themselves<br />
<br />
The T3D format is a text file which stores information about map actors. It's in fact identical to what can be copied from UnrealEd to a text editor. An exported map looks like this:<br />
<br />
<br />
<uscript><br />
Begin Map<br />
Begin Actor Class=LevelInfo Name=LevelInfo0<br />
TimeSeconds=17.008888<br />
Summary=LevelSummary'Entry.LevelSummary'<br />
DefaultGameType=Class'Botpack.UTIntro'<br />
AIProfile(0)=23784352<br />
AIProfile(1)=52<br />
AIProfile(2)=41<br />
AIProfile(3)=42<br />
AIProfile(4)=40<br />
AIProfile(5)=44<br />
AIProfile(6)=45<br />
AIProfile(7)=21846171<br />
AvgAITime=0.000000<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=LevelInfo<br />
Region=(Zone=LevelInfo'Entry.LevelInfo0',iLeaf=-1)<br />
Name=LevelInfo0<br />
End Actor<br />
Begin Actor Class=Brush Name=Brush0<br />
MainScale=(SheerAxis=SHEER_ZX)<br />
PostScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX)<br />
TempScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX)<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=Brush<br />
Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1)<br />
Location=(X=464.000000,Y=-16.000000,Z=64.000000)<br />
Begin Brush Name=Brush<br />
Begin PolyList<br />
Begin Polygon Item=OUTSIDE Texture=black1 Flags=4194304 Link=0<br />
Origin -00160.000000,+00000.000000,+00128.000000<br />
Normal +00000.000000,+00000.000000,+00001.000000<br />
TextureU +00004.000000,+00000.000000,+00000.000000<br />
TextureV +00000.000000,+00004.000000,+00000.000000<br />
Vertex -00128.000000,-00128.000000,+00128.000000<br />
Vertex +00128.000000,-00128.000000,+00128.000000<br />
Vertex +00128.000000,+00128.000000,+00128.000000<br />
Vertex -00128.000000,+00128.000000,+00128.000000<br />
End Polygon<br />
...<br />
End PolyList<br />
End Brush<br />
Brush=Model'Entry.Brush'<br />
Name=Brush0<br />
End Actor<br />
Begin Actor Class=PlayerStart Name=PlayerStart0<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=PlayerStart<br />
Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1)<br />
Location=(X=183.134430,Y=-987.334167,Z=33.978027)<br />
OldLocation=(X=-217.561523,Y=-44.538128,Z=-87.899948)<br />
Name=PlayerStart0<br />
End Actor<br />
...<br />
End Map</uscript><br />
<br />
<br />
External link: http://web.archive.org/web/20060710080159/http://unreal.jall.org/tutorials/t3d.html (new URL)<br />
<br />
=== T3D File Structure ===<br />
== Ux,UT,UT200x Maps ==<br />
<uscript><br />
Begin Map<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
...<br />
End Map<br />
</uscript><br />
<br />
== UT3 Maps ==<br />
<uscript><br />
Begin Map<br />
Begin Level NAME=PersistentLevel<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
...<br />
End Level<br />
Begin Surface<br />
End Surface<br />
End Map<br />
</uscript><br />
<br />
Note: as UT3 T3D files have different header, any other not-UT3 t3d file can't be imported into UT3 editor (UnrealEd 4)<br />
<br />
===T3D brush geometry===<br />
Information geometry is contained in the following actors:<br />
*Brush<br />
*Mover (only UT and U1 game)<br />
<br />
For more information about T3D brushes, see [[Legacy:T3D_Brush|T3D Brush]].<br />
<br />
==T3D Utilities ==<br />
* [[Legacy:MapScale|MapScale]] scales an entire .t3d file<br />
* [[Legacy:MeshMaker|MeshMaker]] converts a prefab in .t3d format to a [[Legacy:Decoration|decoration]]<br />
* [http://darendash.home.comcast.net/~darendash/Converter.html UnrealROC] converters: from 3DMF, to VRML/X3D/OBJ (including textures et al).<br />
<br />
==Related Topics ==<br />
* [[Legacy:Data Import And Export|Data Import and Export]]<br />
* [[Legacy:Brush Exporting And Importing|Brush Exporting And Importing]]<br />
* [[Legacy:Brush Hacking|Brush Hacking]]<br />
* [[Legacy:T3D Brush|T3D Brush]]<br />
<br />
'''Kefik:''' There can be also a tag 'CsgOper' which have one of two values ... 'CSG_Subtract' -> subtract the brush from space or 'CSG_Add' -> add this brush to shape.<br />
<br />
'''Sobiwan:''' New to WIKI editing, but not using it. I was searching for the actual format of T3D and found <!-- invalid URL "http://users.skynet.be/fa550206/Slug-Production/Data/OpenGL-Documents/T3D-File-Format/T3D-File-Format.htm" replaced, --SeriousBarbie (talk) 21:11, 11 August 2016 (EDT) --><br />
[http://web.archive.org/web/20050913035722/http://users.skynet.be/fa550206/Slug-Production/Data/OpenGL-Documents/T3D-File-Format/T3D-File-Format.htm Mongo's description] of [http://www.planetunreal.com Planetunreal] to be extremely helpful. I'll ask him (mongo@planetunreal.com) if we can use and/or edit his description here. The format is much more involved than described here. We can even supply examples of how to do particular hacks.<br />
<br />
'''MadNad:''' Interestingly, I was able to convert a [http://madnad.com/ut2k3/Screenshots/q3dm7.jpg?link Quake3_Level] into a unreal map. Quite interesting. First i converted a *.bsp to a *.map in quake, then I made a level that was just a huge cube and converted it to *.t3d. With an external app (i'll have to find the name of it ) I was able to merge these two together. After some scaling and switching additive brushes in quake to subtractive brushes in ued and subtractive to additive, I compiled and had q3dm7 geometry. I don't necessarily recommend doing this, as it will take more time to fix than create it from scratch, but I thought I would share a little experience I had with this.</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Pivot?diff=46413Legacy:Pivot2017-01-08T02:14:42Z<p>SeriousBarbie: Pivot Tips: modifying PrePivot without GUI</p>
<hr />
<div>The "pivot" of any [[Legacy:Actor|actor]] is essentially its "center" - though it may not coincide with the geographical center of the graphics rendered for that actor. Usually static meshes and brushes are more or less centered around their pivot, but this is not necessarily the case. The pivot, when visible, (in the editor) is displayed as a small red cross.<br />
<br />
The Movement -> Location property of an actor refers to the location of its pivot. The ''PrePivot'' property of an actor is the vector offset of the pivot from its location stored in its mesh, or the center of its sprite &ndash; sort of. It is actually the opposite, the vector offset of the mesh/sprite from the pivot. This can be useful if a mesh or sprite snaps to the grid but the part of the mesh/sprite that snaps to the grid is not the part you wanted snapped. Brushes also have a pivot, but the pivot can be moved within the editor, making the PrePivot property less of an issue for Brushes.<br />
<br />
The pivot is considered the center point of the actor, and as such is also the point that is rotated around when the actor is rotated. Also the AmbientSound is emitted there.<br />
<br />
==Setting the pivot==<br />
<br />
There are several ways to set the pivot point:<br />
* Right-clicking a vertex of a selected brush will put the pivot point of that brush to that vertex. <br />
* [[Legacy:Brush Context Menu|Brush Context Menu]] -> Pivot -> Place pivot snapped here. This will snap the pivot point to the grid where you click on a 2D viewport.<br />
* [[Legacy:Brush Context Menu|Brush Context Menu]] -> Pivot -> Place pivot here. This will place the pivot point exactly where you click on a 2D viewport without considering the grid. <br />
<br />
Right clicking a vertex will set it correctly. If you need the pivot point inside the brush and not exactly on a vertex, you can bring up the brush's properties and alter the Display->PrePivot numbers directly. The PrePivot determines the brush's offset from the pivot point.<br />
<br />
==Pivot Tips==<br />
* If a brush swings off into the distance when rotating, then it's probably because the pivot has somehow been placed far away.<br />
* When rotating a group of brushes together, check that the pivot hasn't ended up off the grid. You can also save time by placing it before rotating.<br />
* If when you try to move the red brush (using shift) and it moves the pivot instead, try to change the red brush properties -> Advanced -> lock location to false.<br />
* In UnrealEd2.0 you PrePivot is not shown in the GUI and therefore not editable. But you can cut the Actor, paste it into an text editor, delete that line with ''PrePivot'', copy that to clipboard and paste it to UnrealEd.<br />
<br />
==Pivot Points and Movers==<br />
<br />
It's also the point about which a [[Legacy:Mover|mover]] will rotate if there is a difference in orientation between successive keys. In UnrealEngine1 all keys of a mover must have the same pivot point. ''We don't know if this still holds true for newer engine versions.''<br />
<br />
==Related Topics==<br />
* [[Legacy:Actor/Display|Actor/Display]] &ndash; PrePivot.<br />
<br />
==Discussion==<br />
<br />
[[Category:Legacy Mapping|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:DeathMatchPlus?diff=46410Legacy:DeathMatchPlus2017-01-04T00:42:52Z<p>SeriousBarbie: added some infos</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Info (UT)|Info (UT)]] >> [[Legacy:GameInfo (UT)|GameInfo (UT)]] >> [[Legacy:TournamentGameInfo|TournamentGameInfo]] >> DeathMatchPlus (Package: BotPack)}}<br />
<br />
This is the Tournament DeathMatch gametype and at the same time the superclass of all other "playable" UT game types.<br />
<br />
==Properties ==<br />
<br />
===Globalconfig Properties ===<br />
<br />
These settings are shared among all UT game types.<br />
; globalconfig int MinPlayers : Bots fill the server to guarantee this minimum number of players.<br />
; globalconfig float AirControl : The default air control.<br />
; globalconfig bool bChangeLevels :<br />
; globalconfig bool bHardcoreMode : If this is True players receive 50% more damage and jump 10% higher. Game time goes by 10% faster.<br />
; globalconfig bool bMegaspeed : Players move 40% faster and jump 20% higher than without bMegaSpeed and bHardcoreMode.<br />
; globalconfig bool bAltScoring : If a player is killed by another player his score is reduced by 1 point.<br />
; globalconfig bool bTournament : True if Tournament mode is enabled. Tournament mode prevents the game from starting until every player has indicated that they are ready (even if the "non ready" players have nipped down the chippy for some food).<br />
; globalconfig int NetWait : Time to wait for players in netgames w/ bNetReady (typically team games)<br />
; globalconfig int RestartWait : <br />
; globalconfig int InitialBots :<br />
<br />
===Config Properties ===<br />
<br />
Per-gametype settings.<br />
; config int FragLimit : Pretty obvious.<br />
; config int TimeLimit : Time limit in minutes.<br />
; config bool bMultiWeaponStay : Weapons stay when they are picked up. (No respawn time)<br />
; config bool bForceRespawn : Players respawn instantly. (Configured in the Settings tab of the Start Game window.)<br />
; config int MaxCommanders :<br />
; config bool bUseTranslocator : Whether players should get a [[Legacy:Translocator|Translocator]].<br />
<br />
===Localized Properties ===<br />
; string StartUpMessage : <br />
; string TourneyMessage : <br />
; string WaitingMessage1 : <br />
; string WaitingMessage2 : <br />
; string ReadyMessage : <br />
; string NotReadyMessage : <br />
; string CountDownMessage : <br />
; string StartMessage : <br />
; string GameEndedMessage : <br />
; string SingleWaitingMessage : <br />
; string gamegoal : <br />
; string NoNameChange : <br />
; string OvertimeMessage : <br />
<br />
===Other Properties ===<br />
; bool bChallengeMode : Game time goes by even faster. (25%)<br />
; bool bAlwaysForceRespawn : Overrides bForceRespawn to be always True. This is a gametype specific setting and can not be configured.<br />
; bool DontRestart : ???<br />
; bool bAlreadyChanged : ???<br />
; bool bFirstBlood : This indicated whether ''First Blood'' was already drawn.<br />
; bool bRequireReady : <br />
; bool bNoviceMode : This will be set when Difficulty is below 4.<br />
; bool bNetReady : <br />
; bool bJumpMatch : All Players can jump as high as if they had the jump boots.<br />
; bool bThreePlus : This will be set when Difficulty is not >= 4, but > 3. (this doesn't seem to be possible though, since Difficulty is a byte variable)<br />
; bool bFulfilledSpecial : Not used in DeathMatchPlus and always set to ''true'' in some sub classes (TeamGamePlus for or CTFGame for example). Can be used in custom game types with special conditions for a successful game.<br />
; bool bRatedTranslocator : Use the Translocator in in this rated game, i.e. ladder game.<br />
; bool bStartMatch : Is set to ''true'' while function <tt>StartMatch()</tt> is running.<br />
; int RemainingTime, ElapsedTime :<br />
; int CountDown, StartCount :<br />
; float LastTauntTime :<br />
; [[Legacy:NavigationPoint|NavigationPoint]] LastStartSpot :<br />
; int NumCommanders : Number of Commanders in the game. ''(Commanders are not implemented in UT)''<br />
; bool bTutorialGame : This game is a tutorial game.<br />
; int NumBots : Number of bots in the game.<br />
; int RemainingBots : <br />
; int LastTaunt[4] : The indices of the last four auto-taunts used, LastTaunt[3] being the most recent. This is generally updated by the Killed() function.<br />
; [[Legacy:ChallengeBotInfo|ChallengeBotInfo]] BotConfig :<br />
; class<[[Legacy:ChallengeBotInfo|ChallengeBotInfo]]> BotConfigType :<br />
; float PlayerRating :<br />
; float AvgOpponentRating :<br />
; int NumOpp :<br />
; int WinCount :<br />
; int LoseCount :<br />
; [[Legacy:PlayerPawn|PlayerPawn]] RatedPlayer :<br />
; int IDnum :<br />
; [[Legacy:RatedMatchInfo|RatedMatchInfo]] RatedMatchConfig :<br />
; float EndTime :<br />
; int LadderTypeIndex :<br />
; [[Legacy:LadderInventory|LadderInventory]] RatedGameLadderObj :<br />
<br />
==Methods ==<br />
; PreCacheReferences ( ) : This function is never called. It exists purely to force the pre-caching of the standard weapon and player meshes. The Arena mutators thereby force the pre-caching of weapon meshes that are not even used.<br />
; CheckReady ( ) : This function sets the <tt>TimeLimit</tt> to 20, and the <tt>RemainingTime</tt> to 1200. The function is only called when tournament mode is turned on.<br />
; SetGameSpeed (float T) : This function sets the gamespeed. It completely replaces the superclass implementation. The function also calls <tt>SaveConfig()</tt> once the final game speed has been calculated.<br />
; PlayTeleportEffect ([[Legacy:Actor (UT)|Actor (UT)]] Incoming, bool bOut, bool bSound) : Originally declared in [[Legacy:GameInfo (UT)|GameInfo (UT)]]. This function simply adds a check for tournament mode behaviour. Apart from that the code is identical to the [[Legacy:TournamentGameInfo|TournamentGameInfo]] version of this function. ''Note to newbie coders: This is an example of poor practice. After the initial tournament check the developer should simply have called <code>Super.PlayTeleportEffect()</code> - it would have saved the code duplication.''<br />
; InitRatedGame ([[Legacy:LadderInventory|LadderInventory]] LadderObj, [[Legacy:PlayerPawn|PlayerPawn]] LadderPlayer) : Set game settings based on ladder information. Called when RatedPlayer logs in.<br />
; AcceptInventory ([[Legacy:Pawn (UT)|Pawn (UT)]] PlayerPawn) : Originally declared in [[Legacy:GameInfo (UT)|GameInfo (UT)]]. This function allows the player to keep all instances of type [[Legacy:LadderInventory|LadderInventory]], and destroys all other inventory objects. The player's weapon and selected item are set to <tt>None</tt> and the function <tt>AddDefaultInventory()</tt> is called.<br />
; bool SetEndCams (string Reason) : Plays the winning message and focuses the view on the winning player.<br />
; PlayWinMessage ([[Legacy:PlayerPawn|PlayerPawn]] Player, bool bWinner) : Plays the winning message if the object passed is of type [[Legacy:TournamentPlayer|TournamentPlayer]].<br />
; NotifySpree ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, int num) : Notifies the local player if they are on a killing spree - and selects an appropriate message. ''num'' is the number of kills the player has got without dying.<br />
; EndSpree ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Unfortunately your killing spree has come to an end - lets tell both you and the person who killed you about it.<br />
; Killed ([[Legacy:Pawn (UT)|Pawn (UT)]] killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other, name damageType) : Declared in [[Legacy:GameInfo (UT)|GameInfo (UT)]]. This function checks for any end of game conditions as well as for "first blood" and other special events. This function is also responsible for sending auto taunts.<br />
; StartMatch ( ) : This is called to start the game. If there is a timelimit on the start of the game then this function sets that. There are also traps in here to end the game from spawn-telefrags (if there are not enough start points then it's possible to win a game just from telefragging).<br />
; Timer ( ) : Checks for tournament mode, whether the game has ended because of it's time limit and other stuff.<br />
; bool TooManyBots ( ) : This function returns <tt>true</tt> if the number of bots plus the number of players is greater than the minimum number of players.<br />
; bool RestartPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] aPlayer) : Called to re-start a player on the map. Will also remove bot players from the game if there are too many of them.<br />
; SendStartMessage( [[Legacy:PlayerPawn|PlayerPawn]] P ) : Shows the start message to the player.<br />
; [[Legacy:Bot (UT)|Bot (UT)]] SpawnBot (out NavigationPoint StartSpot) : Spawns a bot. <i>Finish me</i><br />
; [[Legacy:Bot (UT)|Bot (UT)]] SpawnRatedBot (out [[Legacy:NavigationPoint|NavigationPoint]] StartSpot) : <i>Finish me</i><br />
; bool ForceAddBot ( ) : <i>Finish me</i><br />
; bool AddBot ( ) : <i>Finish me</i><br />
; PlayStartUpMessage ([[Legacy:PlayerPawn|PlayerPawn]] NewPlayer) : <i>Finish me</i><br />
; GiveWeapon ([[Legacy:Pawn (UT)|Pawn (UT)]] PlayerPawn, string aClassName) : Gives a weapon to a player and makes it the player's current weapon.<br />
; RateVs ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Pawn (UT)|Pawn (UT)]] Killer) : <i>Finish me</i><br />
; bool SuccessfulGame ( ) : <i>Finish me</i><br />
; Skip ( )<br />
; SkipAll ( ) : Debug commands (?)<br />
; bool NeedPlayers ( ) : <i>Finish me</i><br />
; bool OneOnOne ( ) : Returns whether there are only two players (human players or bots<br />
; float SpawnWait ([[Legacy:Bot (UT)|Bot (UT)]] B) : <i>Finish me</i><br />
; bool NeverStakeOut ([[Legacy:Bot (UT)|Bot (UT)]] Other) : <i>Finish me</i><br />
<br />
==AI and Navigation Functions ==<br />
; bool CheckThisTranslocator ([[Legacy:Bot (UT)|Bot (UT)]] aBot, [[Legacy:TranslocatorTarget|TranslocatorTarget]] T) : This function returns ''false''.<br />
; PickAmbushSpotFor ([[Legacy:Bot (UT)|Bot (UT)]] aBot) : This function searches through all [[Legacy:NavigationPoint|NavigationPoint]] objects on the map looking for navigation points of type [[Legacy:AmbushPoint|AmbushPoint]]. If the [[Legacy:AmbushPoint|AmbushPoint]] is not taken ([[Legacy:NavigationPoint|NavigationPoint]].taken is ''false'') and the [[Legacy:Bot (UT)|Bot (UT)]] is not already at an ambush point then the ambush point found will be assigned to the [[Legacy:Bot (UT)|Bot (UT)]].''AmbushSpot''. If the bot is already at an ambush point and a new ambush point has been found then the bot's ''AmbushSpot'' will be set to the new [[Legacy:AmbushPoint|AmbushPoint]].<br />
; byte AssessBotAttitude ([[Legacy:Bot (UT)|Bot (UT)]] aBot, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) : This function determines the attitude of ''aBot'' towards ''Other''. The value returned by this function is used in [[Legacy:Bot (UT)|Bot (UT)]].AttitudeTo() function to map to the enumeration [[Legacy:EAttitude|eAttitude]]. The function returns either a 1 (hate) or a 0 (fear) depending on the result of it's calculations. The calculations involve the bot's skill and level of agressiveness as defined by the value of ''aBot.Aggressiveness''.<br />
; float GameThreatAdd ([[Legacy:Bot (UT)|Bot (UT)]] aBot, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) : This function is called by Bot.AssessThreat() and returns a numerical value representing the importance of <tt>Other</tt> as a target. In DeathMatchPlus it simply returns 0, but individual gametypes override this function to gain more control over the bots' selection of targets. For example, the [[Legacy:CTFGame|CTFGame]] implementation of this function returns 10 if <tt>Other</tt> is a flag carrier, and [[Legacy:LastManStanding|LastManStanding]]'s version returns slightly higher threat values for players who have more lives left.<br />
; bool AllowTranslocation ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, vector Dest) : This function returns ''true''.<br />
; bool CanTranslocate ([[Legacy:Bot (UT)|Bot (UT)]] aBot) : This function returns true if the bot is able to perform a translocation. In order for the bot to be able to use the translocator it must first have one, and it's [[Legacy:Translocator|Translocator]] must have a target. Translocation must also be allowed by the game.<br />
; ModifyBehaviour ([[Legacy:Bot (UT)|Bot (UT)]] NewBot) : Only declaration here.<br />
<br />
==Comments ==<br />
<br />
From what I can tell there is an awful lot of handling around the "Tournament Mode" feature.<br />
<br />
==Known Subclasses ==<br />
* [[Legacy:ChallengeDMP|ChallengeDMP]] (used for the "Challenge" group of ladder game?)<br />
* [[Legacy:ChallengeIntro|ChallengeIntro]] (used for CityIntro map)<br />
* [[Legacy:LastManStanding|LastManStanding]]<br />
* [[Legacy:TDarkMatch|TDarkMatch]] (Tournament DarkMatch, not used)<br />
* [[Legacy:TeamGamePlus|TeamGamePlus]]<br />
* [[Legacy:TrainingDM|TrainingDM]]<br />
<br />
==Related Topics ==<br />
* [[Legacy:Mapping For DM|Mapping for DM]]<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:GameInfo_(UT)?diff=46409Legacy:GameInfo (UT)2016-12-31T16:38:23Z<p>SeriousBarbie: reworked and added some infos</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Object|Object]] >> [[Legacy:Actor|Actor]] >> [[Legacy:Info (UT)|Info (UT)]] >> GameInfo (Package: Engine)}}<br />
<br />
A GameInfo subclass contains the rules for a gametype. This includes timelimit, fraglimit, scoring, difficulty, game speed, allowed playerpawn classes, default inventory assignment, and if appropriate, team assignment and general bot behavior.<br />
<br />
This is assigned to a map in the [[Legacy:Level Properties|Level Properties]] window, under LevelInfo -> DefaultGameType.<br />
<br />
The <tt>GameInfo</tt> for the current game can be retrieved from every actor in that game via <tt>Level.Game</tt>, but ''only'' on the server. <tt>GameInfo</tt> is not replicated to network clients; only [[Legacy:GameReplicationInfo (UT)|GameReplicationInfo (UT)]] is.<br />
<br />
See [[Legacy:GameInfo|GameInfo]] for the UT200x version of this class.<br />
<br />
==Properties==<br />
<br />
===Globalconfig Properties===<br />
; bool bMuteSpectators : Whether spectators are allowed to speak.<br />
; bool bLowGore : Whether or not to reduce gore.<br />
; bool bVeryLowGore : Greatly reduces gore.<br />
; bool bNoCheating : Disallows cheating. Hehe.<br />
; bool bAllowFOV : Allows FOV changes in net games<br />
; bool bExternalBatcher : <br />
; float AutoAim : How much autoaiming to do (1 = none, 0 = always). (cosine of max error to correct)<br />
; float GameSpeed : Scale applied to game rate.<br />
; int MaxSpectators : Maximum number of spectators.<br />
; private string AdminPassword : Password to receive bAdmin privileges.<br />
; private string GamePassword : Password to enter game.<br />
; int MaxPlayers : <br />
; string ServerLogName : Server Log<br />
; bool bLocalLog : <br />
; bool bWorldLog : <br />
; bool bBatchLocal : <br />
; int DemoBuild : <br />
; int DemoHasTuts : <br />
; string IPPolicies[50] : <br />
<br />
===Config Properties===<br />
; bool bNoMonsters : Whether monsters are allowed in this play mode.<br />
; bool bHumansOnly : Whether non human player models are allowed.<br />
; bool bCoopWeaponMode : Whether or not weapons stay when picked up.<br />
; bool bClassicDeathmessages : Weapon deathmessages if false.<br />
<br />
===Localized Properties===<br />
; bool bAlternateMode : <br />
; string SwitchLevelMessage : <br />
; string DefaultPlayerName : <br />
; string LeftMessage : <br />
; string FailedSpawnMessage : <br />
; string FailedPlaceMessage : <br />
; string FailedTeamMessage : <br />
; string NameChangedMessage : <br />
; string EnteredMessage : <br />
; string GameName : <br />
; string MaxedOutMessage : <br />
; string WrongPassword : <br />
; string NeedPassword : <br />
; string IPBanned : <br />
<br />
===Other Properties===<br />
; int ItemGoals, KillGoals, SecretGoals : Special game goals.<br />
; byte Difficulty : In Unreal: 0=easy, 1=medium, 2=hard, 3=very hard. In UT: 0=Novice, 1=Average, 2=Experienced, 3=Skilled, 4=Adept, 5=Masterful, 6=Inhuman, 7=Godlike.<br />
; bool bRestartLevel : <br />
; bool bPauseable : Whether the level is pauseable.<br />
; bool bCanChangeSkin : Allow player to change skins in game.<br />
; bool bTeamGame : This is a teamgame.<br />
; bool bDeathMatch : This game is some type of deathmatch (where players can respawn during gameplay)<br />
; bool bGameEnded : set when game ends<br />
; bool bOverTime : <br />
; bool bCanViewOthers : <br />
; float StartTime : <br />
; class<[[Legacy:PlayerPawn|PlayerPawn]]> DefaultPlayerClass : <br />
; class<[[Legacy:Weapon (UT)|Weapon (UT)]]> DefaultWeapon : Default weapon given to player at start.<br />
; int NumSpectators : Current number of spectators.<br />
; class<[[Legacy:ScoreBoard|ScoreBoard]]> ScoreBoardType : Type of scoreboard this game uses.<br />
; class<[[Legacy:Menu|Menu]]> GameMenuType : Type of oldstyle game options menu to display.<br />
; string BotMenuType : Type of bot menu to display.<br />
; string RulesMenuType : Type of rules menu to display.<br />
; string SettingsMenuType : Type of settings menu to display.<br />
; string GameUMenuType : Type of Game dropdown to display.<br />
; string MultiplayerUMenuType : Type of Multiplayer dropdown to display.<br />
; string GameOptionsMenuType : Type of options dropdown to display.<br />
; class<[[Legacy:HUD (UT)|HUD (UT)]]> HUDType : HUD class this game uses.<br />
; class<[[Legacy:MapList|MapList]]> MapListType : Maplist this game uses.<br />
; string MapPrefix : Prefix characters for names of maps for this game type.<br />
; string BeaconName : Identifying string used for finding LAN servers.<br />
; string SpecialDamageString : <br />
; int SentText : <br />
; int NumPlayers : <br />
; int CurrentID : <br />
; class<[[Legacy:LocalMessage (UT)|LocalMessage (UT)]]> DeathMessageClass : <br />
; class<[[Legacy:LocalMessage (UT)|LocalMessage (UT)]]> DMMessageClass : A message class to be used for commonly used messages. For example, the [[Legacy:DeathMatchPlus|DeathMatchPlus]] gametype sets [[Legacy:DeathMatchMessage|DeathMatchMessage]] as the default, which contains messages for overtime, players leaving and joining the game, players changing names, and players switching teams.<br />
; class<[[Legacy:Mutator|Mutator]]> MutatorClass : Class of this gametype's base mutator. (Default is Engine.[[Legacy:Mutator|Mutator]], [[Legacy:DeathMatchPlus|DeathMatchPlus]] uses Botpack.[[Legacy:DMMutator|DMMutator]].)<br />
; [[Legacy:Mutator|Mutator]] BaseMutator : <br />
; [[Legacy:Mutator|Mutator]] DamageMutator : [[Legacy:Linked List|Linked list]] of mutators which affect damage.<br />
; [[Legacy:Mutator|Mutator]] MessageMutator : [[Legacy:Linked List|Linked list]] of mutators which get localized message queries.<br />
; class<[[Legacy:ZoneInfo|ZoneInfo]]> WaterZoneType : Default waterzone entry and exit effects<br />
; name DefaultPlayerState : What state a player should start in for this game type<br />
; class<[[Legacy:GameReplicationInfo|GameReplicationInfo]]> GameReplicationInfoClass : <br />
; [[Legacy:GameReplicationInfo|GameReplicationInfo]] GameReplicationInfo : <br />
; [[Legacy:StatLog|StatLog]] LocalLog : <br />
; [[Legacy:StatLog|StatLog]] WorldLog : <br />
; bool bLoggingGame : Does this gametype log?<br />
; string LocalLogFileName : <br />
; string WorldLogFileName : <br />
; class<[[Legacy:StatLog|StatLog]]> StatLogClass : <br />
; string EnabledMutators : Server query info<br />
<br />
==Methods ==<br />
; AdminLogin ([[Legacy:PlayerPawn|PlayerPawn]] P, string Password) : This function will allow a player to log in as the administrator if the password entered is correct. The function also broadcasts a notification message to the other players.<br />
; AdminLogout ([[Legacy:PlayerPawn|PlayerPawn]] P) : This function is called when a player leaves administrator mode. It ensures that the player is forced to "Walk", and kills them. <i>There is code in there to preserve the players score when they die from logging out of admin mode but I'm sure it doesn't work in practice. &ndash; must check</i>.<br />
; InitLogging ( ) : Called from <tt>PostBeginPlay()</tt>. Logs more stuff than you can shake a big stick at. Calls functions on the WorldLog, Log, and LocalLog objects to do so.<br />
; InitGameReplicationInfo ( ) : This function is responsible for placing the values of the attributes of the GameInfo class important to the client onto the [[Legacy:GameReplicationInfo|GameReplicationInfo]] object.<br />
; string GetInfo ( ) : Returns the status of the World log.<br />
; string GetRules ( ) : This function builds up a description of the server from the list of mutators currently in use, the type of server (Listen or otherwise), and whether there is a password on the server or not.<br />
; int GetServerPort ( ) : This functon returns the port the server is runing on by interrogating the level URL.<br />
; bool SetPause (bool bPause, [[Legacy:PlayerPawn|PlayerPawn]] P) : If the level can be paused then the player who paused the game is stored and the function returns ''true''. If the game is not pausable then the function will return ''false''.<br />
; LogGameParameters ([[Legacy:StatLog|StatLog]] StatLog) : This function writes the general game parameters to the <tt>StatLog</tt>.<br />
; SetGameSpeed (float T) : This function sets the game speed (but never below 0.1).<br />
; bool IsRelevant ([[Legacy:Actor|Actor]] Other) : This function is called from any [[Legacy:Actor|Actor]]'s <tt>PreBeginPlay()</tt>. If this function returns ''true'' the actor continues to exist. If the function returns ''false'' the actor is removed from the game. This function calls the <tt>AlwaysKeep()</tt> and <tt>IsRelevant()</tt> functions on any mutators within the game prior to checking actor difficulty levels and "odds of appearing" values. The function also counts the number of remaining <tt>SecretGoals</tt>, <tt>ItemGoals</tt>, and <tt>KillGoals</tt> left within the level (also see [[Legacy:Creating Actors And Objects|Creating Actors And Objects]]).<br />
; bool GrabOption (out string Options, out string Result) : Grabs the next left option from a string. ''Result'' contains the part between the first "?" and the next "?" (if exist). ''Result'' is removed then from ''Options''. If ''Options'' starts with "?", ''true'' is returned, otherwise ''false''.<br />
; GetKeyValue (string Pair, out string Key, out string Value) : Break up a ''key=value'' pair into its key and value.<br />
; bool HasOption (string Options, string InKey) : See if an option was specified in the options string.<br />
; string ParseOption (string Options, string InKey) : Find the most left option of kind "''InKey''=Value" in ''Options'' and returns ''Value'' if ''InKey'' has been found, an empty string else. ''Options'' stays unchanged.<br />
; ProcessServerTravel (string URL, bool bItems) : Called when a map changes. Is responsible for handling the transfer of players and their inventory as well as ensuring that all logging for the level just played is tidied up.<br />
; bool AtCapacity (string Options) : This function returns ''true'' if the server has the maximum number of players allowed on it.<br />
; bool CheckIPPolicy (string Address) : Returns ''true'' if the IP address of the client is allowed to connect to the server.<br />
; int GetIntOption( string Options, string ParseString, int CurrentValue ) : Same as '''ParseOption''' but returns an Integer. If the key ''ParseString'' is not found, ''CurrentValue'' is returned.<br />
; Logout ([[Legacy:Pawn (UT)|Pawn (UT)]] Exiting) : Logs the player out and tells the logging engine about it.<br />
; AddDefaultInventory ([[Legacy:Pawn (UT)|Pawn (UT)]] PlayerPawn) : Add any default inventory to the player.<br />
; NavigationPoint FindPlayerStart ([[Legacy:Pawn (UT)|Pawn (UT)]] Player, optional byte InTeam, optional string incomingName) : Locates the "best" player start for the player.<br />
; bool RestartPlayer ([[Legacy:Pawn (UT)|Pawn (UT)]] aPlayer) : Restart a player after he has died. This function adds the default inventory by calling <tt>AddDefaultInventory()</tt>, finds a start location by calling <tt>FindPlayerStart()</tt>. Once this has been acomplished, sets the player's stats back to defaults.<br />
; StartPlayer ([[Legacy:PlayerPawn|PlayerPawn]] Other) : Start a player. <i>Finish me</i><br />
; Killed ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other, name damageType) : Called when someone gets killed. This function broadcasts the death message, logs the event, and calls the <tt>ScoreKill()</tt> function.<br />
; BroadcastRegularDeathMessage ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other, name damageType) : Calls on to <tt>BroadcastLocalizedMessage()</tt>.<br />
; ScoreKill ([[Legacy:Pawn (UT)|Pawn (UT)]] Killer, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Increases the Killer's killCount and score by 1 unless it was a suicide - in which case the killed pawn loses a point.<br />
; string KillMessage (name damageType, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) [static] : Returns " died." as a default catch all death message.<br />
; bool CanSpectate ([[Legacy:Pawn (UT)|Pawn (UT)]] Viewer, [[Legacy:Actor|Actor]] ViewTarget) : Returns whether ''Viewer'' is allowed to use ''ViewTarget'' as its point of view. GameInfo's return value is unconditionally ''true''.<br />
; RegisterDamageMutator ([[Legacy:Mutator|Mutator]] M) : Adds a damage mutator at the front of the list of damage mutators.<br />
; RegisterMessageMutator ([[Legacy:Mutator|Mutator]] M) : Adds a message mutator at the front of the list of message mutators.<br />
; int ReduceDamage (int Damage, name DamageType, [[Legacy:Pawn (UT)|Pawn (UT)]] injured, [[Legacy:Pawn (UT)|Pawn (UT)]] instigatedBy) : This function returns a damage of 0 if the injured [[Legacy:Pawn (UT)|Pawn (UT)]] is in a zone that has it's <tt>bNeutralZone</tt> property set to ''true''. Otherwise the original damage is returned.<br />
; bool ShouldRespawn ([[Legacy:Actor|Actor]] Other) : Returns whether an actor item should respawn. In death matches this function should return ''true'' for weapon and item pickups.<br />
; bool PickupQuery ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, [[Legacy:Inventory (UT)|Inventory (UT)]] Item) : Called when pawn has a chance to pick Item up (i.e. when the pawn touches a weapon or item pickup). Should return ''true'' if it is allowed to pick it up, ''false'' if not.<br />
; DiscardInventory ([[Legacy:Pawn (UT)|Pawn (UT)]] Other) : Discard a player's inventory after he dies.<br />
; float PlayerJumpZScaling ( ) : Returns 1.0, but could be overidden for "low grav" game types.<br />
; ChangeName ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, coerce string S, bool bNameChange) : Attempt to change a players name.<br />
; bool ChangeTeam ([[Legacy:Pawn (UT)|Pawn (UT)]] Other, int N) : Return whether a player can change teams or not.<br />
; float PlaySpawnEffect ([[Legacy:Inventory (UT)|Inventory (UT)]] Inv) : Play an inventory respawn effect.<br />
; string PlayerKillMessage (name damageType, [[Legacy:PlayerReplicationInfo|PlayerReplicationInfo]] Other) [static] : returns " was killed by ".<br />
; string CreatureKillMessage (name damageType, [[Legacy:Pawn (UT)|Pawn (UT)]] Other) [static] : returns "was killed by a "<br />
; SendPlayer ([[Legacy:PlayerPawn|PlayerPawn]] aPlayer, string URL) : Send the player specified to the URL passed to the function.<br />
; RestartGame ( ) : Called to restart the current game.<br />
; bool AllowsBroadcast ([[Legacy:Actor|Actor]] broadcaster, int Len) : Returns ''true'' if the [[Legacy:Actor|Actor]] passed to the function is allowed to broadcast a message.<br />
; EndGame (string Reason) : Called at the end of the game. If first calls <tt>BaseMutator.HandleEndGame()</tt> and <tt>SetEndCams()</tt> and if both returns ''false'' game is not ended but <tt>bOverTime</tt> set to ''true''. Otherwise <tt>bGameEnded</tt> is set to ''true'', the event 'EndGame' is risen and game logging is closed down.<br />
; bool SetEndCams (string Reason) : Puts all player pawns into a ''GameEnded'' state and calls the <tt>ClientGameEnded()</tt> function on them. The function returns ''true''.<br />
; ResetGame ( ) [static] : GameInfo's <tt>ResetGame( )</tt> does nothing. In Game type ''Assault'' it is overridden and some default values are reset and saved there.<br />
; bool AddBot ( ) : GameInfo's <tt>AddBot( )</tt> does nothing. It is overwitten in derivied game types, for example in ''DeathMatchPlus''.<br />
; bool ForceAddBot ( ) : GameInfo's <tt>ForceAddBot( )</tt> does nothing. It is overridden in ''DeathMatchPlus''.<br />
; PlayTeleportEffect ([[Legacy:Actor|Actor]] Incoming, bool bOut, bool bSound) : It is intended to play a teleporting special effect, but GameInfo's <tt>PlayTeleportEffect( )</tt> does nothing. Overridden for example in ''DeathMatchPlus''.<br />
<br />
===Native Functions ===<br />
; string GetNetworkNumber() : <i>(unknown)</i><br />
; string ParseKillMessage (string KillerName, string VictimName, string WeaponName, string DeathMessage) [static] : Parses the kill message. Replaces the first occurances of <tt>%k</tt>, <tt>%o</tt> and <tt>%w</tt> with <tt>KillerName</tt>, <tt>VictimName</tt> and <tt>WeaponName</tt> respectively (also see [[Legacy:Message Placeholder|Message Placeholder]]).<br />
<br />
===Events ===<br />
; GameEnding ( ) : This functon is called when a game is shut down. It halts any world logging and local logging.<br />
; DetailChange ( ) : This function is called whenever the client changes their level of detail (high to low, or low to high). Apart from re-linking all of the zones to a SkyBox, any actors with their <tt>bHighDetailMode</tt> property set to ''true'' will be destroyed on entry to a "low detail" mode.<br />
; InitGame (string Options, out string Error) : This function is called before the [[Legacy:Actor|Actor]]s <tt>PreBeginPlay()</tt> function. It sets up some of the game options and spawns the [[BaseMutator]].<br />
; string GetBeaconText ( ) : Returns ''Level.ComputerName'', the length truncated ''Level.Title'', the ''BeaconName'' and the number of players and ''MaxPlayers''. Used by <tt>UdpBeacon.BroadcastBeacon()</tt>.<br />
; PreLogin (string Options, string Address, out string Error, out string FailCode) : Accepts or rejects a player based upon any game password validation, IP bans, and current server capacity.<br />
; [[Legacy:PlayerPawn|PlayerPawn]] Login (string Portal, string Options, out string Error, class<[[Legacy:PlayerPawn|PlayerPawn]]> SpawnClass) : Log a player in. Fails login if you set the Error string. <tt>PreLogin()</tt> is called before <tt>Login()</tt>, but significant game time may pass before <tt>Login()</tt> is called, especially if content is downloaded.<br />
; PostLogin ([[Legacy:PlayerPawn|PlayerPawn]] NewPlayer) : Called after a successful login. This is the first place it is safe to call replicated functions on the PlayerPawn. <i>finish me</i><br />
; AcceptInventory ([[Legacy:Pawn (UT)|Pawn (UT)]] PlayerPawn) : Called when new inventory is accepted. Calls the function <tt>AddDefaultInventory()</tt>.<br />
; ScoreEvent (name EventName, [[Legacy:Actor|Actor]] EventActor, [[Legacy:Pawn (UT)|Pawn (UT)]] InstigatedBy) : Intended to award a score to an actor. GameInfo's <tt>ScoreEvent()</tt> does nothing.<br />
<br />
==Known subclasses ==<br />
* [[Legacy:UnrealGameInfo|UnrealGameInfo]]<br />
* [[Legacy:TournamentGameInfo|TournamentGameInfo]]<br />
<br />
==Comments ==<br />
<br />
We could do with a nice time diagram showing when all of the different functions and events (including those on the mutators) get called.<br />
<br />
==Related Topics ==<br />
<br />
See [[Legacy:Function Syntax|Function Syntax]] and [[Legacy:Variable Syntax|Variable Syntax]] for additional background information.<br />
<br />
----<br />
<br />
[[:Category:Legacy Class (UT)]]<br />
<br />
----<br />
<br />
'''Fearless''': Hmmm, some interesting information here even if it's basic. I'd really like to do a mutator that changes gamespeed without the intervention of an admin. I have also a little question concerning the adminlogout command. It says here that the player is killed when the command is invoked. This does happen on our Linux 4.40 server but this doesn't happen on a server you're hosting yourself. Does anyone have any idea why this is :P ?<br />
<br />
'''NogginBasher''': You can do that using a combination of x3dfxMapVote and IdeFiX's ServerMode. In ServerMode.ini you need something like: "Commands[11]=SET Engine.GameInfo GameSpeed 1.25". I'm currently testing: "Commands[12]=SET Botpack.DeathMatchPlus bHardcoreMode True"<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:View_Fog?diff=46408Legacy:View Fog2016-12-25T10:04:05Z<p>SeriousBarbie: +See Also</p>
<hr />
<div>'''View Fog''' is a simple method of adding [[Legacy:Fog|fog]] to a map or an area in a map. It works by simply tinting the rendered scene by a specified amount. View Fog is sometimes also referred to as "fake fog". It uses practically no rendering resources, so it is very cheap resource-wise, but it is not that realistic. Often an underwater area will have a blueish view fog.<br />
<br />
==Setting Up View Fog in Unreal Tournament==<br />
<br />
In [[Legacy:Unreal Tournament|Unreal Tournament]], view fog is specific to the zone containing the camera. It is specified by the ''ViewFlash'' and ''ViewFog'' variables in the zone's [[Legacy:ZoneInfo (UT)|ZoneInfo]].ZoneLight. Here's a sample configuration:<br />
<br />
{|<br />
<br />
|-<br />
|ViewFlash X<br />
|-0.5<br />
|-<br />
|ViewFlash Y<br />
|-0.5<br />
|-<br />
|ViewFlash Z<br />
|-0.5<br />
|-<br />
|ViewFog X<br />
|0.5<br />
|-<br />
|ViewFog Y<br />
|0.5<br />
|-<br />
|ViewFog Z<br />
|0.5<br />
|}<br />
<br />
==Setting Up View Fog in UT2003==<br />
<br />
View Fog does not appear to work properly in [[Legacy:UT2003|UT2003]], however, the variables for it are still present so theoretically it may still work on some graphics hardware. View Fog is controlled by [[Legacy:PhysicsVolume|PhysicsVolume]]s in UT2003. Specifically, PhysicsVolumes are used. To set up View Fog, simply set the PhysicsVolume->ViewFog property to whatever color you want the screen to be tinted.<br />
<br />
'''Tarquin:''' so does it work or not?<br />
<br />
'''SuperApe:''' I'm wondering if the author meant to say ViewFlash doesn't work in UT200x, not ViewFog. Distance fog seems to work fine. But the issue is confused by the properties ViewFog and FlashFog in [[Legacy:DamageType|DamageType]]. I found this page through a search for that stuff.<br />
<br />
== See Also ==<br />
* [[Legacy: Fog]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Global_Function_(UT)?diff=46407Legacy:Global Function (UT)2016-11-23T23:14:25Z<p>SeriousBarbie: +"is equal to or"</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Object (UT)|Object (UT)]] (Methods)}}<br />
<br />
The functions listed here are globally available in all classes. Due to [[Legacy:UnrealScript|UnrealScript]]'s strict object-oriented approach, they're actually methods of the [[Legacy:Object (UT)|Object (UT)]] class.<br />
<br />
Almost all of these functions are declared as native and final (see [[Legacy:Class Syntax|class syntax]]) and most of them are also [[Legacy:Static Function|static function]]s.<br />
<br />
See [[Legacy:Vector|vector]] and [[Legacy:Rotator|rotator]] for functions on those variable types.<br />
<br />
See [[Legacy:Global Function|Global Function]] for global UT2003 functions.<br />
<br />
===Integer Functions ===<br />
; int Rand (int Max) [static] : Returns a random number ranging from 0 to Max-1.<br />
; int Min (int A, int B) [static] : Returns the lower of the two values.<br />
; int Max (int A, int B) [static] : Returns the higher of the two values.<br />
; int Clamp (int V, int A, int B) [static] : If V is smaller than A, A is returned. If V is larger than B, B is returned. In any other case V is returned.<br />
<br />
===Float Functions ===<br />
; float Abs (float A) [static] : Returns the absolute value of A, usually written |A|. Eg: Abs(5) == Abs(-5) == 5.<br />
; float Sin (float A) [static] : Returns sine( A )<br />
; float Cos (float A) [static] : Returns cosine( A )<br />
; float Tan (float A) [static] : Returns tan( A )<br />
; float Atan (float A) [static] : Inverse tangent. Returns tan<sup>-1-</sup>(A). Other inverse trig functions are not included in [[Legacy:UT|UT]]'s UnrealScript. (see [[Legacy:Useful Maths Functions|Useful Maths Functions]])<br />
; float Exp (float A) [static] : Returns e<sup>A</sup><br />
; float Loge (float A) [static] : Returns log(A), the natural logarithm.<br />
; float Sqrt (float A) [static] : Returns the square root of A.<br />
; float Square (float A) [static] : Returns A<sup>2</sup>.<br />
; float FRand ( ) : Returns a random number between 0 and 1.<br />
; float FMin (float A, float B) [static] : Returns the lower of the two values.<br />
; float FMax (float A, float B) [static] : Returns the higher of the two values.<br />
; float FClamp (float V, float A, float B) [static] : If V is smaller than A, A is returned. If V is larger than B, B is returned. In any other case V is returned.<br />
; float Lerp (float Alpha, float A, float B) [static] : "Returns the linear interpolation between A and B."<br />The return value is calculated through something like this:<br /><tt>(B - A) * Alpha + A</tt><br />
; float Smerp (float Alpha, float A, float B) [static] : Returns an Alpha-smooth nonlinear interpolation between A and B.<br />The return value seems to be calculated through something like this:<br /><tt>(-2 * (B - A) * Alpha ** 3) + (3 * (B - A) * Alpha ** 2) + A</tt><br />
;[[Image:Legacy_interpolation-smerp.gif|Legacy_interpolation-smerp.gif]]<br />
; float RandRange (float Min, float Max) : Returns a random number between Min and Max. This function is not static.<br />
<br />
===String Functions ===<br />
; int Len (coerce string S) [static] : Returns the length of the string, i.e. the number of characters in it.<br />
; int InStr (coerce string haystack, coerce string needle) [static] : If the string <tt>needle</tt> is found inside <tt>haystack</tt>, the number of characters in <tt>haystack</tt> ''before'' the first occurance of <tt>needle</tt> is returned. That is, if the <tt>needle</tt> is found right at the beginning of <tt>haystack</tt>, 0 is returned. If <tt>haystack</tt> doesn't contain <tt>needle</tt>, InStr returns -1.<br />
; string Mid (coerce string S, int skip, optional int num) [static] : Returns a substring of <tt>S</tt>, skipping <tt>skip</tt> characters and returning the next <tt>num</tt> characters or all remaining if the third parameter is left out. Mid("hello", 0, 2) returns "he", Mid("hello", 1) returns "ello", i.e. all but the first character.<br />
; string Left (coerce string S, int num) [static] : Returns the <tt>num</tt> leftmost characters of <tt>S</tt> or all of them if <tt>S</tt> contains less than <tt>num</tt> characters.<br />
; string Right (coerce string S, int num) [static] : Returns the <tt>num</tt> rightmost characters of <tt>S</tt> or all of them if <tt>S</tt> contains less than <tt>num</tt> characters.<br />
; string Caps (coerce string S) [static] : Returns <tt>S</tt> converted to uppercase.<br />
; string Chr (int i) [static] : Returns the character matchin the given ASCII code.<br />
; int Asc (string S) [static] : Returns the ASCII code of the first character in <tt>S</tt>.<br />
<br />
===General Functions ===<br />
<br />
====Logging ====<br />
; Log (coerce string S, optional name Tag) [static] : Writes a line to the log file. The line begins with the Tag or "ScriptLog:" if Tag was not specified, followed by the log string.<br />The tags 'Error' and 'Warning' (and probably others, too) have a special meaning in [[Legacy:Commandlet|Commandlet]]s.<br />
; Warn (coerce string S) [static] : Same like <tt>Log</tt>, but the line starts with "ScriptWarning:" and contains information about the object, state and function that called <tt>Warn</tt>.<br />
; string Localize (string SectionName, string KeyName, string PackageName) [static] : Returns the string found in ''PackageName''.int in the [''SectionName''] section. Logs an error if no localization for the specified string is found.<br />
<br />
====State-Related ====<br />
; GotoState (optional name NewState, optional name Label) : Switches to a new state. State code execution begins at the specified label or at "Begin:" if <tt>Label</tt> is not specified.<br />Before the state is changed the old state's <tt>EndState</tt> function is called. After the state changed <tt>BeginState</tt> of the new state is called.<br />
; bool IsInState (name TestState) : Returns whether the object's current state is the one specified.<br />
; name GetStateName ( ) : Returns the object's current state name.<br />
; BeginState ( ) [not native, not final] : This event is executed during GotoState right after the object switched to the new state. This function can be overridden in any state of any class.<br />
; EndState ( ) [not native, not final] : This event is executed during GotoState right before the object switches to the new state. This function can be overridden in any state of any class.<br />
<br />
====Class Hierarchy ====<br />
; bool ClassIsChildOf (class TestClass, class ParentClass) [static] : Returns whether <tt>TestClass</tt> is equal to or a subclass of <tt>Parentclass</tt>.<br />
; bool IsA (name ClassName) : Returns whether the object's class is the specified class or a subclass. This function doesn't need a reference to the desired class, but just the class's name.<br />
<br />
====Enabling / Disabling Functions ====<br />
; Enable (name ProbeFunc) : Enables a [[Legacy:Probe Function|probe function]].<br />
; Disable (name ProbeFunc) : Disables a [[Legacy:Probe Function|probe function]].<br />
<br />
====Objects / Properties ====<br />
; string GetPropertyText (string PropName) : Returns the value of the specified property [[Legacy:Typecasting|typecasted]] to string. This is useful when you don't want any dependencies to the package of an object, but still need to access its properties.<br />Usage: <tt>aString = anObject.GetPropertyText("''PropertyName''");</tt><br />
; SetPropertyText (string PropName, string PropValue) : Assigns a value to the specified property of an object. Only use this for properties that can be [[Legacy:Typecasting|typecasted]] from string.<br />Usage: <tt>anObject.SetPropertyText("''PropertyName''", "''new value''");</tt><br />
; name GetEnum (Object E, int i) [static] : Returns the i-th element of the given enumeration, as in <code>GetEnum(enum'MyEnum', 2)</code> or an empty name of the specified index exceeds the number of elements in the enumeration.<br />
; [[Legacy:Object (UT)|Object (UT)]] DynamicLoadObject (string ObjectName, Class ObjectClass, optional bool MayFail) [static] : Loads and returns the specified object. If <tt>bMayFail</tt> is true no error will be logged.<br />
; SaveConfig ( ) : Saves the current values of config and globalconfig variables of this object to the ini file and sets them as default values for the object's class.<br />
; StaticSaveConfig ( ) [static] : Saves the default values of config and globalconfig variables of this object's class to the ini file.<br />
; ResetConfig ( ) [static] : Resets the config and globalconfig variables of this object's class to the values stored in Default.ini or DefUser.ini.<br />
<br />
==Related Topics ==<br />
* [[Legacy:UnrealScript|UnrealScript]]<br />
** [[Legacy:Class Syntax|Class Syntax]]<br />
** [[Legacy:Function Syntax|Function Syntax]]<br />
** [[Legacy:Operators|Operators]]<br />
** [[Legacy:Object (UT)|Object class]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/User:SeriousBarbie?diff=46394User:SeriousBarbie2016-11-17T18:28:05Z<p>SeriousBarbie: +Scripting helper functions</p>
<hr />
<div>Just some notes here:<br />
* <nowiki>{{disambig}}</nowiki> for multiple meanings<br />
* Scripting helper functions: [[Legacy:WUtils]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Talk:DamageType?diff=46392Talk:DamageType2016-11-13T13:36:01Z<p>SeriousBarbie: legacy and non-legacy</p>
<hr />
<div>Why are you people so keen on referencing legacy pages from the non-legacy part of the wiki? —[[User:Wormbo|Wormbo]] 00:23, 11 November 2016 (EST)<br />
:Is there any definition available here what is classified as "legacy" and what as "non-legacy"? I didn't find such. I guess that everything related to current Unreal engine is "non-legacy", everything to previous versions "legacy". But that would be a bad classification IMO. --[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 10:08, 11 November 2016 (EST)<br />
::It's right in the page name, the "Legacy" part before the colon. Background is that the old UnrealWiki (before the switch to MediaWiki) had a very wonky copyright statement. —[[User:Wormbo|Wormbo]] 11:25, 11 November 2016 (EST)<br />
:::Oh, I thought it was an indicator for "out of date". I must say that I'm really confused about the structure and different copyrights here (it has taken more that two years or me to accidentally find [[Unreal Wiki:Copyrights]]...) Isn't it possible to get rid of these different copyrights? A note to the copyright holder: on [[Legacy:Project_Copyright]] I found the statement ''The collection and structure of UnrealWiki are copyright UnrealWiki''. But I did not find any information what ''UnrealWiki'' is - a foundation, person or company?<br />
:::Back to concrete: Instead of editing "legacy" pages: what should I do if I want to add some infos on a matter that is classified as "legacy"? (Let's take [https://wiki.beyondunreal.com/Legacy:LevelInfo_%28UT%29?curid=1704&diff=46379&oldid=46169 this change] as an example.)<br />
:::And if I create complete new content ("non-legacy"), why is it unwanted to link to "legacy" pages there? --[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 08:36, 13 November 2016 (EST)</div>SeriousBarbiehttps://wiki.beyondunreal.com/Talk:DamageType?diff=46389Talk:DamageType2016-11-11T15:08:56Z<p>SeriousBarbie: legacy and non-legacy</p>
<hr />
<div>Why are you people so keen on referencing legacy pages from the non-legacy part of the wiki? —[[User:Wormbo|Wormbo]] 00:23, 11 November 2016 (EST)<br />
:Is there any definition available here what is classified as "legacy" and what as "non-legacy"? I didn't find such. I guess that everything related to current Unreal engine is "non-legacy", everything to previous versions "legacy". But that would be a bad classification IMO. --[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 10:08, 11 November 2016 (EST)</div>SeriousBarbiehttps://wiki.beyondunreal.com/DamageType?diff=46383DamageType2016-11-11T03:10:23Z<p>SeriousBarbie: moved disambig to top - seems default here</p>
<hr />
<div>{{disambig}}<br />
'''DamageType''' refers to:<br />
* [[Legacy:DamageType|UT2003: DamageType]]<br />
* [[Legacy:DamageType_%28UT%29|UT: DamageType]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:FlockPawn?diff=46382Legacy:FlockPawn2016-11-11T03:09:06Z<p>SeriousBarbie: +immune against corroded</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Pawn (UT)|Pawn (UT)]] >> FlockPawn}}<br />
<br />
These are quite easy, so i dont know why no-one did them before:<br />
<br />
The flockpawns are:<br />
*Bird1<br />
*BiterFish<br />
*Bloblet<br />
*Horsefly<br />
*NaliRabbit<br />
<br />
All of these (except the rabbit and the bird) need a [[Legacy:FlockMasterPawn|FlockMasterPawn]] to work.<br />
<br />
Heres how to use them all:<br />
<br />
===The Amoeba (Bloblet)===<br />
<br />
This is the most complicated flockpawn, and has only ever been used properly once (I think).<br />
<br />
To work it, place several Bloblet actors in one area, then place the ParentBlob pawn (the controller of the bloblets) in the middle of the group. Open the properties of all the bloblets and the parentblob and change them to the same tag; add several triggers around your map and set the event to the amoeba's tag (to keep it constantly aggressive) and there you have a working amoeba!<br />
<br />
Notes:<br />
* I don't know if this works online, but it does offline.<br />
* Bloblets are immune against [[DamageType]] ''corroded''.<br />
<br />
===Biter Fish===<br />
<br />
These are easier than bloblets, you just simply put the [[Legacy:FlockMasterPawn|FlockMasterPawn]] in the level, then change the properties to control the number of fish, the fact that they are violent, and how far the fish swim from the master pawn. Horseflies work in the same way<br />
<br />
===Birds and Nali Rabbits===<br />
<br />
These are the easiest to work. Just place them in the level and watch them go! no master pawn needed<br />
<br />
'''Ghost:''' With regards to the FlockMasterPawn Bird1, is it possible to export the Bird1 animation along with it's script sequence from UT over to UT2003? <br />
<br />
'''Wormbo:''' You might be able to export it with the [[Legacy:WOTgreal|WOTgreal]] exporter or with the [[Legacy:UT Package Tool|UT Package Tool]]. To import it just use the [[Legacy:Exec Directive|exec directive]]s of the Bird1 class.<br />
<br />
'''Ghost:''' That worked, thanks.<br />
<br />
==Related Topics ==<br />
* [[Legacy:Artificial Intelligence|Artificial Intelligence]]<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/DamageType?diff=46381DamageType2016-11-11T03:07:56Z<p>SeriousBarbie: disambig: DamageType</p>
<hr />
<div>'''DamageType''' refers to:<br />
* [[Legacy:DamageType|UT2003: DamageType]]<br />
* [[Legacy:DamageType_%28UT%29|UT: DamageType]]<br />
<br />
{{disambig}}</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Mover_(UT)?diff=46380Legacy:Mover (UT)2016-11-10T00:28:21Z<p>SeriousBarbie: Hint to bDynamicLightMover and semi-solid brushes</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Brush|Brush]] >> Mover (Package: Engine)}}<br />
<br />
(see [[Legacy:Mover|Mover]] for the UT2003 version of this class)<br />
<br />
In UT '''Movers''' are brushes that move. They are not part of the [[Legacy:BSP|BSP]], but look as if they are to the player. Use them to create doors, elevators and other parts of dynamic level geometry. This page describes the class in detail. <br />
<br />
Terminology: A mover is said to "open" when it moves from key 0 to the last defined key (''NumKeys-1'' for the technically-minded). Movement in the opposite direction is called "closing". Some subclasses of mover have the ability to open partially.<br />
<br />
==Properties==<br />
===Events Group===<br />
;name Event: This event is fired when the Mover has finished opening (reached last position of ''KeyNum'') and before the ''StayOpenTime'' begins to run. [[Legacy:Types Of Mover|Other Mover types]] may implement other behaviour.<br />
;name Tag:(as usual)<br />
<br />
===Mover Group===<br />
; bool bDamageTriggered : The mover is triggered by taking damage. Use for doors that open when you shoot then, for example.<br />
; bool bDynamicLightMover : Setting this to True will cause the mover to change the way it is lit as it moves. This is very useful when a mover is going between areas with different brightnesses or colors of light. Note that BrushRayTraceKey is unused if the mover is dynamically lit.<br />The process isn't perfect by any means, and often has dirty shadows and flickering between different lightings on the brush. However, it does eliminate the annoying black patches on the undersides of lifts and the sides of doors. In addition this takes quite a bit more CPU power than normal. Use this only in areas where it is needed to make the mover look decent and processing power can be spared.<br />If the mover's surface stays completely dark, make sure that it does not share any surface with [[Legacy:Semisolid|semi-solid]] brushes.<br />
; byte BrushRaytraceKey (const) : This should be set to the number of a keyframe. When the map's lighting is rebuilt, the polys of the mover will always be lit as if it is in this position. (Naturally, this property is irrelevant if you have bDynamicLightMover = True.)<br />
; bool bSlave : This mover is a slave. It will follow another mover. See [[Legacy:Compound Movers|Compound Movers]].<br />
; bool bTriggerOnceOnly : Go dormant after first trigger. Note that this doesn't work for all states (see ''Mover States'' below).<br />
; name BumpEvent : The name of an [[Legacy:Event|event]] to fire when any something bumps this mover. This allows you to have movers that can be either triggered or bumped: you have the BumpEvent trigger the mover's own Tag.<br />
; EBumpType BumpType : Determines what sort of things are counted as bumping this mover. Other things that bump it will be ignored.<br />
; bool bUseTriggered : This mover will be triggered by player grab.<br />
; float DamageThreshold : Minimum damage to trigger. Works with bDamageTriggered.<br />
; float DelayTime : Delay before starting to open.<br />
; int EncroachDamage : How much to damage encroached actors.<br />
; byte KeyNum : The number of the key that the mover is curently set to. Using the [[Legacy:Brush Context Menu|Brush Context Menu]] -> Mover -> Key command is the same as changing this value. See [[Legacy:Keyframe|Keyframe]] for more on this.<br />
; EMoverEncroachType MoverEncroachType : Tells the mover what to do when it hits an actor while trying to move. For example, when a lift returns to the low position and hits a player's head. (see ''EMoverEncroachType'' enum below)<br />
; EMoverGlideType MoverGlideType : How the mover moves from one position to another. (see ''EMoverGlideType'' enum below)<br />
; float MoveTime : Time to spend moving between keyframes.<br />
; byte NumKeys (const) : This is the number of different positions (known as ''keys'') that the mover has. The maximum possible value seems to be 64.<br />
; float OtherTime : TriggerPound stay-open time.<br />
; name PlayerBumpEvent : Optional event to cause when the player bumps the mover.<br />
; name ReturnGroup : {{Legacy:Mover/ReturnGroup}}<br />If none is given, Mover's BeginPlay() code sets it to the value of ''Tag''. This may lead to undesired behaviour, so using an unique value for ReturnGroup seems to be the best solution if no other Movers depend on this Mover.<br />
; float StayOpenTime : How long to remain open before closing.<br />
; byte WorldRaytraceKey (const) : Set this to the number of the key you want the mover to affect the world at. Basically, whatever you set this to is where the mover will block light. A neat trick you can do with this property is to set it to an unused key which you have positioned somewhere outside your map. That way the mover will not cast a shadow at all. This can alleviate the annoying problem of black patches underneath movers.<br />
<br />
===MoverSounds Group ===<br />
<br />
The properties in this section set the sounds played by the mover as it travels.<br />
; Sound ClosedSound : When finish closing.<br />
; Sound ClosingSound : When start closing.<br />
; Sound MoveAmbientSound : Optional ambient sound when moving.<br />
; Sound OpenedSound : When finished opening.<br />
; Sound OpeningSound : When start opening.<br />
<br />
The sounds in UT packages like DoorsMod are designed with this system in mind, and are usually found in sets of 3, eg "md2start", "md2loop", "md2end". Use start sounds with Opening, end sounds with Opened and loop with ambient.<br />
<br />
Only MoveAmbientSound is affected by the value of Sounds -> SoundVolume. The others play at full volume. (Some scripting would probably fix this for a custom class, since the Mover calls PlaySound, and this has an optional volume parameter.)<br />
<br />
===UnrealScript-Only Properties===<br />
; byte PrevKeyNum : Previous keyframe.<br />
; [[Legacy:Actor (UT)|Actor (UT)]] SavedTrigger : Who we were triggered by.<br />
; int numTriggerEvents : Number of times triggered (count down to untrigger)<br />
; Mover Leader<br />
; Mover Follower : For having multiple movers return together. (see [[Legacy:Compound Movers|Compound Movers]])<br />
; vector KeyPos[8] : <br />
; rotator KeyRot[8] : <br />
; vector BasePos, OldPos, OldPrePivot, SavedPos : <br />
; rotator BaseRot, OldRot, SavedRot : <br />
; [[Legacy:NavigationPoint (UT)|NavigationPoint (UT)]] myMarker : <br />
; [[Legacy:Actor (UT)|Actor (UT)]] TriggerActor : <br />
; [[Legacy:Actor (UT)|Actor (UT)]] TriggerActor2 : <br />
; [[Legacy:Pawn (UT)|Pawn (UT)]] WaitingPawn : <br />
; bool bOpening, bDelaying, bClientPause : <br />
; bool bPlayerOnly : <br />
; [[Legacy:Trigger|Trigger]] RecommendedTrigger : <br />
; vector SimOldPos : <br />
; int SimOldRotPitch, SimOldRotYaw, SimOldRotRoll : <br />
; vector SimInterpolate : <br />
; vector RealPosition : <br />
; rotator RealRotation : <br />
; int ClientUpdate : <br />
<br />
==Enums ==<br />
<br />
===EMoverEncroachType ===<br />
; ME_StopWhenEncroach : Stop when we hit an actor.<br />
; ME_ReturnWhenEncroach : Return to previous position when we hit an actor.<br />
; ME_CrushWhenEncroach : Crush the poor helpless actor.<br />
; ME_IgnoreWhenEncroach : Ignore encroached actors.<br />
<br />
===EMoverGlideType ===<br />
; MV_MoveByTime : Move linearly.<br />
; MV_GlideByTime : Move with smooth acceleration.<br />
<br />
===EBumpType ===<br />
; BT_PlayerBump : Can only be bumped by player.<br />
; BT_PawnBump : Can be bumped by any pawn.<br />
; BT_AnyBump : Cany be bumped by any solid actor.<br />
<br />
==States==<br />
<br />
The mover states, set in the [[Legacy:InitialState|InitialState]] property determine:<br />
* how the mover is activated<br />
* how it behaves once it has been activated<br />
<br />
Note that other settings affect activation behavior too:<br />
* the BumpType property affects ''who'' can activate it <br />
* bDamageTriggered .....<br />
* bUseTriggered ....<br />
<br />
The "OpenTimed" states open the mover (from key 0 to the last key), wait then close and sleep again. Only the states with "Trigger" in the name respond to triggering.<br />
<br />
;None: The mover will not move through its keys, unless it is a slave.<br />
<br />
;BumpButton: <br />
This is very similar to BumpOpenTimed, but designed to be used for a button which controls another mover which is set to TriggerOpenTimed (a door, for example). <br />
<br />
Use the button mover's '''BumpEvent''' property to tie it to the door mover's Events -> Tag. When the button is bumped, it moves and so does the door. The button is then frozen, and it will only return when the door has successfully closed. This is pretty much just a nice cosmetic touch: the button won't return until it can be used again.<br />
<br />
In brief:<br />
<br />
* The button mover's StayOpenTime is ignored. <br />
* If the door is prevented from closing (by a player, say), the button will not return<br />
* Once the door mover has finished closing, the button mover is closed.<br />
<br />
<br />
;BumpOpenTimed: The mover reacts to being touched. Set '''BumpType''' to determine what counts as touching it. Used for buttons (though see BumpButton for special cases). Can be used for doors, although TriggerControl is better.<br />
<br />
;StandOpenTimed: The mover reacts when the engine detects a player has stood on it. Used for lifts.<br />
<br />
;TriggerControl: <br />
The mover opens while the trigger is active, and closes when unTriggered &ndash; ie if set up with a simple Trigger actor, as soon as the player steps out from the Trigger's radius the mover will start closing again. <br />
<br />
Example: the door to the redeemer area in UT's DM-StalwartXL and CTF-Gauntlet. (note to anyone reading this: the [[Legacy:Event|Event]] page needs to explain that events can last for a duration, as in this case &ndash; there's an UnTrigger function too when a player steps out of a Trigger actor's radius.)<br />
<br />
<br />
;TriggerOpenTimed: When triggered, the mover opens fully, waits and closes again. For related topics on triggering see the links section below.<br />
<br />
;TriggerPound:<br />
Similar to TriggerControl, but used for movers that open and close continuously. As soon as the corresponding trigger is activated, a mover using this state will begin the following cycle:<br />
<br />
# Opens as usual, with its speed determined by the MoveTime property.<br />
# Pauses for a time equal to the OtherTime property.<br />
# Closes as usual, with its speed determined by the MoveTime property.<br />
# Pauses for a time equal to the StayOpenTime property.<br />
<br />
The mover loops through these actions until whatever activated the trigger leaves the trigger's collision area. When this happens, the mover immediately closes and remains at rest until triggered again.<br />
<br />
<br />
;TriggerToggle: The mover will open when triggered and stop at the open position (the last keyframe). The next time it is triggered, it will close, and so on. Note that bTriggerOnceOnly has no effect in this state.<br />
<br />
==Discussion==<br />
<br />
'''Xian:''' while trying to see how I can misuse brushes in a better and more efficient way since I don't like the way Epic coded UT as a whole, I found this code in Engine.Mover.FindTriggerActor():<br />
<br />
<uscript><br />
ForEach AllActors(class 'Actor', A)<br />
if ( (A.Event == Tag) && (A.IsA('Trigger') || A.IsA('Mover')) )<br />
{<br />
if ( A.IsA('Counter') || A.IsA('Pawn') )<br />
{<br />
bPlayerOnly = true;<br />
return; //FIXME - handle counters<br />
}<br />
[...]<br />
}<br />
</uscript><br />
<br />
How can a Trigger/Mover be a Pawn ? This seems like a nice logical error. Although the consequences may not be huge (since altogether the main triggering mechanism is done by movers/trigger classes), I just don't see how they could miss this... although it is trivial, check the next part:<br />
<br />
<uscript><br />
bPlayerOnly = ( TriggerActor.IsA('Trigger') && (Trigger(TriggerActor).TriggerType == TT_PlayerProximity) );<br />
if ( bPlayerOnly && ( TriggerActor2 != None) )<br />
{<br />
bPlayerOnly = ( TriggerActor2.IsA('Trigger') && (Trigger(TriggerActor).TriggerType == TT_PlayerProximity) );<br />
if ( !bPlayerOnly )<br />
{<br />
A = TriggerActor;<br />
TriggerActor = TriggerActor2;<br />
TriggerActor2 = A;<br />
}<br />
}<br />
</uscript><br />
<br />
My guess is the correct version is: <br />
<br />
<uscript><br />
bPlayerOnly = ( TriggerActor.IsA('Trigger') && (Trigger(TriggerActor).TriggerType == TT_PlayerProximity) );<br />
if ( bPlayerOnly && ( TriggerActor2 != None) )<br />
{<br />
// Xian correction: TriggerActor to TriggerActor2 :)<br />
bPlayerOnly = ( TriggerActor2.IsA('Trigger') && (Trigger(TriggerActor2).TriggerType == TT_PlayerProximity) );<br />
if ( !bPlayerOnly )<br />
{<br />
A = TriggerActor;<br />
TriggerActor = TriggerActor2;<br />
TriggerActor2 = A;<br />
}<br />
}<br />
</uscript><br />
<br />
Again the code as a whole works, but let's face it, the rule of ''ntars'' should NOT apply here and this SHOULD be fixed imo. Perhaps people who wish to take advantage of custom Mover classes which are dependant on Triggers and TriggerActor(2) pointers should rewrite this function to fix it accordingly. Any thoughts ?<br />
<br />
'''Graphik:''' I understand the trivial bit, but unfortunately not the useful part. I mean, I'm assuming there is one.<br />
<br />
'''Xian:''' In my opinon, the code needs a lot of optimization and checks (for example in most parts it does iterations to all Actors with their Event matching the current Tag, while proper way of doing it, is to check if the Actor has an Event set, but most importantly to not iterate at all if there is no Tag set; true it does it only in PBP, but still). This was just a code-related discussion, and I assumed coders that would create custom Movers for UT would find this interesting. If you want a useful side of it, let me put it this way: assuming I am right (and to me it looks like I am), I have yet to see a correction of logical errors which is not useful :)<br />
<br />
'''Graphik:''' OK cool.<br />
<br />
'''Xian:''' ok so an optimized version imo:<br />
<br />
<uscript><br />
function FindTriggerActor()<br />
{<br />
local Actor A;<br />
<br />
TriggerActor = None;<br />
TriggerActor2 = None;<br />
<br />
// Xian: if there is no tag at all, why bother ?<br />
if (Tag == '')<br />
return;<br />
<br />
foreach AllActors(class 'Actor', A)<br />
if ((A.Event != '') && (A.Event == Tag) && (A.IsA('Trigger') || A.IsA('Mover')) )<br />
{<br />
if ( A.IsA('Counter') )<br />
{<br />
bPlayerOnly = true;<br />
return; //FIXME - handle counters<br />
}<br />
if (TriggerActor == None)<br />
TriggerActor = A;<br />
else if ( TriggerActor2 == None )<br />
TriggerActor2 = A;<br />
}<br />
<br />
if ( TriggerActor == None )<br />
{<br />
bPlayerOnly = (BumpType == BT_PlayerBump);<br />
return;<br />
}<br />
<br />
bPlayerOnly = ( TriggerActor.IsA('Trigger') && (Trigger(TriggerActor).TriggerType == TT_PlayerProximity) );<br />
if ( bPlayerOnly && ( TriggerActor2 != None) )<br />
{<br />
// Xian: fixed TriggerActor to TriggerActor2<br />
bPlayerOnly = ( TriggerActor2.IsA('Trigger') && (Trigger(TriggerActor2).TriggerType == TT_PlayerProximity) );<br />
if ( !bPlayerOnly )<br />
{<br />
A = TriggerActor;<br />
TriggerActor = TriggerActor2;<br />
TriggerActor2 = A;<br />
}<br />
}<br />
}<br />
</uscript><br />
<br />
<uscript><br />
function PostBeginPlay()<br />
{<br />
local mover M;<br />
<br />
//brushes can't be deleted, so if not relevant, make it invisible and non-colliding<br />
if ( !Level.Game.IsRelevant(self) )<br />
{<br />
SetCollision(false, false, false);<br />
bCollideWorld = False; // Xian: :)<br />
SetLocation(Location + vect(0,0,20000)); // temp since still in bsp<br />
bHidden = true;<br />
}<br />
else<br />
{<br />
FindTriggerActor();<br />
// Initialize all slaves.<br />
if( !bSlave && (Tag != '')) ) // Xian: tag check<br />
{<br />
foreach AllActors( class 'Mover', M, Tag )<br />
{<br />
if( M.bSlave )<br />
{<br />
M.GotoState('');<br />
M.SetBase( Self );<br />
}<br />
}<br />
}<br />
if ( Leader == None )<br />
{ <br />
Leader = self;<br />
<br />
if (ReturnGroup != '') // Xian: tag check again<br />
{<br />
foreach AllActors( class'Mover', M )<br />
{<br />
if ( (M != self) && (M.ReturnGroup == ReturnGroup) )<br />
{<br />
M.Leader = self;<br />
M.Follower = Follower;<br />
Follower = M;<br />
}<br />
}<br />
}<br />
}<br />
}<br />
}<br />
</uscript><br />
<br />
<uscript><br />
function FinishNotify()<br />
{<br />
local Pawn P;<br />
<br />
if (WaitingPawn == None)<br />
return; // Xian: don't iterate unless needed<br />
<br />
// Note: this does kinda upsets the blanace of Bot decission in case they assigned the current<br />
// instance of the Mover as their special destination, but in most cases it's all about online play; <br />
// although this is not something I recommend for UT as a whole, these changes should help for <br />
// player-only mods that require online gameplay and is made for informative purposes<br />
<br />
if ( StandingCount > 0 )<br />
for ( P=Level.PawnList; P!=None; P=P.nextPawn )<br />
if ( P.Base == self)<br />
{<br />
// Xian: is it even relevant to execute code for players since they're aware of mover states ?<br />
if (P.IsA('Bot'))<br />
{<br />
P.StopWaiting();<br />
<br />
if ( (P.SpecialGoal == self) || (P.SpecialGoal == myMarker) )<br />
P.SpecialGoal = None; <br />
}<br />
<br />
if ( P == WaitingPawn )<br />
WaitingPawn = None;<br />
}<br />
<br />
if ( WaitingPawn != None )<br />
{<br />
if (WaitingPawn.IsA('Bot'))<br />
{<br />
WaitingPawn.StopWaiting();<br />
if ( (WaitingPawn.SpecialGoal == self) || (WaitingPawn.SpecialGoal == myMarker) )<br />
WaitingPawn.SpecialGoal = None; <br />
}<br />
<br />
WaitingPawn = None;<br />
}<br />
}<br />
</uscript><br />
<br />
This is how it should all be in my opinion :) The code should execute faster. Not tested but in theory, it should be better.<br />
<br />
==Subclasses==<br />
* [[Legacy:Types Of Mover|Types of Mover]] is a quick overview of the different classes of mover <br />
* [[Legacy:AssertMover|AssertMover]]<br />
* [[Legacy:AttachMover|AttachMover]]<br />
* [[Legacy:ElevatorMover|ElevatorMover]]<br />
* [[Legacy:GradualMover|GradualMover]]<br />
* [[Legacy:LoopMover|LoopMover]]<br />
* [[Legacy:MixMover|MixMover]]<br />
* [[Legacy:RotatingMover|RotatingMover]]<br />
* [[Legacy:FixedMover|FixedMover]] &ndash; custom class that fixes network bugs with movers than rotate in the process of opening or closing<br />
<br />
It's possible to change the class of a mover after it's been created, but it requires [[Legacy:Brush Hacking|Brush Hacking]].<br />
<br />
==Related Topics==<br />
* [[Legacy:Mover Topics|Mover Topics]] is the hub for all related articles & tutorials on making specific movers<br />
* [[Legacy:Types Of Trigger|Types of Trigger]]<br />
* [[Legacy:Event|Event]]<br />
<br />
==Mover Tutorials==<br />
* [[Legacy:Create A Mover|Create A Mover]]<br />
* [[Legacy:Keyframe|Keyframe]]<br />
* [[Legacy:Activating A Mover|Activating a Mover]]<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:LevelInfo_(UT)?diff=46379Legacy:LevelInfo (UT)2016-11-08T16:06:36Z<p>SeriousBarbie: extended description of Level.TimeSeconds</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Info (UT)|Info (UT)]] >> [[Legacy:ZoneInfo (UT)|ZoneInfo (UT)]] >> LevelInfo (Package: Engine)}}<br />
<br />
LevelInfo holds:<br />
* information about the map (default gamemode, author, music, etc).<br />
* information about the zones in the map that don't have a [[Legacy:ZoneInfo (UT)|ZoneInfo (UT)]].<br />
<br />
Unrealed will automatically place a LevelInfo when you create a new map. It's located at the origin (0,0,0), but its Advanced -> bHiddenEd flag is set so you can't see it.<br />
<br />
The properties of the LevelInfo can be accessed<br />
* [[Legacy:UnrealEd Main Menu|UnrealEd Main Menu]] -> View -> Level Properties<br />
* by pressing the F6 key.<br />
* In script by with the Level pointer in any actor.<br />
<br />
More details here: [[Legacy:Level Properties|Level Properties]]<br />
<br />
See [[Legacy:LevelInfo|LevelInfo]] for the UT2003 version of this class.<br />
<br />
==Properties==<br />
<br />
===LevelInfo===<br />
; string Author : Who built it.<br />
; bool bCheckWalkSurfaces : Enable texture-specific physics code for Pawns. <&ndash; or would if that code had been implemented.<br />
; bool bHumansOnly : Only allow "human" player [[Legacy:Pawn|pawn]]s in this level<br />
; bool bLonePlayer : No multiplayer coordination, i.e. for entranceways.<br />
; bool bNeverPrecache :<br />
; float Brightness :<br />
; class<[[Legacy:GameInfo (UT)|GameInfo (UT)]]> DefaultGameType : GameInfo to use if ?game= is not in the URL when opening this map.<br />
; string IdealPlayerCount (localized) : Ideal number of players for this level, e.g. 6-8 players.<br />
; string LevelEnterText (localized) : Message to tell players when they enter.<br />
; string LocalizedPkg : Package to look in for localizations.<br />
; int RecommendedEnemies : Number of enemy bots recommended (used by rated games)<br />
; int RecommendedTeammates : Number of friendly bots recommended (used by rated games)<br />
; [[Legacy:Texture (UT)|Texture (UT)]] Screenshot : A preview of the map. (see [[Legacy:Level Screenshot|Level Screenshot]])<br />
; float TimeDilation : Normally 1 &ndash; scales real time passage. (This is replicated to network clients.)<br />
; string Title (localized): Name of the map.<br />
<br />
===Audio===<br />
; byte CdTrack (const) : Default CD track for level. Don't bother with this.<br />
; float PlayerDoppler : Player doppler shift, 0=none, 1=full.<br />
; Music Song (const) : Default song for level.<br />
; byte SongSection (const) : Default song order for level. ''I haven't tried this, but DigSh.umx has an unusual squence order, with like three songs in one, with sequences 0, 1, and 2 corresponding to plain, action, suspense; so maybe this setting is for the "start pattern". &ndash;[[Legacy:TwelveBaud|TwelveBaud]]''<br />
<br />
===other properties===<br />
; int AIProfile[8] : TEMP statistics<br />
; float AvgAITime : moving average of Actor time<br />
; bool bAggressiveLOD : Frame rate is well below DesiredFrameRate, so make LOD more aggressive<br />
; bool bAllowFOV : (This is replicated to network clients.)<br />
; bool bBegunPlay : Whether gameplay has begun.<br />
; bool bDropDetail : Frame rate is below DesiredFrameRate, so drop high detail actors<br />
; bool bHighDetailMode : Client high-detail mode.<br />
; bool bLowRes (config) : optimize for low resolution (e.g. TV)<br />
; bool bNextItems : If inventory should be carried by players to the next level (used in co-op and SinglePlayer)<br />
; bool bNoCheating : (This is replicated to network clients.)<br />
; bool bPlayersOnly : Only update players.<br />
; bool bStartup : Starting gameplay.<br />
; string ComputerName : Machine's name according to the OS.<br />
; int Day (transient) : Current date, day of month.<br />
; int DayOfWeek (transient) : Current date, day of week.<br />
; [[Legacy:Texture (UT)|Texture (UT)]] DefaultTexture : This texture will be used if a certain texture can't be loaded.<br />
; string EngineVersion : Engine version.<br />
; [[Legacy:GameInfo (UT)|GameInfo (UT)]] Game : Reference to the [[Legacy:GameInfo (UT)|GameInfo (UT)]]. Not valid on network clients.<br />
; int Hour (transient) : Current time, hour.<br />
; int HubStackLevel :<br />
; ELevelAction LevelAction (transient) : What "Action" the Level is under going. Used by Console.DrawLevelAction() to print those nice "Loading", "Saving", "CONNECTING" and "PRECACHING" messages that we all love so much.<br />
; int Millisecond (transient) : Current time, millisecond.<br />
; string MinNetVersion : Min engine version that is net compatible.<br />
; int Minute (transient) : Current time, minute.<br />
; int Month (transient) : Current date, month.<br />
; [[Legacy:NavigationPoint|NavigationPoint]] NavigationPointList (const) : Beginning of the NavigationPoint List.<br />
; ENetMode NetMode : Tells if this is a standalone game, a dedicated server, a listen server, or a Client in a net game.<br />
; string NextURL : The next map the server will go.<br />
; float NextSwitchCountdown : Amount of time until we go to NextURL (if it is set).<br />
; string Pauser : If paused, name of person pausing the game. (This is replicated to network clients.)<br />
; [[Legacy:Pawn (UT)|Pawn (UT)]] PawnList (const) : Beginning of the Pawn List.<br />
; int Second (transient) : Current time, second.<br />
; [[Legacy:SpawnNotify|SpawnNotify]] SpawnNotify : Beginning of the SpawnNotification List.<br />
; [[Legacy:LevelSummary|LevelSummary]] Summary : LevelSummary is a special object saved in the level, which can by Dynamically Loaded to give the wonderful map summary in the Start Practice Session window.<br />
; float TimeSeconds : Time in (game) seconds since level began play. This variable is not replicated and usually the value starts at 0 as soon as the level has been brought up. Every network member (server, clients) maintains and updates its own copy of it and therefore it may has different values on different network members.<br />
; string VisibleGroups : List of the group names which were checked when the level was last saved<br />
; int Year : Current date, year.<br />
<br />
==Enums==<br />
<br />
===ENetMode===<br />
; NM_Standalone : Standalone game.<br />
; NM_DedicatedServer : Dedicated server, no local client.<br />
; NM_ListenServer : Listen server.<br />
; NM_Client : Client only, no local server.<br />
<br />
===ELevelAction===<br />
; LEVACT_None : Just playin' the game.<br />
; LEVACT_Loading : Loading another/this level.<br />
; LEVACT_Saving : Saving the Game (generally Single Player only)<br />
; LEVACT_Connecting : Connecting to a Server.<br />
; LEVACT_Precaching : Precaching the Level.<br />
<br />
==Methods==<br />
; string GetAddressURL() (native, simulated) : Return the URL of this level, which may possibly exist on a remote machine.<br />
; string GetLocalURL() (native, simulated) : Return the URL of this level on the local machine.<br />
; ServerTravel( string URL, bool bItems ) : Jump the server to a new level.<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Enums?diff=46378Enums2016-10-27T19:01:41Z<p>SeriousBarbie: added chapter "Enum constants and variables"</p>
<hr />
<div>An '''enum''' (also '''enumerated type''' or '''enumeration''') is a primitive data type in [[UnrealScript]]. The possible values of an enum type are a list of identifiers, which can be compared not only for equality, but also for order.<br />
<br />
==Declaration syntax==<br />
The general syntax of enum declarations is:<br />
'''enum''' ''enumname'' '''{'''<br />
''value1'',''value2'',...<br />
'''}'''<br />
An enum declaration may appear either as standalone declaration, in which case it must be followed by a semicolon, or as inline declaration instead of the type specification in variable declarations. There is no difference between a standalone and inline declaration, in both cased the enum is a direct member of the class.<br />
<br />
Remember that all members of an UnrealScript class share the same namespace. An enum declaration may hide any member of a parent class if it has the same name.<br />
<br />
Unlike [[structs]], enum types may neither have any modifiers nor contain anything else than their value declarations. By convention, enum names start with the letter '''E''' to easily recognize the type as an enum. This is only a convention, not a requirement, though.<br />
<br />
=== Enum constants and variables ===<br />
After an enum has been defined, use that enumname like a [[Types|data type]]. Examples:<br />
<uscript>var EMyEnum MyEnumVar;<br />
const EMyEnum MyEnumConst;</uscript><br />
It is also possible to define an enum and variable at once using the keyword '''[[Variables#Declaration|var]]''' as prefix:<br />
<uscript>var enum enumname {<br />
value1, value2,...<br />
} variablename;</uscript><br />
<br />
==Value declarations==<br />
The values of an enum type are identifiers, that means they must start with a letter or underscore character, may contain letters, digits and the underscore character and are restricted to a maximum length of 63 characters. Values are separated by commas and there may be an optional comma after the last value.<br />
<br />
By convention, enum value names start with a series of capital letters specific to the enum's name, followed by an underscore character. For short enum names this is usually the capitalized enum name, like AXIS_X or AXIS_Y for the [[UE2:EAxis (UT2004)|EAxis]] enum. For longer enum names, often either the initial letters of each enum name part are used or one of the parts, possibly shortened, is capitalized. Examples here are the [[UE1:EDrawType (UT)|EDrawType]] enum with values such as DT_Sprite or DT_Mesh and the [[UE3:ENetRole (UT3)|ENetRole]] enum with values such as ROLE_SimulatedProxy or ROLE_Authority.<br />
<br />
In [[Unreal Engine 3]] there may be a [[metadata|metatag]] right after each value declaration to specify the value's [[Metadata#Tags|display name]] in any of [[UnrealEd]]'s [[properties lists]].<br />
<br />
A good example for an enum declaration with custom display names for its values is [[UE3:EMaterialAdjustmentType (UT3)|UIRoot.EMaterialAdjustmentType]] in [[UT3]]:<br />
<uscript><br />
enum EMaterialAdjustmentType<br />
{<br />
ADJUST_None<DisplayName=Clipped>,<br />
ADJUST_Normal<DisplayName=Scaled>,<br />
ADJUST_Justified<DisplayName=Uniformly Scaled>,<br />
ADJUST_Bound<DisplayName=Bound>,<br />
ADJUST_Stretch<DisplayName=Stretched>,<br />
};<br />
</uscript><br />
As you can see, the display name of an enum value may be totally different from the actual value identifier.<br />
<br />
===Implicit enum properties===<br />
Enum types an implicit property '''EnumCount'''. This property is similar to the '''Length''' property of a [[dynamic array]] in that it returns the number of values declared for that enum. In [[Unreal Engine 1]] and 2 it is only available at runtime, but in [[Unreal Engine 3]] it can also be used at compile-time to define [[static array]] sizes. For some reason it doesn't count as constant expression when defining [[constants]].<br />
<br />
As a synonym for '''EnumCount''', Unreal Engine 3 also provides the implicit enum value '''''XYZ''_MAX''', where ''XYZ'' is the prefix used for other values in the same enum. For example the [[UE3:EPhysics (UT3)|Actor.EPhysics]] enum has the implicit value ''PHYS_MAX'' representing the value 13. Note that this additional enum value is also exported when generating C++ headers for [[native classes]] in [[Unreal Engine 2]] and earlier, but it's not available to UnrealScript in those engine generations.<br />
<br />
==Converting enum values==<br />
===Enum value to number===<br />
Each enum value also stands for a [[byte]] value. Variables of an enum type or function returning an enum value can directly be used as if they were of an integer type. The integer representation of an enum value depends on its position in the value list. The first value represents the integer value 0, the second represents 1, the next 2, then next 3 and so on.<br />
<br />
===Numbers to enum values===<br />
Converting generic numbers to enum values is possible (at least in UE3), by assigning to a temporary variable:<br />
<br />
<uscript><br />
local EMaterialAdjustmentType TheEnum;<br />
TheEnum = 3;<br />
`Log(TheEnum);<br />
</uscript><br />
<br />
...will return "ADJUST_Bound". The standard casting syntax for UE3 appears to work:<br />
<br />
<uscript><br />
`Log(EMaterialAdjustmentType(3));<br />
</uscript><br />
<br />
...but this will return "3".<br />
<br />
===Enum value to name===<br />
To get the name of an enum value you can use the [[Object#GetEnum|GetEnum]] function. It expects an [[Literals#Objects|object literal]] representing the enum type and the index of the enum value whose name to return.<br />
<br />
Take the following call, for example:<br />
<uscript>GetEnum(Enum'EPhysics', 2)</uscript><br />
This will return the name equal to the [[Literals#Names|name literal]] <code>'PHYS_Falling'</code>. Note that the second parameter of the GetEnum function is actually of type ''int''. Since enum values can also be used as numbers (as described above), you can also pass in variables or function return values of an enum type.<br />
<br />
===Enum value to string===<br />
If you [[typecast]] an enum value to string, you will only get the string representation of the numeric representation as described above in "Enum value to number". To get the string representation of the enum value name, you can instead [[typecast]] the return value of the GetEnum function to string.<br />
<br />
===String or name to enum value===<br />
This is only really possible in [[Unreal Engine 1]] and 2 and only for enum variables at the class level, because it requires the SetPropertyText function, which was removed in Unreal Engine 3. Simply pass the name of the enum variable as the first parameter and the desired enum value as the second parameter to assign the value to the variable.<br />
<br />
{{navbox unrealscript}}</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy_talk:TriggeredDeath?diff=46377Legacy talk:TriggeredDeath2016-10-22T00:13:40Z<p>SeriousBarbie: moved discussion here; added replacement code for TriggeredDeath</p>
<hr />
<div>'''Ike Bart:''' I first thought it was something that only works when triggered like the [[Legacy:PressureZone|PressureZone]]<br />
<br />
'''Ike Bart:''' For some odd reason, scripted pawns that touch the TriggeredDeath come back as ghosts after you die. The only way to kill them off without using any commands to get rid of pawns is to hit them with certain weapons from the [[Legacy:U4et|U4et]] mod for UT.<br />
<br />
'''Wormbo:''' TriggeredDeath uses the victim's HidePlayer() method after calling Died(), maybe this messes up the Pawn's states.<br />
<br />
[[Legacy:RenameMe|RenameMe]] - TriggeredDeath(UT)<br />
<br />
BTW - Could we actually create that WikiTag?<br />
<br />
'''Tarquin:''' Sure. But I thought this was a UT-only class<br />
<br />
<br />
== Replacements ==<br />
=== TriggeredDeathSB ===<br />
<br />
<uscript>/******************************************************************************<br />
Fix for UnrealShare.TriggeredDeath: if touching Actor is a ScriptedPawn, it<br />
will be destroyed.<br />
******************************************************************************/<br />
class TriggeredDeathSB extends TriggeredDeath;<br />
<br />
auto state Enabled {<br />
function Touch(Actor Other) {<br />
Super.Touch(Other);<br />
if (ScriptedPawn(Other) != None)<br />
Other.Destroy();<br />
}<br />
}<br />
</uscript>Simple replacement for the ScriptedPawn-Does-not-get-killed bug. --[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 20:13, 21 October 2016 (EDT)</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:TriggeredDeath?diff=46376Legacy:TriggeredDeath2016-10-22T00:10:48Z<p>SeriousBarbie: added hint about ScriptedPawn-bug; moved comments to discussion page</p>
<hr />
<div>{{classbox|[[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Triggers (UT)|Triggers (UT)]] >> TriggeredDeath (Package: UnrealShare)}}<br />
<br />
Any pawn that touches this trigger will be killed. If the pawn is a player pawn, then a death sequence is activated with optional fog. At the start of the death sequence, the player loses all items, including the non-throwable items. During the death sequence, the player has 1 health. The player can still run around and pick up items during the death sequence. If the player picks up a [[Legacy:Health|health]] or [[Legacy:TournamentHealth|TournamentHealth]] item, the death sequence ends, but he/she is missing inventory items.<br />
Due to a bug ScriptedPawns do not get killed. See [[Legacy_talk:TriggeredDeath|discussion page]] for details.<br />
<br />
==Properties ==<br />
<br />
===TriggeredDeath Group ===<br />
;bool bDestroyItems :If true, destroys all weapons and decorations that enter the collision radius. Note: ''do not'' use this in a Capture the Flag game, as it will destroy a flag that enters its collision volume and thus make it impossible for either team to score thereafter.<br />
<br />
;float ChangeTime :How long the death sequence takes in seconds.<br />
<br />
;name DeathName :When a [[Legacy:DamageType|DamageType]] such as Burned, Corroded or Drowned is used here, it alters the death message. With nothing here, the death message is the same for falling. ''(So-and-so left a small crater.)''<br />
<br />
;vector EndFlashFog :Colored view fog at end of death sequence, similar to the ViewFog in the [[Legacy:ZoneInfo (UT)|ZoneInfo (UT)]] actor.<br />
<br />
;float EndFlashScale : If set to a negative value, this makes the scenery darker and the FlashFog more visible as the death sequence ends. At some point, the screen turns totally black.<br />
<br />
;sound FemaleDeathSound :Sound used when a female player or bot touches the TriggeredDeath.<br />
<br />
;sound MaleDeathSound :Sound used when a male player or bot touches the TriggeredDeath.<br />
<br />
;vector StartFlashFog :Colored view fog at start of death sequence.<br />
<br />
;float StartFlashScale : This is similar to the EndFlashScale but it affects the initial FlashScale setting.<br />
<br />
===Hidden===<br />
; float TimePassed[8]<br />
; PlayerPawn Victim[8] : For flashing PlayerPawn's screen the PlayerPawn must be remembered for ''ChangeTime'' seconds. These arrays stores up to 8 references to players and their flashing time.</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Canvas?diff=46375Legacy:Canvas2016-10-21T23:10:29Z<p>SeriousBarbie: +wiki syntax</p>
<hr />
<div>{{classbox| [[Legacy:UT2003|UT2003]] :: [[Legacy:Object|Object]] >> Canvas (Package: Engine)}}<br />
<br />
The '''Canvas''' is a wrapper for methods for drawing text, [[Legacy:Texture|Texture]]s and [[Legacy:Mesh|mesh]]es on the local player's screen. Canvas objects are passed to various events and functions in the various classes, e.g. [[Legacy:HUD|HUD]], [[Legacy:Weapon|Weapon]], [[Legacy:GUI|GUI]] classes and [[Legacy:Interaction|Interaction]]s.<br />
<br />
See [[Legacy:Canvas (UT)|Canvas (UT)]] for Canvas properties and methods available in UT.<br />
<br />
==Properties ==<br />
; bool bCenter : Whether to center the text.<br />
; bool bNoSmooth : Whether bilinear filtering should ''not'' be applied.<br />
; bool bRenderLevel : Will render the level if enabled.<br />
; float ClipX, ClipY : Width and height of the clipping region.<br />
; float CurX, CurY : Current position for drawing relative to origin set by OrgX/OrgY.<br />
; float OrgX, OrgY : Origin for drawing and upper left corner of the clipping window.<br />
; int SizeX, SizeY : Zero-based actual dimensions. <br />
; float SpaceX, SpaceY : Spacing for after executing one of the Draw* methods, i.e. this contains the screen size of the last drawn element.<br />
; byte Style : The values of this variable correspond to the ''ERenderStyle'' enum of the [[Legacy:Actor|Actor]] class.<br />
; color DrawColor : Color to use for drawing. White (R=255,G=255,B=255) means draw everything in its default colors. If any color component is lower than 255 the specific color component of the [[Legacy:Material|Material]] or Font will be drawn darker. Alpha values specify the opacity of the drawn Material or Font. (A=255 means completely opaque) Also see [[Legacy:Color Blending|color blending]].<br />
; Plane ColorModulate : Modulate all colors by this before rendering.<br />
; float CurYL : Largest Y size since DrawText.<br />
; float FontScaleX, FontScaleY : <br />
; font Font : Font for DrawText.<br />
; font MedFont :<br />
; font SmallFont :<br />
; font TinyFont : <br />
; string MedFontName, SmallFontName, TinyFontName : <br />
; [[Legacy:Viewport|Viewport]] Viewport (const) : Viewport that owns the canvas.<br />
; pointer pCanvasUtil (const) : Used internally.<br />
<br />
===UT2004 only===<br />
; bool bForceAlpha : Force all drawing to be alpha'ed.<br />
; float ForcedAlpha : How much to force.<br />
<br />
==Methods ==<br />
<br />
===Texture Drawing===<br />
; DrawTile( [[Legacy:Material|Material]] Mat, float XL, float YL, float U, float V, float UL, float VL ) : This draws a rectangle within the material onto the screen. The upper left of the material will be at the current pen position. <br />
:; Mat : The material to draw.<br />
:; XL, YL : Width and height of the material on the screen, in number of pixels.<br />
:; U, V : coordinates, within the material, of the upper left of the rectangular window.<br />
:; UL, VL : width and height, in pixels, of the window within the material. <br />
; DrawTileClipped( [[Legacy:Material|Material]] Mat, float XL, float YL, float U, float V, float UL, float VL ) : Like DrawTile, but the material is clipped according to the region set by OrgX/OrgY and ClipX/ClipY.<br />
; DrawTileStretched( [[Legacy:Material|Material]] Mat, float XL, float YL ) : Draws the whole material stretched to the specified size. The texture is divided into four parts and only the pixels along the horizontal and vertical center lines are stretched.<br />
; DrawTileJustified( [[Legacy:Material|Material]] Mat, byte Justification, float XL, float YL ) : <br />
; DrawTileScaled( [[Legacy:Material|Material]] Mat, float XScale, float YScale ) : Draws the whole material scaled as specified by the multipliers.<br />
; DrawPattern( [[Legacy:Material|Material]] Tex, float XL, float YL, float Scale ) : Draws the scaled material and repeats it to fill a rectangle of the specified size.<br />
; DrawIcon( [[Legacy:Texture|Texture]] Tex, float Scale ) : Draws the whole texture once with the specified scaling. Unlike most other draw functions, this one doesn't work with all [[Legacy:Material|Material]] classes. Only materials subclassed from [[Legacy:Texture|Texture]] can be used, i.e. you can't use it to draw modifiers (shaders, etc.) or [[Legacy:ScriptedTexture|ScriptedTexture]]s.<br />
; DrawRect( [[Legacy:Texture|Texture]] Tex, float RectX, float RectY ) : Draws the whole texture stretched to the specified size.<br />
; DrawVertical( float X, float height ) : Draw a vertical line. The line's color is specified through DrawColor.<br />
; DrawHorizontal( float Y, float width ) : Draw a horizontal line.<br />
; DrawLine( int direction, float size ) : DrawLine is special as it saves it's original position. Direction: 0 = up, 1 = down, 2 = left, 3 = right<br />
; DrawBracket( float width, float height, float bracket_size ) : <br />
; DrawBox( Canvas canvas, float width, float height ) : Draws a box of the specified size. For some reason this function doesn't draw on the Canvas object you call it from, but needs a Canvas object as the first parameter.<br />
<br />
===Text Drawing===<br />
; DrawText( coerce string Text, optional bool CR ) : <br />
; DrawTextClipped( coerce string Text, optional bool bCheckHotKey ) : <br />
; StrLen( coerce string String, out float XL, out float YL ) : Get the size of a string when it would be drawn using the current font. The text will be wrapped according to the canvas width.<br />
; TextSize( coerce string String, out float XL, out float YL ) : Get the size of a string when it would be drawn using the current font. The text will be clipped at the <br />
; WrapStringToArray( string Text, out array<string> OutArray, float dx, string EOL ) : Takes Text and splits it based on how it would fit in the limitation of dx. Also will make a split when it encounters the characters contained in EOL. You can then use the strings of OutArray to make wrapped text by iterating through the array and placing each line of text one step lower than the last. dx would work best as an equation like Canvas.SizeX * 0.2 (20% of the Canvas width).<br />
; WrapText( out String Text, out String Line, float dx, Font F, float FontScaleX ) (static) : <br />
; DrawTextJustified( coerce string String, byte Justification, float x1, float y1, float x2, float y2 ) : Draws String into the box starting at (x1, y1) and ending at (x2, y2). It justifies the text left, center or right, if justification is 0, 1 or 2 respectively.<br />
; DrawScreenText( string Text, float X, float Y, EDrawPivot Pivot ) : <br />
<br />
===Actor Drawing===<br />
; DrawActor( [[Legacy:Actor|Actor]] A, bool WireFrame, optional bool ClearZ, optional float DisplayFOV ) : <br />
; DrawScreenActor( [[Legacy:Actor|Actor]] A, optional float FOV, optional bool WireFrame, optional bool ClearZ ) : <br />
; DrawPortal( int X, int Y, int Width, int Height, [[Legacy:Actor|Actor]] CamActor, vector CamLocation, rotator CamRotation, optional int FOV, optional bool ClearZ ) : It doesn't work when using OpenGL. ('''Note:''' The ClearZ argument does nothing, you have to manually clear the Z-buffer or you get strange results. Call the '''Clear''' function below with ClearZ '''true''' before '''DrawPortal''')<br />
;* '''kiff:''' no longer supported in UT3<br />
; vector WorldToScreen( vector WorldLoc ) : Converts the given absolute world coordinates to canvas coordinates. The returned vector's X and Y components contain the coordinates. ''What is the Z component? a dot product of an angle maybe? &ndash; Wormbo''<br />
;* '''Missilemaster:''' If WorldLoc is behind you, X and Y are the same as when it's ahead of you, but Z changes from being < 1 to being > 1. So, you'll probably want to put "if( Z < 1.0 )" in front of any drawing functions with this or whatever you draw will also appear when WorldLoc is behind you. ( Worked for me, at least. )<br />
;* '''Sonic:''' Also when Z == 1.0 the teambeacon above players heads dissapears but doing if(Z == 1.0) wont work you will need to do if(float(string(Z)) == 1) so that it limits Z to 2 decimal places, i noticed without the float > string > float conversion it doesnt want to work.<br />
; GetCameraLocation( out vector CameraLocation, out rotator CameraRotation ) : Returns the camera's location and rotation.<br />
; Clear( optional bool ClearRGB, optional bool ClearZ ) : <br />
; SetScreenLight( int index, vector Position, color lightcolor, float radius ) : <br />
; SetScreenProjector( int index, vector Position, color color, float radius, [[Legacy:Texture|Texture]] tex ) :<br />
<br />
===Other Functions===<br />
; Reset() : Resets the canvas properties.<br />
; SetPos( float X, float Y ) : Sets CurX/Y.<br />
; SetOrigin( float X, float Y ) : Sets OrgX/Y.<br />
; SetClip( float X, float Y ) : Sets ClipX/Y.<br />
; SetDrawColor( byte R, byte G, byte B, optional byte A ) : Sets the DrawColor.<br />
; Color MakeColor( byte R, byte G, byte B, optional byte A ) (static) : Returns a Color struct with the specified values. When A is not specified or set to 0, then A=255 is used.<br />
<br />
===Native Functions===<br />
<br />
<UScript><br />
<br />
native(464) final function StrLen( coerce string String, out float XL, out float YL ); // Wrapped!<br />
<br />
native(465) final function DrawText( coerce string Text, optional bool CR );<br />
<br />
native(466) final function DrawTile( material Mat, float XL, float YL, float U, float V, float UL, float VL );<br />
<br />
native(467) final function DrawActor( Actor A, bool WireFrame, optional bool ClearZ, optional float DisplayFOV );<br />
<br />
native(468) final function DrawTileClipped( Material Mat, float XL, float YL, float U, float V, float UL, float VL );<br />
<br />
native(469) final function DrawTextClipped( coerce string Text, optional bool bCheckHotKey );<br />
<br />
native(470) final function TextSize( coerce string String, out float XL, out float YL ); // Clipped!<br />
<br />
native(480) final function DrawPortal( int X, int Y, int Width, int Height, actor CamActor, vector CamLocation, rotator CamRotation, optional int FOV, optional bool ClearZ );<br />
<br />
native final function vector WorldToScreen( vector WorldLoc );<br />
<br />
native final function GetCameraLocation( out vector CameraLocation, out rotator CameraRotation );<br />
<br />
native final function SetScreenLight( int index, vector Position, color lightcolor, float radius );<br />
<br />
native final function SetScreenProjector( int index, vector Position, color color, float radius, texture tex );<br />
<br />
native final function DrawScreenActor( Actor A, optional float FOV, optional bool WireFrame, optional bool ClearZ );<br />
<br />
native final function Clear(optional bool ClearRGB, optional bool ClearZ);<br />
<br />
native final function WrapStringToArray(string Text, out array<string> OutArray, float dx, optional string EOL);<br />
<br />
static native final function WrapText( out String Text, out String Line, float dx, Font F, float FontScaleX );<br />
<br />
native final function DrawTilePartialStretched( Material Mat, float XL, float YL ); // rjp<br />
<br />
native final function DrawTileStretched(material Mat, float XL, float YL);<br />
<br />
native final function DrawTileJustified(material Mat, byte Justification, float XL, float YL);<br />
<br />
native final function DrawTileScaled(material Mat, float XScale, float YScale);<br />
<br />
native final function DrawTextJustified(coerce string String, byte Justification, float x1, float y1, float x2, float y2);<br />
<br />
native final function DrawActorClipped( Actor A, bool WireFrame, float Left, float Top, float Width, float Height, optional bool ClearZ, optional float DisplayFOV);<br />
<br />
</UScript><br />
<br />
==External Links==<br />
* [[udn2:CanvasReference]]<br />
<br />
==Related Topics==<br />
* [[Legacy:HUD|HUD]] and [[Legacy:HUD Interactions|HUD Interactions]]<br />
* [[Legacy:HudOverlay|HudOverlay]]<br />
** [[Legacy:ScriptedHudOverlay|ScriptedHudOverlay]]<br />
<br />
==Discussion==<br />
<br />
'''TurkeyFromHell:''' Dude idk when you stuck those in here, but i am eternally grateful you did.. because i can't really do a google search through all my class sources for "native render" and find the DrawActor function now can I? :D <3 Maybe I'll finally be able to draw stuff through walls -.-... we'll see :P<br />
<br />
'''OlympusMons:''' Added the native functions, Im not sure if they are ut2k4 only or not so someone might want to check that. I hope Im doing good here, not sure if this is where these native functions should be going or not, the formatting might need to be changed also. Help please :P<br />
<br />
[[Category:Legacy Class (UT2003)|{{PAGENAME}}]]<br />
[[Category:Legacy Class (UT2004)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/HoM?diff=46374HoM2016-10-08T04:30:56Z<p>SeriousBarbie: Redirected page to Legacy:Hall Of Mirrors</p>
<hr />
<div>#REDIRECT [[Legacy:Hall Of Mirrors]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Functions?diff=46373Functions2016-10-07T04:20:38Z<p>SeriousBarbie: baaah, anchor set at wrong keyword...</p>
<hr />
<div>A '''function''' in [[UnrealScript]] is a [[wp:subroutine|subroutine]] associated with a specific [[class]]. Functions can define zero or up to sixteen [[#Parameters|parameters]] and optionally a return type. Various [[#Modifiers|modifiers]] can be used in the declaration to change the way the function can be accessed or how it behaves when called.<br />
<br />
[[Operators]] and [[delegates]] are special kinds of functions. Operators have either exactly one (prefix/postfix operators) or two (infix operators) parameters and can use an operator symbol instead of a function name. Delegates are variable-like placeholders you can assign functions to. Calls to a delegate actually call the function assigned to it.<br />
<br />
==Function declarations==<br />
===Syntax===<br />
A regular function declaration looks like this:<br />
''[[#Modifiers|[modifiers]]]'' '''function''' ''[[types|[returntype]]]'' functionname '''(''' ''[[#Parameters|[parameter declarations]]]'' ''')''' ''body_or_semicolon''<br />
If the function does not return any value, the return type can be omitted. In this case [[return statement]]s in the function body may not specify any value. Otherwise, if a return value was specified, any return statement must specify an expression that evaluates to that type. Starting with [[Unreal Engine 2]] the compiler will emit a warning if a return type was specified, but the function body does not contain any return statement.<br />
Alternatively, the keyword '''event''' can be used instead of '''function''' without any difference at the UnrealScript level. The '''event''' keyword will only become relevant when writing [[native code]].<br />
<br />
'''Note:''' The compiler is not very strict about the order of modifiers and the keywords '''function''' and '''event'''. Especially in the UT3 source code you will sometimes see modifiers between the keyword '''function''' and the return type or function name. This can be very confusing to anyone reading your code, so please always make '''function''' or '''event''' the last keyword before the return type or function name.<br />
<br />
===Modifiers===<br />
Before the actual function declaration you are allowed to specify one or more function modifiers. These change the way the function works in certain situations.<br />
{{Infobox EngineVersion|modifier}}<br />
<br />
====Access modifiers====<br />
; Private<sup>2,3</sup>: The function is only accessible within the same class. Not even subclasses can "see" it, which means the usual rules for overriding functions don't apply - subclasses may change the return type and the number and type of parameters. Since they don't see the parent class function, they cannot call it via the [[Super]] keyword.<br />
; Protected<sup>2,3</sup>: Restricts access to this function to the current class and its subclasses. Subclasses may override the function unless it is also declared as '''final'''.<br />
; Public<sup>2,3</sup>: The default access rule. If neither '''private''' nor '''protected''' is specified, this is one is implied. Public functions can be called from non-related classes and may be overridden in subclasses, unless the function is also declared as '''final'''.<br />
; Static: Static functions are not tied to specific objects, but to a class. The object literal <code>Self</code> is not allowed within static functions and instance functions (i.e. functions not declared with the '''static''' modifier) can only be called through object references, this includes iterator functions in [[ForEach loop]]s. Because static functions are not executed in the context of any object instance, they can also not be subject to [[replication]].<br />
; Final: As the name suggests, function declarations with this modifier are "final" and can't be overridden in subclasses.<br />
<br />
====Call modifiers====<br />
; Exec: Marks the function as potential console command. Note that exec functions are only really called via console commands for certain objects, such as the local PlayerController, that player's HUD, Pawn or selected Weapon and a few other places. The possible places for exec functions may vary from game to game, so have a look at the [[UnrealScript source code]] of your game to find out where you can put exec functions that actually work.<br/>When overriding functions, you must also declare the new function with the '''exec''' modifier if and only if the overridden function was declared with it. This means you cannot turn a regular function into a console command!<br />
; K2Call<sup>3-x3</sup> : Allows the function to be referenced and called via [[Kismet 2]]{{confirm}}.<br />
; K2Override<sup>3-x3</sup> : Related to [[Kismet 2]]{{confirm}}. Effect unknown.<br />
; K2Pure<sup>3-x3</sup> : Related to [[Kismet 2]]{{confirm}}. Effect unknown.<br />
; Simulated: Marks the function as valid for execution on clients if the actor containing it was replicated to that client and the local [[role]] of that client is either ROLE_SimulatedProxy or ROLE_DumbProxy.<br/>'''Note:''' The modifier '''simulated''' does not imply any kind of replication or even broadcast! Also, this modifier is not inherited when overriding functions - every super function call evaluates that super function's '''simulated''' modifier separately, potentially breaking the chain of super calls on clients!<br />
; Singular: Restricts recursive function calls by only ever allowing a single singular function to execute per object instance. If a singular function is called, the engine first checks if the object instance the function was called on already executes a singular function. If it does, the new function call is ignored.<br />
<br />
====Network modifiers====<br />
These modifiers affect function [[replication]] in [[Unreal Engine 3]]. Earlier engine generations use the [[replication block]] to define these.<br />
; Client<sup>3</sup>: Specifies that this function should be replicated to the client owning the actor if it is called on the server. This modifier automatically makes the function '''simulated''' as well.<br />
; DemoRecording<sup>3-x1</sup>: Specifies that this function should be replicated to the demorecording driver (applicable to server-side demo recording only). It will only be executed during demo playback. This modifier automatically makes the function '''simulated''' as well, which makes sense since demo playback essentially is a client environment. Note that '''Client''' function calls are also replicated to the demorecording driver, whereas '''DemoRecording''' ones are replicated only to the driver, not to the real clients.<br />
; Reliable<sup>3</sup>: Replicated functions will be replicated reliably when marked with this modifier.<br />
; Server<sup>3</sup>: Specifies that this function should be replicated to the server if it was called on a replicated actor that is owned by the local client.<br />
; Unreliable<sup>3</sup>: Replicated functions will be replicated unreliably when marked with this modifier, i.e. they may be dropped due to packet loss or bandwidth saturation.<br />
<br />
====Implementation modifiers====<br />
; Const<sup>3</sup>: This modifier is actually placed after the closing parenthesis of the parameter list. It will be passed to the generated native header file, but has no effect in UnrealScript.<br />
; DLLImport<sup>3-x2</sup>: Indicates that the function should be linked to the specified [[wp:DLL|DLL]] in [[DLLBind]].<br />
; Event: As mentioned in the [[#Syntax|Syntax]] section above, the keyword '''event''' may replace the keyword '''function''' without any effect on the UnrealScript level. However, when exporting native header files from script code, '''event''' functions will have calling stubs generated so the UnrealScript function can be called more easily from C++ code. These generated C++ methods have the name <code>event''NameOfUnrealScriptFunction''</code> and their parameters and possible return type reflects the UnrealScript function declaration.<br />
; Intrinsic<sup>1,2</sup>: See '''native'''.<br />
; Intrinsic(''number'')<sup>1,2</sup>: See '''native(''number'')'''.<br />
; Iterator: Native functions with the '''iterator''' modifier can only be used as the iterator function of a [[ForEach loop]]. This modifier may not be used for non-native functions.<br />
; Latent: Native functions with the '''latent''' modifier may only be called directly from [[state code]] (but not within any [[ForEach loop]]) and usually pause state code execution at least until the next tick, possibly even longer. This modifier may not be used for non-native functions.<br />
; Native: The actual implementation of this function resides in native code in a C++ function with the name <code>exec''NameOfUnrealScriptFunction''</code>. Very early [[Unreal Engine 1]] versions used the keyword '''intrinsic''' instead.<br/>Similar to '''simulated''' functions, native functions can be called clientsidely on replicated actors even if the local [[role]] is ''ROLE_SimulatedProxy'' or ''ROLE_DumbProxy''.<br />
; Native(''number''): Same as the plain '''native''' modifier, but additionally the function gets its own [[UnrealScript bytecode]] token.<br/>''Even if you can write native code for your mod, you should never specify numbers for your native functions!''<br />
; NoExport<sup>3</sup>, NoExportHeader<sup>3-x2</sup>: Prevents this function from being exported to native headers.<br />
; Virtual<sup>3</sup>: This modifier is just passed through to exported native headers and has no effect in UnrealScript.<br />
<br />
===Parameters===<br />
A function may have zero to sixteen parameters. If you need to pass more values to your function, consider using combining some or all of them to a [[struct]]-type parameter or passing them as a [[static array|static]] or [[dynamic array]].<br />
<br />
====Syntax====<br />
Parameter declarations have the following syntax:<br />
''[parameter modifiers]'' [[type]] parametername<br />
As with other [[variable declaration]]s, the parameter name may optionally followed by a number in square brackets to declare the parameter as [[static array]]:<br />
''[parameter modifiers]'' [[type]] parametername'''['''arraysize''']'''<br />
If more than one parameter is specified, the individual parameters must be separated by commas. The type and any modifiers only apply to the parameter they were specified for.<br />
<br />
====Parameter modifiers====<br />
; coerce: Automatically performs [[typecasting]] of values passed to this parameter, if the parameter is of a primitive type other than [[enum]]. Note that the built-in numeric types [[int]], [[float]] and [[byte]] are automatically typecasted to each other even without this modifier. Enum conversion to these numeric types is automatic as well. This modifier can also be applied to the return type of the function.<br />
; const<sup>3</sup>: For native functions this modifier is passed to the generated native headers. In UnrealScript, it prevents changes to the parameter within the function body, i.e. the value of the parameter must remain as the value that was passed when the function was called.<br />
; init<sup>3-x2</sup>: Effect unknown.<br />
; optional: Specifying the parameter in function calls is optional. Omitted parameters assume a default value, which is the parameter type's null value. In Unreal Engine 3 it is also possible to specify a different default value:<br />
'''optional''' [[type]] parametername '''=''' defaultvalue<br />
:The ''defaultvalue'' can be any expression you could use on the right side of a variable assignment. It will be evaluated as if it was placed between the last local variable declaration and the first executable code statement of the function. In other words, you can call functions here and use any of the function's parameters or local variables. Evaluation of the expression is skipped if that parameter was specified when calling the function.<br />
;<span ID="out_parameter"></span> out<sup>1,2</sup>: If the parameter is a variable or an array element or struct member accessed through a variable (as opposed to a literal, or function return value or an array element or struct member accessed through a function return value), any modification to the parameter inside the function is copied back into the variable originally passed to the function after the function returns.<br/>'''Note:''' This is not "call by reference", but actually [[wp:Evaluation strategy#Call by copy-restore|call by value-result]]. Instead of only copying the value when passing the parameter in, it needs to be copied again when returning from the function, so declaring a parameter as '''out''' is actually more expensive in UnrealScript prior to Unreal Engine 3. (see below)<br />
;out<sup>3</sup>: The parameter is passed [[wp:Evaluation strategy#Call by reference|by reference]] instead of being copied. Any changes to the parameter inside the function become immediately visible in the variable, struct member or (static) array element originally passed to the function. For large dynamic arrays or structs passing by reference (via '''out''' parameter) may be more efficient than passing by value.<br/>'''Note:''' Due to the way dynamic arrays are implemented, you can't pass dynamic array elements or parts of them to an '''out''' parameter. Passing an entire dynamic array via '''out''' parameter is possible, and for large arrays even recommended.<br />
; skip: Only allowed for the second parameter of a native [[operator]] declaration. The native implementation of the operator may choose to not evaluate the second operand if the operator result can be determined by evaluating only the first operand. This is used for the operators <code>&&</code> and <code><nowiki>||</nowiki></code> to skip evaluating the second boolean expression if it is not required.<br />
<br />
Parameters are evaluated at the time the function is called, before deciding if or where to execute the function body. Parameter expressions are evaluated from left to right in the context of the calling code and with the exception of parameters declared with the '''out''' modifier, UnrealScript always uses the [[wp:Evaluation strategy#Call by value|call-by-value evaluation strategy]].<br />
Note that reference type values are not objects, but object references! Passing objects to functions duplicates the object reference, not the object itself.<br />
<br />
===Locals===<br />
Functions can have also locals which are just like [[Variables|class variables]] with the exception of no modifiers. Locals can only be declared in functions and they are only available within functions.<br />
<br />
See [[Variables#Local_variables|Local variables]].<br />
<br />
==Function calls==<br />
Functions can be called from [[state code]] and other functions. In theory they can also be called from a [[replication block]], but this is impractical as replication conditions are tested relatively often and at unexpected times, while function calls (especially to non-native functions) are a much more expensive operation than checking variable values.<br />
<br />
Function calls must not be confused with executing functions. The call to and execution of a function can happen in different places if replication is involved, and some [[#Modifiers|modifiers]] (e.g. ''singular'' or no ''simulated'') may prevent the execution of a called function at runtime altogether.<br />
<br />
===Syntax===<br />
A typical function call uses the following syntax:<br />
[''objectreference'' '''.'''] ''functionname'' '''(''' [''expression'' [''',''' ''expression'' [''',''' ...]]] ''')'''<br />
The object reference in front of the function name provides a "calling context" for the function. The function will be called on the specified object. If the reference is left out, the function is called in the same context as the code calling the function. <br />
<br />
For static functions the context is actually the class of the specified object reference. To specify a context class directly, you can use the following syntax instead:<br />
''classreference'' '''. static .''' ''functionname'' '''(''' [''expression'' [''',''' ''expression'' [''',''' ...]]] ''')'''<br />
<br />
Instead of an object reference, you can also use one of the [[function call specifiers]] '''Super''' or '''Global''' to tell the compiler you want a different implementation of a function to be called.<br />
<br />
===Determining the target function===<br />
When the UnrealScript interpreter or compiler (only for ''final'' functions and when using the [[Super]] call specifier) encounters a function call, it needs to figure out, which implementation actually gets called. It does so by starting at the class of the context object reference. The compiler and [[UnrealScript bytecode]] interpreter have similar rules for this, but there are some important differences. The most important difference is that the compiler doesn't actually execute the code, so it doesn't know e.g. the content of variables at runtime. Due to this restriction, the compiler relies on variable types instead of the referenced objects to find the calling context. Similar restrictions apply to determining the [[state]] of the context object. The compiler can only assume that functions without a context object reference are called in the context of the state the calling code resides in. At runtime, the context state can change before a state function returns if any code that function executes calls the '''GotoState()''' function.<br />
<br />
If the context class and context object state have been determined, the engine first looks in that state for a function definition with the specified name. If none is found, it continues to look in the parent state for extended states or in the parent class version of the same state for inherited states. It continues upwards until no more parent states are found. In that case, non-state functions with the specified name are looked up in a similar manner, starting at the context class. If the compiler can't find any function definition this way, it issues an error. Due to the compiler check the engine should always find a function to call at runtime, but there are some special cases the compiler can't catch and in these cases the engine crash will crash with a "Failed to find function" error.<br />
<br />
===How function calls are processed===<br />
After the engine resolved, which function it should actually call, it evaluates the function call.<br />
<br />
Before looking at the function itself, all specified argument expressions are evaluated from left to right. If an expression contains a function call, its return value is determined by calling that function first. Some native functions have non-standard argument evaluation methods, especially the operators <code>&&</code> and <code>||</code>, which may choose to not evaluate their second argument at all.<br />
<br />
If the function has [[replication]] logic attached, the engine checks if it needs to replicate the call. If that's the case, the function's argument values are wrapped up along with the function name in a network packet, which is sent to the remote side. The ''local'' function call then returns immediately and if the function has a return type, it returns that type's null value. When the remote side receives the function call, it first checks whether it actually wants it (in case something strange happened) and then continues to process the function call similar to a local function call as described below.<br />
<br />
Now that the function's argument values are known and the is to be executed locally, the engine checks if and how it should actually execute the function. If the function is neither ''native'' nor ''simulated'', but the context object is an actor with <code>[[Role]] <= ROLE_SimulatedProxy</code>, then the function is not executed. Similarly, if the function is ''singular'' and the context object already executes the same or another ''singular'' function, the function is not executed. And lastly, if the function is a [[Legacy:Probe_Function|probe function]] and the probe event with the same name was disabled, then the function is not executed. In all these cases, if the function has a return type, the corresponding null value is returned.<br />
<br />
If the engine found that the function should be executed, it initializes all parameters (except '''out''' parameters in [[Unreal Engine 3]]) as local variables with an initial value equal to the corresponding argument value. Omitted optional parameters with a default value expression are initialized accordingly at this point. Any other optional parameters and local variables are initialized with their type's corresponding null value. After that is done, the code in the function body is [[code execution|executed]] until either a [[return statement]] or the end of the function body is reached. If the function has a return type, but code execution did not reach any return statement, the function's return value is the return type's corresponding null value.<br />
<br />
In [[Unreal Engine 1]] and [[Unreal Engine 2|2]], if the function has any '''out''' parameters, the final values of those local variables are copied back to the corresponding variables originally passed in as arguments.<br />
<br />
Finally, if the function was called as part of an expression, its return value is used to further evaluate that expression.<br />
<br />
===Limits for function calls===<br />
Generally there is a limit of at most 250 nested function calls at runtime. If this limit is exceeded, the engine will crash with an "Infinite script recursion" error. The value 250 may look like a severe restriction, but in practice you will rarely ever run into it unless your code contains logic errors (bad <code>CheckReplacement()</code> logic is a frequent cause) or you tried to explicitly implement a recursive algorithm with recursive function calls. In the latter case you may have to try and find a different solution using either a stack-like structure or a completely different algorithm. Generally, recursion must be viewed as an expensive operation in UnrealScript.<br />
<br />
A function call is nested in another function call if it happens as part of the containing function's [[code execution]]. Function calls as part of a parameter expression for another function call are nested in the calling environment, not in the called function. For example:<br />
<uscript><br />
function int X(int A, int B)<br />
{<br />
return Y(Z(A, B)); // calls Z(A, B), then calls Y(result of Z call), then returns result of Y call<br />
}<br />
<br />
function int Y(int C)<br />
{<br />
return C - 1;<br />
}<br />
<br />
function int Z(int D, int E)<br />
{<br />
return D + E;<br />
}<br />
</uscript><br />
Here, when calling <code>X()</code>, the maximum nesting level is 2 while executing <code>Z()</code> and <code>Y()</code>, respectively.<br />
<br />
Native functions do not increase the nesting level, but UnrealScript functions called from native functions (e.g. <code>*BeginPlay()</code> called from <code>Spawn()</code>) will resume with the nesting level at which the native function was called.<br />
<br />
{{navbox unrealscript}}</div>SeriousBarbiehttps://wiki.beyondunreal.com/Typecasting?diff=46372Typecasting2016-10-07T04:19:34Z<p>SeriousBarbie: set red link to correction destination</p>
<hr />
<div>'''Typecasting''' or '''type conversion''' is the concept of converting one [[data type]] into another, for example the turning the string "1" into the numeric value 1.<br />
<br />
Type conversions from or to primitive data types, including conversions between the struct types [[vector]] and [[rotator]] and from a reference type, are called '''primitive casts'''. Type conversions between different classes of object references are called '''dynamic casts'''. Type conversions between different [[class limiter]] types or from an object reference to a class limiter type are called '''metacasts'''.<br />
<br />
==Explicit conversion syntax==<br />
To explicitly convert a value of one type to another, use the following syntax:<br />
''typename'''''('''''value''''')'''<br />
Typename is the type to convert the value to. As you can see, this syntax looks like a function call and is a good reason why your [[functions]] should not have the same name as any built-in or user-defined types. If a function and a type of the same name are found, the function call takes precedence over the typecast.<br />
<br />
'''Note:''' The compiler will throw an error message if the typecast is redundant, for example because the target type is identical to the value's type, or will always fail, for example when casting between classes from unrelated branches of the class tree.<br />
<br />
==Implicit type conversion==<br />
Certain type conversions are done automatically.<br />
<br />
===Numeric types===<br />
The types ''int'', ''float'' and ''byte'' are automatically converted into each other when an assignment, [[operator]] or function call require it.<br />
Especially for byte values this is essential, because only the increment, decrement and combined assignment operators are defined for the type ''byte''. All other operators, such as + or - actually are ''int'' operators returning ''int'' values. The reason why you can still use them as expected is implicit type conversion:<br />
<uscript><br />
local byte A, B, C;<br />
<br />
C = A + B; // actually compiled as: C = byte(int(A) + int(B));<br />
</uscript><br />
Keep in mind that these implicit conversions have the same effects like explicit conversions. The *= and /= operators for the ''int'' type actually expect a ''float'' value as the second operand, so <code>x *= 2</code> is not exactly the same as <code>x = x * 2</code>, because the the latter performs actual integer multiplication, while the former internally performs floating point multiplication, which may produce rounding errors for very large values.<br />
<br />
===Object and class limiter types===<br />
Another kind of implicit type conversion happens when assigning an object reference of a certain class to a variable whose type is a parent class of the object's class. This is a direct consequence of [[wp:object-oriented programming|object-oriented programming]] and does not alter the referenced object itself in any way, only the ''view'' on the object through the reference. This kind of conversion is done implicitly because it is a common task and will never fail. In fact, the compiler ''refuses'' any explicit type conversion to a super class because this is how OOP works.<br />
<br />
Similarly, a [[class limiter]] type of a certain metaclass is implicitly converted to a class limiter type whose metaclass is a parent class of the first type's metaclass. Like with object typecasts, the compiler actually refuses explicit typecasts to a class limiter for a parent class.<br />
<br />
For engine implementations that support [[interfaces]], object references can be implicitly converted to all implemented interfaces when assigning the reference to a variable of the interface type. Note that this does ''not'' apply to class limiters, those strictly follow the class hierarchy without respecting the "cross connections" created by implementing interfaces!<br />
<br />
===Parameters defined with ''coerce''===<br />
[[Functions]] and [[operators]] can apply the keyword [[coerce]] to their parameter declarations to instruct the compiler to automatically perform type conversion on values passed when the function or operator is called. That is only possible if an explicit type conversion exists from the value's type to the parameter's type. See the following section for a list of possible type conversions.<br />
<br />
Usually the ''coerce'' keyword is only used for [[string]] parameters. It is widely used in the built-in string functions and operators and in the logging functions.<br />
<br />
==Primitive casts==<br />
Not all possible combinations of type conversions can actually be performed. For example, converting a floating point value to a class or a struct value to a name does not provide any meaningful result. This section lists all built-in primitive casts. These conversions will happen automatically when passing values to function parameters declared with the [[coerce]] modifier, unless the conversion requires casting to an [[enum]] type.<br />
<br />
Note that it might be a good idea to specify literals of the target type directly instead of typecasting from a different type. For example <code>rotator(vect(0.0,1.0,0.0))</code> should be written as <code>rot(0,16384,0)</code> instead.<br />
<br />
===bool to...===<br />
; ...byte, int or float : Returns 1 (or 1.0) for the value ''True'' and 0 (or 0.0) for the value ''False''.<br />
; ...string : Returns the localized version of the strings "True" or "False" for the values ''True'' and ''False'' respectively.<br />
<br />
===byte to...===<br />
; ...bool : Returns ''False'' for the byte value 0 and ''True'' for any other value.<br />
; ...[[enum]] types : Returns the enum constant corresponding to the numeric value. (0 -> first value, 1 -> second value, etc.)<br />
; ...float : Byte to float conversion is also lossless and returns a float with the same numeric value as the byte value.<br />
; ...int : Byte to int conversion is lossless and simply returns an int with the same numeric value as the byte value.<br />
; ...string : Returns the decimal string representation of the byte value.<br />
<br />
All byte conversions also apply to values of enum types, with the first enum constant corresponding to 0, second constant to 1, etc.<br />
<br />
===int to...===<br />
; ...bool : Returns ''False'' for the int value 0 and ''True'' for any other value.<br />
; ...byte : Int to byte conversion truncates the binary representation of the int value to the least significant eight bits. Negative int values are stored in [[wp:two's complement|two's complement]], so for example converting -1 to byte results in the value 255.<br />
; ...float : Int to float conversion returns the nearest possible float value. This is unproblematic for values between -16777216 (0xFF000000) and +16777216 (0x1000000), but for larger positive or smaller negative values the float data type is not precise enough, so rounding will occur.<br />
; ...[[enum]] types : Performs conversion to byte, then returns the enum constant corresponding to the resulting numeric value. (0 -> first value, 1 -> second value, etc.)<br />
; ...string : Returns the decimal string representation of the int value. Negative values are preceded by a minus sign, positive values do not have a sign in their string representation.<br />
<br />
===float to...===<br />
; ...bool : Returns ''False'' for the float value 0.0 and ''True'' for any other value.<br />
; ...byte : Float to byte conversion has the same result as float to int conversion, followed by int to byte conversion.<br />
; ...[[enum]] types : Performs conversion to byte, then returns the enum constant corresponding to the resulting numeric value. (0 -> first value, 1 -> second value, etc.)<br />
; ...int : Float to int conversion truncates any digits after the decimal point. If the value before the decimal point exceeds the range of valid int values, the binary (or hexadecimal) representation of the value is truncated to the least significant 32 bits (8 hex digits) and the resulting value is the two's complement representation of the resulting int value. An important side effect of this conversion is that the resulting int value might no longer resemble the magnitude or even sign of the original float value! NaN and infinity values are always converted to 0.<br />
; ...string : Returns the decimal string representation of the float value with a fixed number of digits after the decimal point and as many digits before the decimal point as necessary. Negative values are preceded by a minus sign. The number of digits after the decimal point is hard-coded and varies from game to game. For example, [[UT]] emits six digits, [[UT2003]] and [[UT2004]] only two. For obvious reasons this greatly limits the accuracy for small values. Scientific notation is not supported.<br />
<br />
===name to...===<br />
; ...bool : The result is ''False'' for the name value <code>'None'</code> and ''True'' for any other name.<br />
; ...string : The result is the normalized string representation of the name value.<br />
<br />
===string to...===<br />
; ...bool : The result is ''True'' for the string "true", both in the English and localized version, as well as any string that, when converted to int, stands for a number other than zero. Any other string results in the value ''False''.<br />
; ...byte : Has the same result as string to int conversion, followed by int to byte conversion.<br />
; ...int : Expects a decimal representation of the numeric value, potentially preceded by a plus or minus sign. If the resulting number exceeds the int range, the 32 least significant bits of its binary representation are used. Binary, octal or hexadecimal string representations are not supported. Leading spaces are ignored. Number recognition stops at the end of the string or the first non-digit character.<br />
; ...name : This conversion is only allowed in [[Unreal Engine 3]] and returns a name value that case-insensitively equals the input string. If the name value was not used before, its capitalization is the same as the original string's, otherwise capitalization may differ.<br />
; ...rotator : Expects a string containing at least two commas, which are used to divide the string. All three parts are converted as described for string to int conversion above. The first value becomes the rotator value's Pitch component, the second the Yaw component and the third the Roll component. If the string contains no or only one comma, only Pitch or Pitch and Yaw are filled, while the remaining components stay 0.<br />
; ...vector : Expects a string containing at least two commas, which are used to divide the string. All three parts are converted as described for string to float conversion above. The values become the X, Y and Z components of the vector. If the string contains no or only one comma, only the X or X and Y components are filled, while the remaining components stay 0.<br />
Note that strings can't be converted to object references or name values (except for Unreal Engine 3) using the typecasting syntax. To load or find an object reference via the object's string name, use the [[DynamicLoadObject() function]].<br />
<br />
===rotator to...===<br />
; ...bool : Returns ''False'' if Pitch, Yaw and Roll components are zero, otherwise ''True''.<br />
; ...string : Returns the string representations of the Pitch, Yaw and Roll components of the rotator, separated by commas. Each component value is normalized to the range of 0 to 65535. If you want the string representations of actual integer values, you need to typecast the components separately.<br />
; ...vector : Returns a [[wp:unit vector|unit vector]] (i.e. VSize() == 1.0) pointing in the direction described by the Pitch and Yaw components of the rotator value. The zero rotator <code>rot(0,0,0)</code> corresponds to the unit vector pointing in positive X-axis direction <code>vect(1.0,0.0,0.0)</code>. The result is the same as the [[Functions#out_parameter|out parameter]] X of the GetAxes() function.<br />
<br />
===vector to...===<br />
; ...bool : Returns ''False'' for the zero vector, otherwise ''True''.<br />
; ...string : Returns the string representations of the X, Y and Z components, separated by commas. Each component value is converted as described for the float to string conversion above, so small values may suffer from rounding errors.<br />
; ...rotator : Returns a rotator whose Pitch and Yaw components represent the same orientation as the vector. The Roll component is always zero. Since the zero vector does not have any orientation, it is defined to result in the zero rotator <code>rot(0,0,0)</code>.<br />
<br />
===Object to...===<br />
; ...bool : Returns ''False'' for the value ''None'' and ''True'' for any object reference.<br />
; ...string : Returns the string representation of the object. In Unreal Engine 3 only the string representation of the object's name is returned. Previous engine generations also include the object's package and group(s), separated by dots.<br />
These conversions also apply to class limiter type values.<br />
<br />
==Reference type conversions==<br />
Unlike primitive casts, type conversions between different reference types do not modify the reference in any way. They only act as a kind of "gate" for accessing objects so you don't accidently access variables or call functions of objects that don't have those variables or functions.<br />
<br />
There are two types of reference typecasts, dynamic casts and metacasts. Dynamic casts are used to convert to a different type of object, and metacasts are used to convert to a different type of class. Both have in common that they don't actually change the reference being typecasted. That means, after a successful dynamic or metacast, the result is still a reference to the same object. However, if the typecast was not successful, the result is the null reference ''None''. This means, whenever you can't be 100% sure the typecast was successful, you need to perform an additional check on the result to make sure you're not accidently [[accessing None]].<br />
<br />
===Dynamic casts===<br />
A dynamic cast typecasts an object reference of a certain class, for example Actor, to a subclass, for example Inventory.<br />
Attempting to typecast to a class that is not a subclass of the original object reference type will be refused by the compiler, either for being redundant (i.e. casting to te same class or a parent class) or because the conversion would always fail. Examples of conversions that will always fail include Pawn to Inventory and Weapon to Ammo, or more generally all conversions between unrelated branches of the class tree.<br />
<br />
====Examples====<br />
Controllers have a reference to their currently controlled Pawn, but it's of type "Pawn". Now neither UT200x nor UT3 actually use pawns of type Pawn directly, instead they use the class xPawn and UTPawn by default, which are (indirect) subclasses of Pawn. <br />
<uscript><br />
local Controller C;<br />
<br />
// getting Pawn's health:<br />
log(C.Pawn.Health); // yup, no typecasting at all - Health is defined in Pawn<br />
<br />
// is the Pawn currently invisible?<br />
log(xPawn(C.Pawn).bInvis);<br />
</uscript><br />
Vehicles are Pawn subclasses as well:<br />
<uscript><br />
local Controller C;<br />
<br />
// currently driving a vehicle?<br />
log(Vehicle(C.Pawn) != None);<br />
<br />
// sitting in a turret seat?<br />
log(ONSWeaponPawn(C.Pawn) != None);<br />
<br />
// accessing the vehicle driver:<br />
log(Vehicle(C.Pawn).Driver);<br />
<br />
// accessing vehicle health and driver health:<br />
log(C.Pawn.Health @ Vehicle(C.Pawn).Driver.Health);<br />
<br />
// accessing an Onslaught vehicle's active driver weapon (might change, e.g. for Leviathan):<br />
log(ONSVehicle(C.Pawn).Weapons[ONSVehicle(C.Pawn).ActiveWeapon]);<br />
<br />
// Ready for some serious typecasting action?<br />
// The Hellbender side turret stores the last fired sky mine projectile as combo target for bots.<br />
// Let's find its location, but with all the usual checks to prevent Accessed Nones:<br />
if (ONSWeaponPawn(C.Pawn) != None && ONSPRVSideGun(ONSWeaponPawn(C.Pawn).Gun) != None && ONSPRVSideGun(ONSWeaponPawn(C.Pawn).Gun).ComboTarget != None)<br />
log(ONSPRVSideGun(ONSWeaponPawn(C.Pawn).Gun).ComboTarget.Location);<br />
</uscript><br />
'''Note:''' Usually you would avoid complex typecasting expressions and instead store part in variables. But if you only access things once, you might actually do it like in the last example above.<br />
<br />
===Metacasts===<br />
If the result of a type conversion is a [[class limiter]] type, the conversion is also called metacast. Metacasts are not limited to class references, but can also be used to convert from the most-generic type Object. Class references are special object references after all. Like for dynamic casts, metacasts between different class limiter types will only be accepted by the compiler if the target limiter metaclass is a subclass of the casted class limiter's metaclass. Typecasting to the same metaclass or one of its parent classes is refused for being redundant and typecasting to a metaclass in an unrelated branch of the class tree is refused because it will always fail.<br />
<br />
====Examples====<br />
The most common use for metacasts is when loading classes with the [[DynamicLoadObject() function]]:<br />
<uscript><br />
local class<Actor> ActorClass;<br />
<br />
ActorClass = class<Actor>(DynamicLoadObject(ActorClassName, class'Class'));<br />
Spawn(ActorClass);<br />
</uscript><br />
The above example only works because of the metacast. DynamicLoadObject() only returns a reference of type Object, so a typecast is definitely required. A simple dynamic cast to type Class (which would actually be a metacast to <code>class<Object></code>)will not work here, because the Spawn() function requires an Actor class as its parameter.<br />
<br />
Just for fun - weapon class roundtrip:<br />
<uscript><br />
log(class<WeaponDamageType>(class<InstantFire>(class'AssaultRifle'.default.FireModeClass[0]).default.DamageType).default.WeaponClass); // logs XWeapons.AssaultRifle<br />
</uscript><br />
What happened there? First we access the FireModeClass[0] of class [[UE2:AssaultRifle (UT2004)|AssaultRifle]], which returns class [[UE2:AssaultFire (UT2004)|AssaultFire]]. That's an [[UE2:InstantFire (UT2004)|InstantFire]] subclass and its DamageType property returns class [[UE2:DamTypeAssaultBullet (UT2004)|DamTypeAssaultBullet]]. That, in turn, is a [[UE2:WeaponDamageType (UT2004)|WeaponDamageType]] with its WeaponClass set to class AssaultRifle. Note that all of these are classes, not instances, so we always need to access default values via "<code>.default.</code>".<br />
<br />
==Other conversions==<br />
Some type conversions are not allowed by the compiler. For example typecasting a string to a reference type will not work. If you need to perform such conversions, you will have to go a different route.<br />
<br />
===string to name===<br />
The string to name typecast is not allowed before [[Unreal Engine 3]]. Instead you have to rely on the SetPropertyText() function and a name-type variable declared at the class scope, optionally encapsulating the conversion in a function:<br />
<uscript><br />
var name NameConversionHack;<br />
<br />
function name StringToName(string str)<br />
{<br />
SetPropertyText("NameConversionHack", str);<br />
return NameConversionHack;<br />
}<br />
</uscript><br />
So what's happening here is that you let the engine parse your input string and assign it to a variable with the name you specified. The usual conventions for name values apply, so capitalization might get lost if the name was used before already.<br />
<br />
===string to object reference===<br />
To convert a string to an object or class reference, you can use the [[DynamicLoadObject() function]]. This will attempt to load the object, if it does not already exist. Such a load operation may require considerable amount of time if the engine needs to load the containing package first. Remember that UnrealScript is executed between rendering frames, so long load operations will cause the game to stop until loading either finished successfully or failed. Note that the DynamicLoadObject() function may emit a log warning if loading failed. See the article on the [[DynamicLoadObject() function]] for more details.<br />
<br />
As an alternative for already loaded objects you can use the FindObject() function in Unreal Engine 2 and later. Its usage is similar to that of DynamicLoadObject(), but it will never tryto load objects from disk if they do not already exist.<br />
<br />
===string to struct===<br />
While there is not direct support for typecasting strings to a struct value or vice versa, you might want to try using the SetPropertyText() and GetPropertyText() functions on class variables of the desired struct type. The string to struct conversion would be similar to the [[#string to name|string to name]] conversion mentioned above. The other way, struct to string, works as follows:<br />
<uscript><br />
var YourStructType StructVariable;<br />
<br />
function string YourStructToString(YourStructType val)<br />
{<br />
StructVariable = val; // GetPropertyText() only operates on class variables!<br />
return GetPropertyText("StructVariable");<br />
}<br />
</uscript><br />
You can use this example to find out the required string format for the string to struct conversion.<br />
<br />
{{navbox unrealscript}}</div>SeriousBarbiehttps://wiki.beyondunreal.com/Functions?diff=46371Functions2016-10-07T04:16:53Z<p>SeriousBarbie: added anchor</p>
<hr />
<div>A '''function''' in [[UnrealScript]] is a [[wp:subroutine|subroutine]] associated with a specific [[class]]. Functions can define zero or up to sixteen [[#Parameters|parameters]] and optionally a return type. Various [[#Modifiers|modifiers]] can be used in the declaration to change the way the function can be accessed or how it behaves when called.<br />
<br />
[[Operators]] and [[delegates]] are special kinds of functions. Operators have either exactly one (prefix/postfix operators) or two (infix operators) parameters and can use an operator symbol instead of a function name. Delegates are variable-like placeholders you can assign functions to. Calls to a delegate actually call the function assigned to it.<br />
<br />
==Function declarations==<br />
===Syntax===<br />
A regular function declaration looks like this:<br />
''[[#Modifiers|[modifiers]]]'' '''function''' ''[[types|[returntype]]]'' functionname '''(''' ''[[#Parameters|[parameter declarations]]]'' ''')''' ''body_or_semicolon''<br />
If the function does not return any value, the return type can be omitted. In this case [[return statement]]s in the function body may not specify any value. Otherwise, if a return value was specified, any return statement must specify an expression that evaluates to that type. Starting with [[Unreal Engine 2]] the compiler will emit a warning if a return type was specified, but the function body does not contain any return statement.<br />
Alternatively, the keyword '''event''' can be used instead of '''function''' without any difference at the UnrealScript level. The '''event''' keyword will only become relevant when writing [[native code]].<br />
<br />
'''Note:''' The compiler is not very strict about the order of modifiers and the keywords '''function''' and '''event'''. Especially in the UT3 source code you will sometimes see modifiers between the keyword '''function''' and the return type or function name. This can be very confusing to anyone reading your code, so please always make '''function''' or '''event''' the last keyword before the return type or function name.<br />
<br />
===Modifiers===<br />
Before the actual function declaration you are allowed to specify one or more function modifiers. These change the way the function works in certain situations.<br />
{{Infobox EngineVersion|modifier}}<br />
<br />
====Access modifiers====<br />
; Private<sup>2,3</sup>: The function is only accessible within the same class. Not even subclasses can "see" it, which means the usual rules for overriding functions don't apply - subclasses may change the return type and the number and type of parameters. Since they don't see the parent class function, they cannot call it via the [[Super]] keyword.<br />
; Protected<sup>2,3</sup>: Restricts access to this function to the current class and its subclasses. Subclasses may override the function unless it is also declared as '''final'''.<br />
; Public<sup>2,3</sup>: The default access rule. If neither '''private''' nor '''protected''' is specified, this is one is implied. Public functions can be called from non-related classes and may be overridden in subclasses, unless the function is also declared as '''final'''.<br />
; Static: Static functions are not tied to specific objects, but to a class. The object literal <code>Self</code> is not allowed within static functions and instance functions (i.e. functions not declared with the '''static''' modifier) can only be called through object references, this includes iterator functions in [[ForEach loop]]s. Because static functions are not executed in the context of any object instance, they can also not be subject to [[replication]].<br />
; Final: As the name suggests, function declarations with this modifier are "final" and can't be overridden in subclasses.<br />
<br />
====Call modifiers====<br />
; Exec: Marks the function as potential console command. Note that exec functions are only really called via console commands for certain objects, such as the local PlayerController, that player's HUD, Pawn or selected Weapon and a few other places. The possible places for exec functions may vary from game to game, so have a look at the [[UnrealScript source code]] of your game to find out where you can put exec functions that actually work.<br/>When overriding functions, you must also declare the new function with the '''exec''' modifier if and only if the overridden function was declared with it. This means you cannot turn a regular function into a console command!<br />
; K2Call<sup>3-x3</sup> : Allows the function to be referenced and called via [[Kismet 2]]{{confirm}}.<br />
; K2Override<sup>3-x3</sup> : Related to [[Kismet 2]]{{confirm}}. Effect unknown.<br />
; K2Pure<sup>3-x3</sup> : Related to [[Kismet 2]]{{confirm}}. Effect unknown.<br />
; Simulated: Marks the function as valid for execution on clients if the actor containing it was replicated to that client and the local [[role]] of that client is either ROLE_SimulatedProxy or ROLE_DumbProxy.<br/>'''Note:''' The modifier '''simulated''' does not imply any kind of replication or even broadcast! Also, this modifier is not inherited when overriding functions - every super function call evaluates that super function's '''simulated''' modifier separately, potentially breaking the chain of super calls on clients!<br />
; Singular: Restricts recursive function calls by only ever allowing a single singular function to execute per object instance. If a singular function is called, the engine first checks if the object instance the function was called on already executes a singular function. If it does, the new function call is ignored.<br />
<br />
====Network modifiers====<br />
These modifiers affect function [[replication]] in [[Unreal Engine 3]]. Earlier engine generations use the [[replication block]] to define these.<br />
; Client<sup>3</sup>: Specifies that this function should be replicated to the client owning the actor if it is called on the server. This modifier automatically makes the function '''simulated''' as well.<br />
; DemoRecording<sup>3-x1</sup>: Specifies that this function should be replicated to the demorecording driver (applicable to server-side demo recording only). It will only be executed during demo playback. This modifier automatically makes the function '''simulated''' as well, which makes sense since demo playback essentially is a client environment. Note that '''Client''' function calls are also replicated to the demorecording driver, whereas '''DemoRecording''' ones are replicated only to the driver, not to the real clients.<br />
; Reliable<sup>3</sup>: Replicated functions will be replicated reliably when marked with this modifier.<br />
; Server<sup>3</sup>: Specifies that this function should be replicated to the server if it was called on a replicated actor that is owned by the local client.<br />
; Unreliable<sup>3</sup>: Replicated functions will be replicated unreliably when marked with this modifier, i.e. they may be dropped due to packet loss or bandwidth saturation.<br />
<br />
====Implementation modifiers====<br />
; Const<sup>3</sup>: This modifier is actually placed after the closing parenthesis of the parameter list. It will be passed to the generated native header file, but has no effect in UnrealScript.<br />
; DLLImport<sup>3-x2</sup>: Indicates that the function should be linked to the specified [[wp:DLL|DLL]] in [[DLLBind]].<br />
; Event: As mentioned in the [[#Syntax|Syntax]] section above, the keyword '''event''' may replace the keyword '''function''' without any effect on the UnrealScript level. However, when exporting native header files from script code, '''event''' functions will have calling stubs generated so the UnrealScript function can be called more easily from C++ code. These generated C++ methods have the name <code>event''NameOfUnrealScriptFunction''</code> and their parameters and possible return type reflects the UnrealScript function declaration.<br />
; Intrinsic<sup>1,2</sup>: See '''native'''.<br />
; Intrinsic(''number'')<sup>1,2</sup>: See '''native(''number'')'''.<br />
; Iterator: Native functions with the '''iterator''' modifier can only be used as the iterator function of a [[ForEach loop]]. This modifier may not be used for non-native functions.<br />
; Latent: Native functions with the '''latent''' modifier may only be called directly from [[state code]] (but not within any [[ForEach loop]]) and usually pause state code execution at least until the next tick, possibly even longer. This modifier may not be used for non-native functions.<br />
; Native: The actual implementation of this function resides in native code in a C++ function with the name <code>exec''NameOfUnrealScriptFunction''</code>. Very early [[Unreal Engine 1]] versions used the keyword '''intrinsic''' instead.<br/>Similar to '''simulated''' functions, native functions can be called clientsidely on replicated actors even if the local [[role]] is ''ROLE_SimulatedProxy'' or ''ROLE_DumbProxy''.<br />
; Native(''number''): Same as the plain '''native''' modifier, but additionally the function gets its own [[UnrealScript bytecode]] token.<br/>''Even if you can write native code for your mod, you should never specify numbers for your native functions!''<br />
; NoExport<sup>3</sup>, NoExportHeader<sup>3-x2</sup>: Prevents this function from being exported to native headers.<br />
; Virtual<sup>3</sup>: This modifier is just passed through to exported native headers and has no effect in UnrealScript.<br />
<br />
===Parameters===<br />
A function may have zero to sixteen parameters. If you need to pass more values to your function, consider using combining some or all of them to a [[struct]]-type parameter or passing them as a [[static array|static]] or [[dynamic array]].<br />
<br />
====Syntax====<br />
Parameter declarations have the following syntax:<br />
''[parameter modifiers]'' [[type]] parametername<br />
As with other [[variable declaration]]s, the parameter name may optionally followed by a number in square brackets to declare the parameter as [[static array]]:<br />
''[parameter modifiers]'' [[type]] parametername'''['''arraysize''']'''<br />
If more than one parameter is specified, the individual parameters must be separated by commas. The type and any modifiers only apply to the parameter they were specified for.<br />
<br />
====Parameter modifiers====<br />
; coerce: Automatically performs [[typecasting]] of values passed to this parameter, if the parameter is of a primitive type other than [[enum]]. Note that the built-in numeric types [[int]], [[float]] and [[byte]] are automatically typecasted to each other even without this modifier. Enum conversion to these numeric types is automatic as well. This modifier can also be applied to the return type of the function.<br />
; const<sup>3</sup>: For native functions this modifier is passed to the generated native headers. In UnrealScript, it prevents changes to the parameter within the function body, i.e. the value of the parameter must remain as the value that was passed when the function was called.<br />
; init<sup>3-x2</sup>: Effect unknown.<br />
; optional: Specifying the parameter in function calls is optional. Omitted parameters assume a default value, which is the parameter type's null value. In Unreal Engine 3 it is also possible to specify a different default value:<br />
'''optional''' [[type]] parametername '''=''' defaultvalue<br />
:The ''defaultvalue'' can be any expression you could use on the right side of a variable assignment. It will be evaluated as if it was placed between the last local variable declaration and the first executable code statement of the function. In other words, you can call functions here and use any of the function's parameters or local variables. Evaluation of the expression is skipped if that parameter was specified when calling the function.<br />
; out<sup>1,2</sup>: If the parameter is a variable or an array element or struct member accessed through a variable (as opposed to a literal, or function return value or an array element or struct member accessed through a function return value), any modification to the parameter inside the function is copied back into the variable originally passed to the function after the function returns.<br/>'''Note:''' This is not "call by reference", but actually [[wp:Evaluation strategy#Call by copy-restore|call by value-result]]. Instead of only copying the value when passing the parameter in, it needs to be copied again when returning from the function, so declaring a parameter as '''out''' is actually more expensive in UnrealScript prior to Unreal Engine 3. (see below)<br />
;<span ID="out_parameter"></span>out<sup>3</sup>: The parameter is passed [[wp:Evaluation strategy#Call by reference|by reference]] instead of being copied. Any changes to the parameter inside the function become immediately visible in the variable, struct member or (static) array element originally passed to the function. For large dynamic arrays or structs passing by reference (via '''out''' parameter) may be more efficient than passing by value.<br/>'''Note:''' Due to the way dynamic arrays are implemented, you can't pass dynamic array elements or parts of them to an '''out''' parameter. Passing an entire dynamic array via '''out''' parameter is possible, and for large arrays even recommended.<br />
; skip: Only allowed for the second parameter of a native [[operator]] declaration. The native implementation of the operator may choose to not evaluate the second operand if the operator result can be determined by evaluating only the first operand. This is used for the operators <code>&&</code> and <code><nowiki>||</nowiki></code> to skip evaluating the second boolean expression if it is not required.<br />
<br />
Parameters are evaluated at the time the function is called, before deciding if or where to execute the function body. Parameter expressions are evaluated from left to right in the context of the calling code and with the exception of parameters declared with the '''out''' modifier, UnrealScript always uses the [[wp:Evaluation strategy#Call by value|call-by-value evaluation strategy]].<br />
Note that reference type values are not objects, but object references! Passing objects to functions duplicates the object reference, not the object itself.<br />
<br />
===Locals===<br />
Functions can have also locals which are just like [[Variables|class variables]] with the exception of no modifiers. Locals can only be declared in functions and they are only available within functions.<br />
<br />
See [[Variables#Local_variables|Local variables]].<br />
<br />
==Function calls==<br />
Functions can be called from [[state code]] and other functions. In theory they can also be called from a [[replication block]], but this is impractical as replication conditions are tested relatively often and at unexpected times, while function calls (especially to non-native functions) are a much more expensive operation than checking variable values.<br />
<br />
Function calls must not be confused with executing functions. The call to and execution of a function can happen in different places if replication is involved, and some [[#Modifiers|modifiers]] (e.g. ''singular'' or no ''simulated'') may prevent the execution of a called function at runtime altogether.<br />
<br />
===Syntax===<br />
A typical function call uses the following syntax:<br />
[''objectreference'' '''.'''] ''functionname'' '''(''' [''expression'' [''',''' ''expression'' [''',''' ...]]] ''')'''<br />
The object reference in front of the function name provides a "calling context" for the function. The function will be called on the specified object. If the reference is left out, the function is called in the same context as the code calling the function. <br />
<br />
For static functions the context is actually the class of the specified object reference. To specify a context class directly, you can use the following syntax instead:<br />
''classreference'' '''. static .''' ''functionname'' '''(''' [''expression'' [''',''' ''expression'' [''',''' ...]]] ''')'''<br />
<br />
Instead of an object reference, you can also use one of the [[function call specifiers]] '''Super''' or '''Global''' to tell the compiler you want a different implementation of a function to be called.<br />
<br />
===Determining the target function===<br />
When the UnrealScript interpreter or compiler (only for ''final'' functions and when using the [[Super]] call specifier) encounters a function call, it needs to figure out, which implementation actually gets called. It does so by starting at the class of the context object reference. The compiler and [[UnrealScript bytecode]] interpreter have similar rules for this, but there are some important differences. The most important difference is that the compiler doesn't actually execute the code, so it doesn't know e.g. the content of variables at runtime. Due to this restriction, the compiler relies on variable types instead of the referenced objects to find the calling context. Similar restrictions apply to determining the [[state]] of the context object. The compiler can only assume that functions without a context object reference are called in the context of the state the calling code resides in. At runtime, the context state can change before a state function returns if any code that function executes calls the '''GotoState()''' function.<br />
<br />
If the context class and context object state have been determined, the engine first looks in that state for a function definition with the specified name. If none is found, it continues to look in the parent state for extended states or in the parent class version of the same state for inherited states. It continues upwards until no more parent states are found. In that case, non-state functions with the specified name are looked up in a similar manner, starting at the context class. If the compiler can't find any function definition this way, it issues an error. Due to the compiler check the engine should always find a function to call at runtime, but there are some special cases the compiler can't catch and in these cases the engine crash will crash with a "Failed to find function" error.<br />
<br />
===How function calls are processed===<br />
After the engine resolved, which function it should actually call, it evaluates the function call.<br />
<br />
Before looking at the function itself, all specified argument expressions are evaluated from left to right. If an expression contains a function call, its return value is determined by calling that function first. Some native functions have non-standard argument evaluation methods, especially the operators <code>&&</code> and <code>||</code>, which may choose to not evaluate their second argument at all.<br />
<br />
If the function has [[replication]] logic attached, the engine checks if it needs to replicate the call. If that's the case, the function's argument values are wrapped up along with the function name in a network packet, which is sent to the remote side. The ''local'' function call then returns immediately and if the function has a return type, it returns that type's null value. When the remote side receives the function call, it first checks whether it actually wants it (in case something strange happened) and then continues to process the function call similar to a local function call as described below.<br />
<br />
Now that the function's argument values are known and the is to be executed locally, the engine checks if and how it should actually execute the function. If the function is neither ''native'' nor ''simulated'', but the context object is an actor with <code>[[Role]] <= ROLE_SimulatedProxy</code>, then the function is not executed. Similarly, if the function is ''singular'' and the context object already executes the same or another ''singular'' function, the function is not executed. And lastly, if the function is a [[Legacy:Probe_Function|probe function]] and the probe event with the same name was disabled, then the function is not executed. In all these cases, if the function has a return type, the corresponding null value is returned.<br />
<br />
If the engine found that the function should be executed, it initializes all parameters (except '''out''' parameters in [[Unreal Engine 3]]) as local variables with an initial value equal to the corresponding argument value. Omitted optional parameters with a default value expression are initialized accordingly at this point. Any other optional parameters and local variables are initialized with their type's corresponding null value. After that is done, the code in the function body is [[code execution|executed]] until either a [[return statement]] or the end of the function body is reached. If the function has a return type, but code execution did not reach any return statement, the function's return value is the return type's corresponding null value.<br />
<br />
In [[Unreal Engine 1]] and [[Unreal Engine 2|2]], if the function has any '''out''' parameters, the final values of those local variables are copied back to the corresponding variables originally passed in as arguments.<br />
<br />
Finally, if the function was called as part of an expression, its return value is used to further evaluate that expression.<br />
<br />
===Limits for function calls===<br />
Generally there is a limit of at most 250 nested function calls at runtime. If this limit is exceeded, the engine will crash with an "Infinite script recursion" error. The value 250 may look like a severe restriction, but in practice you will rarely ever run into it unless your code contains logic errors (bad <code>CheckReplacement()</code> logic is a frequent cause) or you tried to explicitly implement a recursive algorithm with recursive function calls. In the latter case you may have to try and find a different solution using either a stack-like structure or a completely different algorithm. Generally, recursion must be viewed as an expensive operation in UnrealScript.<br />
<br />
A function call is nested in another function call if it happens as part of the containing function's [[code execution]]. Function calls as part of a parameter expression for another function call are nested in the calling environment, not in the called function. For example:<br />
<uscript><br />
function int X(int A, int B)<br />
{<br />
return Y(Z(A, B)); // calls Z(A, B), then calls Y(result of Z call), then returns result of Y call<br />
}<br />
<br />
function int Y(int C)<br />
{<br />
return C - 1;<br />
}<br />
<br />
function int Z(int D, int E)<br />
{<br />
return D + E;<br />
}<br />
</uscript><br />
Here, when calling <code>X()</code>, the maximum nesting level is 2 while executing <code>Z()</code> and <code>Y()</code>, respectively.<br />
<br />
Native functions do not increase the nesting level, but UnrealScript functions called from native functions (e.g. <code>*BeginPlay()</code> called from <code>Spawn()</code>) will resume with the nesting level at which the native function was called.<br />
<br />
{{navbox unrealscript}}</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Dispatcher?diff=46370Legacy:Dispatcher2016-10-02T03:03:53Z<p>SeriousBarbie: added details/corrected number of possible events</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Triggers (UT)|Triggers (UT)]] >> Dispatcher (Package: Engine)}}<br />
<br />
''Replaced in [[Legacy:UT2003|UT2003]] by the [[Legacy:ScriptedTrigger|ScriptedTrigger]].''<br />
<br />
A dispatcher is a [[Legacy:Trigger|Trigger]] meant for taking another Trigger's [[Legacy:Event|Event]] and sending out a bunch of new events. The dispatcher also has the capability to time when to send out these subsequent events. It is important to point out that the location of a dispatcher is totally irrelevant to its function: it is not affected by players touching it. However, it is generally advisable to put a dispatcher near to the trigger that it will be triggered by or the actors that it will in turn trigger just for organization's sake.<br />
<br />
==Properties ==<br />
; name OutEvents[8]: List of events the dispatcher will fire, in order. Note that UnrealEd will ''not'' draw a red line to the actors whose Tag matches these events. (If you're paranoid about this, type the event name in the wrong case; UnrealEd will fix the case if there's a match). If you wish to make more than 8 events, link in a second dispatcher.<br />Gaps in the list are ignored.<br />
; float OutDelays[8]: The time to wait before firing the corresponding event. These are sequential; ie the dispatcher works like this:<br />
* wait time OutDelays[0]<br />
** fire event OutEvents[0]<br />
* wait time OutDelays[1]<br />
** fire event OutEvents[1]<br />
and so on.<br />
<br />
OutDelays can be equal to zero; thus firing several events just after each other.<br />
<br />
==Examples ==<br />
<br />
===Simple example ===<br />
<br />
An example would be if you want the dispatcher to trigger 3 events upon the event "xxx" being sent out. The 3 events you want to send out are "yyy" at the same time that "xxx" was sent out, "yyy" again 20 seconds later, and "zzz" at the same time as the second "yyy". The properties you would fill in would be this:<br />
*OutDelays<br />
**'''0''' - 0.0<br />
**'''1''' - 20.0<br />
**'''2''' - 0.0<br />
*OutEvents<br />
**'''0''' - yyy<br />
**'''1''' - yyy<br />
**'''2''' - zzz<br />
<br />
===Delaying ===<br />
<br />
There is another good trick that can be done with Dispatchers. Sometimes you need to trigger something, but then you need to make it wait before the actual Event happens. This can be done by putting a Dispatcher between the two Events in the chain.<br />
<br />
So, if you triggered the Dispatcher's tag xxx, but you needed it to wait 5 seconds before it triggered aaa, here's how it will look:<br />
*OutDelays<br />
**'''0''' - 5.0<br />
*OutEvents<br />
**'''0''' - aaa<br />
<br />
Notice that you're not doing anything except triggering an actor that will wait 5 seconds. This is a little trick that editors will sometimes use for such things as properly timing their special effects.<br />
<br />
Note that a dispatcher's OutDelays are cumulative. In other words, if you have:<br />
*OutDelay 1<br />
*OutDelay 3<br />
*OutDelay 4<br />
<br />
Then the second event is called three seconds after the first, and four seconds after the dispatcher is triggered, and the third event four seconds after the second, and eight seconds in total from the time the dispatcher is called.<br />
<br />
===Further examples ===<br />
* [[Legacy:Trigger Systems|Trigger Systems]] &ndash; systems using several trigger actors to obtain complex behaviour.<br />
* A tutorial which uses this actor: [[Legacy:Lightning Storm|Lightning Storm]]<br />
<br />
==Related Topics ==<br />
* [[Legacy:Dynamics|Dynamics]] &ndash; main page for everything about triggers<br />
* [[Legacy:Event|Event]] &ndash; overview of how triggering works<br />
* [[Legacy:Types Of Trigger|Types of Trigger]] &ndash; summary of the different kinds of trigger actor<br />
<br />
==Custom Subclasses ==<br />
<br />
===Haltable dispatcher ===<br />
<br />
'''Tarquin:''' A dispatcher which stops if triggered while dispatching. This is untested; I have no idea what happens to state label code when a function is called. see [[Legacy:Create A Subclass|Create A Subclass]] for instructions.<br />
<br />
<uscript><br />
state Dispatch<br />
{<br />
function Trigger( actor Other, pawn EventInstigator )<br />
{<br />
gotostate('');<br />
}<br />
<br />
Begin:<br />
for( i=0; i<ArrayCount(OutEvents); i++ )<br />
{<br />
if( OutEvents[i] != '' )<br />
{<br />
Sleep( OutDelays[i] );<br />
foreach AllActors( class 'Actor', Target, OutEvents[i] )<br />
Target.Trigger( Self, Instigator );<br />
}<br />
}<br />
}<br />
</uscript><br />
<br />
===Elephant Dispatcher ===<br />
<br />
Normal Disp breaks the chain of command. This remembers who Triggered it and passes this information on to the actors it triggers. See [[Legacy:Event|Event]] for details.<br />
<br />
<uscript><br />
//=============================================================================<br />
// ChainDispatcher.<br />
//=============================================================================<br />
class ChainDispatcher extends Dispatcher;<br />
// Remembers who Triggered it <br />
// and passes this information along the chain of command<br />
<br />
var actor SavedTrigger ;<br />
<br />
//<br />
// When dispatcher is triggered...<br />
//<br />
function Trigger( actor Other, pawn EventInstigator )<br />
{<br />
SavedTrigger = Other ;<br />
super.Trigger( Other, EventInstigator );<br />
}<br />
<br />
//<br />
// Dispatch events.<br />
//<br />
state Dispatch<br />
{<br />
Begin:<br />
disable('Trigger');<br />
for( i=0; i<ArrayCount(OutEvents); i++ )<br />
{<br />
if( OutEvents[i] != '' )<br />
{<br />
Sleep( OutDelays[i] );<br />
foreach AllActors( class 'Actor', Target, OutEvents[i] )<br />
Target.Trigger( SavedTrigger, Instigator );<br />
}<br />
}<br />
enable('Trigger');<br />
}<br />
</uscript><br />
<br />
----<br />
<br />
[[:Category:Legacy Class (UT)]]<br />[[:Category:Legacy Custom Class (UT)]]<br />[[:Category:Legacy To Do]] move the custom subclasses into sub pages?<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]<br />
[[Category:Legacy Custom Class (UT)|{{PAGENAME}}]]<br />
[[Category:Legacy To Do|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy_talk:TriggeredAmbientSound?diff=46368Legacy talk:TriggeredAmbientSound2016-09-24T04:54:37Z<p>SeriousBarbie: Moved discussion/custom Actor code from article page to discussion page</p>
<hr />
<div>__TOC__<br />
== TrigAmbSound ==<br />
YoMammy: (04/11/2002)<br />
<br />
Advanced -> bStatic IS the problem with the TriggeredAmbientSound. On and above that, the TAS was likely coded up rather quickly for a specific purpose and therefor leaves lots to be desired.<br />
<br />
For you sounding pleasure, however, I coded up a much better (if I do say so myself :) ) TAS. Here's a list of its new properties and one other parent property setting worth mentioning:<br />
<br />
TrigAmbSound properties:<br />
* var() sound StartSound;<br />
* var() sound AmbSound;<br />
* var() sound StopSound;<br />
* var() bool bInitiallyOn;<br />
* var() float AmbDuration;<br />
* Object/InitialState TriggerToggle or TriggerControl (latter is default)<br />
<br />
"StartSound" is where you can optionally place a one-shot sound. This will play when the TAS is triggered. Thereafter, if you specified an "AmbSound" (preferrably a looping sound), it will then play until you untrigger. Once untriggered, if you specified a "StopSound", that will play to finish things up.<br />
<br />
"bInitially" should only be set to True if you set Object/InitialState = TriggleToggle. When doing this, the "StartSound" is bypassed and the process proceeds to the "AmbSound"...if any was specified.<br />
<br />
If you set "AmbDuration" to anything other than it's default 0.0, the looping ambient sound specified in "AmbSound" will only play for the duration specified. Thereafter, things will work as normal...i.e. you'll still get the "StopSound" when untriggering.<br />
<br />
If you want the script, get it here: http://www.gentekcom.com/~diinc/UTMaps/TrigAmbSound.u<br />
<br />
In UEd, You'll find it under KeyPoint (where you'd expect). Open up the script and look at it...its ridiculously simple. Now, forgive me for being a smartass, but isn't THIS what you'd expect a TriggeredAmbientSound to do in the first place?<br />
<br />
'''CoolDude:''' Too bad, the link above seems to be broken. If anybody has a working one, please add it.<br />
<br />
===2001===<br />
<br />
'''Tarquin:''' I tried a search of my UT folder for anything with the name "TrigAmbSound" and found this in both a map called DM-2001][ by Wayne Young (AKA Slartybartfast) and wdy_mods.U (whatever that is!) The 'OnWhileTriggered' state sounds like it corresponds to 'TriggerControl' described above. I don't know if it's coincidence that it uses the same name, or if it's an earlier version. If anyone feels like contacting this guy and asking him if we can alter his script & improve it, his website is http://www.ganimede.demon.co.uk/ (and he works for nVidia).<br />
<br />
<uscript><br />
//=============================================================================<br />
// TrigAmbSound.<br />
//=============================================================================<br />
class TrigAmbSound extends Keypoint;<br />
<br />
// Re-plays a sound effect if triggered. If in state TriggerToggled,<br />
// the sound is turned off if triggered, and turned on, etc..<br />
// when triggered again. In the OnWhileTriggered state, the instigator<br />
// must stay within the trigger's radius for the sound effect to continue<br />
// playing. bInitiallyOn determines if the sound is playing from the <br />
// start, and does not apply in the OnWhileTriggered state.<br />
<br />
var() sound StartSound; // Hmmm. This doesn't do anything yet :(<br />
var() sound LoopSound;<br />
var() sound EndSound;<br />
var() bool bInitiallyOn;<br />
<br />
var bool bIsOn;<br />
<br />
function BeginPlay ()<br />
{ <br />
if (bInitiallyOn) {<br />
// if (StartSound != None) {<br />
// PlaySound (StartSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
// }<br />
if (LoopSound != None) {<br />
PlaySound (LoopSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
}<br />
bIsOn = true;<br />
}<br />
}<br />
<br />
state() TriggerToggled<br />
{<br />
function Trigger( actor Other, pawn EventInstigator )<br />
{<br />
bIsOn = !bIsOn;<br />
if (bIsOn) {<br />
// if (StartSound != None) {<br />
// PlaySound (StartSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
// }<br />
if (LoopSound != None) {<br />
PlaySound (LoopSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
}<br />
}<br />
else {<br />
if (EndSound != None) {<br />
PlaySound (EndSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
}<br />
}<br />
}<br />
}<br />
<br />
state() OnWhileTriggered<br />
{<br />
function Trigger( actor Other, pawn EventInstigator ) {<br />
bIsOn = true;<br />
// if (StartSound != None) {<br />
// PlaySound (StartSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
// }<br />
if (LoopSound != None) {<br />
PlaySound (LoopSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
}<br />
}<br />
<br />
function UnTrigger( actor Other, pawn EventInstigator ) {<br />
bIsOn = false;<br />
if (EndSound != None) {<br />
PlaySound (EndSound, , Float(SoundVolume)/128, , Float(SoundRadius)*25);<br />
}<br />
}<br />
<br />
Begin:<br />
bIsOn = false;<br />
}<br />
<br />
</uscript><br />
<br />
<br />
'''GTD-Carthage:''' Hey, has there been any update here? :o Looks like this is one unsolved problem...<br />
<br />
'''SuperApe:''' The bStatic problem? I have a thought about this, although I'm not a UT person. The bStatic problem could be solved with a special Trigger, like the VolumeTrigger is able to toggle bStatic Volumes. The custom Trigger function can simply search for TrigAmbSound actors with the matching Tag and call <u>the TrigAmbSound's</u> Trigger function.<br />
<br />
== Simple triggerable AmbientSound ==<br />
A very simple version is this:<br />
<uscript>class AmbientSoundEx expands AmbientSound;<br />
<br />
var() bool bInitiallyOn;<br />
<br />
var sound MyAmbientSound;<br />
<br />
function BeginPlay () {<br />
MyAmbientSound = AmbientSound;<br />
if ( ! bInitiallyOn) AmbientSound = None;<br />
}<br />
<br />
<br />
function Trigger( actor Other, pawn EventInstigator ) {<br />
if (AmbientSound == None)<br />
AmbientSound = MyAmbientSound;<br />
else<br />
AmbientSound = None;<br />
}<br />
<br />
DefaultProperties {<br />
bStatic=False<br />
}</uscript><br />
Each time this Actor is triggered, it switches its AmbientSound between on and off. If bInitiallyOn is set to True, it switches between off and on.<br />
--[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 00:54, 24 September 2016 (EDT)</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:TriggeredAmbientSound?diff=46367Legacy:TriggeredAmbientSound2016-09-24T04:47:13Z<p>SeriousBarbie: moved unrelated to discussion page/expanded</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor|Actor]] >> [[Legacy:Keypoint (UT)|Keypoint (UT)]] >> TriggeredAmbientSound}}<br />
Re-plays a sound effect if triggered. If in state ''TriggerToggled'', the sound is turned off if triggered, and turned on, etc.. when triggered again. In the ''OnWhileTriggered'' state, the instigator must stay within the trigger's radius for the sound effect to continue playing. ''bInitiallyOn'' determines if the sound is playing from the start, and does not apply in the OnWhileTriggered state. A variance can also be set for the timing, so that the replay time can seem more 'real'.<br />
<br />
==Properties ==<br />
=== TriggeredAmbientSound ===<br />
; bool bInitiallyOn: Play sound on start up.<br />
; sound AmbSound: Sound to play.<br />
; float rePlayTime: After this time in seconds has passed, the sound is replayed from the beginning.<br />
; float rePlayVariance: rePlayTime varies until &plusmn;rePlayVariance seconds randomly.<br />
; var() bool bPlayOnceOnly: AmbSound is played once only.<br />
<br />
=== Object > InitialState ===<br />
;TriggerToggled: Toggles AmbSound on/off.<br />
;OnWhileTriggered: Sound is played only as along as the instigator stays within the trigger's radius.<br />
;None: Actor does nothing (except if bInitiallyOn==True).<br />
<br />
== Remarks ==<br />
* If rePlayTime and rePlayVariance are both zero, no sound will be played.<br />
* One of the Great Mysteries of Unreal I and UT: how to get this to work...? It seems problem #1 is Advanced -> bStatic needs to be set to false. However, there are reports that this still doesn't fix it. Several coders have made their own versions, see [[Legacy_talk:TriggeredAmbientSound|Discussion page]]<br />
<br />
<br />
==Related Topics==<br />
* [[Legacy:Triggering Sounds|Triggering Sounds]] covers the various workarounds<br />
* [[Legacy:Embedding Code|Embedding Code]] explains how to add custom classes to a map<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Open_Source/ScoreAwardTrigger?diff=46366Open Source/ScoreAwardTrigger2016-09-22T22:55:09Z<p>SeriousBarbie: added delete reason - is any Admin still active? oO</p>
<hr />
<div>{{delete|no delete reason given initially; it is a close duplicate of [[Legacy:ScoreAwardTrigger]]}}<br />
<br />
__TOC__<br />
==About==<br />
A trigger that, when triggered, will add points to a player's score.<br />
==Properties==<br />
===Visible===<br />
;int ScorePointsAdded : Amount of points to add.<br />
;sound TriggeredSound : Sound played when triggered.<br />
<br />
==Source Code==<br />
<uscript><br />
/* Written by Jon Steadman */<br />
<br />
class ScoreAwardTrigger extends Trigger;<br />
<br />
var() int ScorePointsAdded;<br />
var() sound TriggeredSound;<br />
<br />
function PostBeginPlay()<br />
{<br />
ReplaceText( Message , "%p", string( ScorePointsAdded ) );<br />
Super.PostBeginPlay();<br />
}<br />
<br />
simulated event TriggerEvent( Name EventName, Actor Other, Pawn EventInstigator )<br />
{<br />
if( Role == ROLE_Authority && EventInstigator != None && !Level.Game.bGameEnded )<br />
{<br />
if( EventInstigator.PlayerReplicationInfo != None )<br />
Level.Game.ScoreObjective( EventInstigator.PlayerReplicationInfo,ScorePointsAdded );<br />
else if( EventInstigator.Controller != None && EventInstigator.Controller.PlayerReplicationInfo != None )<br />
Level.Game.ScoreObjective( EventInstigator.Controller.PlayerReplicationInfo, ScorePointsAdded );<br />
<br />
if( TriggeredSound != None )<br />
PlaySound( TriggeredSound );<br />
}<br />
<br />
Super.TriggerEvent( EventName, Other, EventInstigator );<br />
}<br />
<br />
defaultproperties<br />
{<br />
TriggerType=TT_PawnProximity<br />
Message="%p points awarded!"<br />
bTriggerOnceOnly=True<br />
ScorePointsAdded=2<br />
}<br />
</uscript><br />
<br />
==Related Topics==<br />
* [[Open_Source]]<br />
* [[Legacy:Triggers|Triggers]]<br />
<br />
----</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Actor_(UT)/Collision?diff=46365Legacy:Actor (UT)/Collision2016-09-12T22:03:29Z<p>SeriousBarbie: more detailed description - again I run into the trap CollisionHeight==CylinderHeight -.-</p>
<hr />
<div>These properties determine the size and behaviour of an [[Legacy:Actor_(UT)|Actor_(UT)]]'s [[Legacy:Collision Cylinder|collision cylinder]]. <br />
<br />
Note that the cylinder is always upright, no matter what the [[Legacy:Actor_(UT)|Actor_(UT)]]'s orientation.<br />
<br />
==Properties==<br />
<br />
===Boolean Flags===<br />
; bBlockActors : Blocks non-player [[Legacy:Actor_(UT)|Actor_(UT)]]s.<br />
; bBlockPlayers : Blocks player actors ([[Legacy:PlayerPawn|PlayerPawn]]s and [[Legacy:Bot (UT)|Bot (UT)]]s).<br />
; bCollideActors : Collides with other [[Legacy:Actor_(UT)|Actor_(UT)]]s.<br />
; bCollideWorld : Collides with the world geometry.<br />
; bCollideWhenPlacing : Collides when being moved; can't be set into geometry.<br />
; bProjTarget : Set this true if you want your object to be a potential target for projectiles (subject to adjusted aim in single-player mode).<br />
<br />
===Collision Cylinder===<br />
<br />
The size of the collision cylinder is given by the two properties ''CollisionHeight'' and ''CollisionRadius'': The diameter of the collision cylinder is 2 &times; CollisionRadius and its height is 2 &times; CollisionHeight.<br />
<br />
==Related topics==<br />
* [[Legacy:Actor (UT)|Actor (UT)]]<br />
* [[Legacy:DuckingZone|DuckingZone]] &ndash; A zone where ducking players actually become smaller in Unreal Tournament.<br />
* [[Legacy:Collision Cylinder|Collision Cylinder]] &ndash; Details on collision and on <tt>Touch</tt>, <tt>Untouch</tt> and other related events.<br />
* [[Legacy:OCD|OCD]] &ndash; Technical lowdown of object collision detection.<br />
* [[Legacy:Actor Overview|Actor Overview]] &ndash; More on working with Actors, adding actors to a map and setting properties.</div>SeriousBarbiehttps://wiki.beyondunreal.com/Array?diff=46364Array2016-09-09T15:16:07Z<p>SeriousBarbie: +link to Linked list</p>
<hr />
<div>'''Array''' may refer to:<br />
* [[Dynamic arrays]]<br />
* [[Static arrays]]<br />
* [[Multi-dimensional arrays]]<br />
''See also:''<br />
* [[Linked list]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:VacuumZone?diff=46362Legacy:VacuumZone2016-09-02T23:09:53Z<p>SeriousBarbie: +hint to DamageString</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Info (UT)|Info (UT)]] >> [[Legacy:ZoneInfo (UT)|ZoneInfo (UT)]] >> VacuumZone (Package: Botpack)}}<br />
<br />
A vacuum zone kills any player that enters it. It's just another messy way to die. This class behaves in a very similar manner to the [[Legacy:PressureZone|PressureZone]] class, except that it doesn't need to be triggered.<br />
<br />
Hint: because the "%k" is missing in its default DamageString <code>%o was depressurized</code>, the death message is not shown. See [[Legacy:Message_Placeholder#ZoneInfo|Message Placeholder]] for details.<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:ZoneInfo_(UT)?diff=46361Legacy:ZoneInfo (UT)2016-09-02T21:04:24Z<p>SeriousBarbie: added link to Legacy:Message_Placeholder#ZoneInfo</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor|Actor]] >> [[Legacy:Info (UT)|Info (UT)]] >> ZoneInfo (Package: Engine)}}<br />
<br />
This actor sets properties for the [[Legacy:Zone|zone]] its placed in, such as ambient lighting, gravity, location string etc. A number of subclasses hold presets for different types of environment, such as [[Legacy:WaterZone|WaterZone]] and [[Legacy:LavaZone|LavaZone]].<br />
<br />
See [[Legacy:Zoning|zoning]] for more on working with zones, and [[Legacy:Actor Overview|Actor Overview]] for more on actors in general.<br />
<br />
This may seem obvious, but after adding a new ZoneInfo actor, the map geometry must be rebuilt for that actor's properties (e.g. ZoneLight) to take effect.<br />
<br />
See [[Legacy:Zonelight|Zonelight]] for more on this.<br />
<br />
See [[Legacy:ZoneInfo|ZoneInfo]] for the UT2003 version of this class.<br />
<br />
==Examples ==<br />
<br />
This is a small map created by EntropicLqd with examples of all types of zone. Read the enclosed text file for more details.<br />
<!-- link invalid at 14 Jan 2015:<br />
http://wiki.beyondunreal.com/dl.php/wiki/examplemaps/dm-zoneexample.zip<br />
--><br />
https://ut.rushbase.net/beyondunreal/wiki/examplemaps/dm-zoneexample.zip<br />
<br />
==Properties==<br />
<br />
Changing these properties for the [[Legacy:LevelInfo|LevelInfo]] affects all zones without a ZoneInfo actor.<br />
<br />
===ZoneInfo Group===<br />
<br />
====Zone Properties====<br />
; name ZoneTag : Used to link [[Legacy:ZoneTrigger|ZoneTrigger]] objects to the zone. The Event property of the [[Legacy:ZoneTrigger|ZoneTrigger]] must match the <code>ZoneTag</code> value for the zone to trigger (used to trigger [[Legacy:PressureZone|PressureZone]]s).<br />
; vector ZoneGravity [replicated to clients] : The gravity of a zone. It can be edited to pull objects in any direction (or not). Set it at a negative value to reverse the relevant gravity vector. Decrease the values to create a low-grav zone. Remember, a negative Z component means that the gravity pulls the player downwards. The default gravity for a zone is (0, 0, -950).<br />
; vector ZoneVelocity [replicated to clients] : The velocity of objects that enter the zone. It influences the velocity vector of players (making it increase/decrease) when they enter the zone. Can be used in combination with gravity zones for more realistic gravity effects.<br />
; float ZoneGroundFriction : The friction a player undergoes when walking/running. Decrease the value to create a slippery surface.<br />
; float ZoneFluidFriction : The friction of the fluid in the zone. Only works when there is fluid in any form (i.e. water, slime, tar etc., so <code>bWaterZone = True</code>)<br />
; float ZoneTerminalVelocity : This is the fastest speed an object can travel within the zone. Actors attempting to travel faster than this have their speed capped at this value. This setting can be one reason why [[Legacy:Kicker|Kicker]]s don't always behave quite as expected.<br />
; name ZonePlayerEvent : An event that will be posted to all actors whenever an actor that has bIsPlayer = true set enters or exits the zone. As far as I can tell this event is only posted when the number of "players" within the zone increases to 1 (on entry to the zone), and decreases to 0 (on exit to the zone).<br />
; int DamagePerSec : Amount of damage a player takes while in this zone.<br />
; name DamageType : Set this to <tt>SpecialDamage</tt> if you want to use the <code>DamageString</code>.<br />
; localized string DamageString : see [[Legacy:Message_Placeholder#ZoneInfo]].<br />
; int MaxCarcasses : The maximum number of dead bodies allowed within the zone. Set this is a low number in open areas to improve rendering speeds. Set it to 0 in lava zones and other instant death zones to preserve memory.<br />
; sound EntrySound : The sound to play when an actor enters the zone, e.g. Sound'UnrealShare.Generic.DSplash' for [[Legacy:WaterZone|WaterZone]]s.<br />
; sound ExitSound : The sound to play when an actor leaves the zone, e.g. Sound'UnrealShare.Generic.LavaEx' for [[Legacy:LavaZone|LavaZone]]s.<br />
; class<[[Legacy:Actor|Actor]]> EntryActor : The "graphical effect" to display when an Actor enters the zone. Spawned at the point the actor enters, e.g. class'UnrealShare.WaterImpact' for [[Legacy:WaterZone|WaterZone]]s.<br />
; class<[[Legacy:Actor|Actor]]> ExitActor : The "graphical effect" to display when an actor leaves the zone. Spawned at the point the actor leaves, e.g. class'UnrealShare.FlameExplosion' for [[Legacy:LavaZone|LavaZone]]s.<br />
<br />
====Zone Flags====<br />
; bool bWaterZone : Zone is slightly humid (indeed somewhat damp) when set to true. Desert dry if false.<br />
; const bool bFogZone : Allowes fog in this zone.<br />
; const bool bKillZone : The code is commented with <cite>Zone instantly kills those who enter</cite> but in fact this flag seems to do nothing.<br />
; bool bNeutralZone : Players can't take damage in this zone.<br />
; bool bGravityZone : Use ZoneGravity. Setting this to False doesn't seem to have any effect. (?)<br />
; bool bPainZone : True means that players will take damage according to the damage values in this zone. This will be set to True when <code>DamagePerSec</code> is greater than 0 and the zone is triggered.<br />
; bool bDestructive : Destroys carcasses.<br />
; bool bNoInventory : If this is true then inventory items cannot exist within the zone (e.g. when they are dropped they are destroyed).<br />
; bool bMoveProjectiles : This zone should impart velocity to projectiles and effects.<br />
; bool bBounceVelocity : This velocity zone should bounce actors that land in it. (''doesn't have any effect?'')<br />
<br />
====per-Zone mesh LOD lighting control====<br />
<br />
The number of lights applied to the actor mesh is interpolated between the following properties, as a function of the MeshPolyCount for the previous frame.<br />
; byte MinLightCount : minimum number of lights to use (when MaxLightingPolyCount is exceeded)<br />
; byte MaxLightCount : maximum number of lights to use (when MeshPolyCount drops below MinLightingPolyCount)<br />
; int MinLightingPolyCount : <br />
; int MaxLightingPolyCount : <br />
<br />
===LocationStrings Group===<br />
; localized string ZoneName : This string will appear as a player's location on team game HUDs and scoreboards. This is overridden if the player is within the radius of a [[Legacy:LocationID|LocationID]].<br />
<br />
===ZoneLight Group===<br />
; byte AmbientBrightness, AmbientHue, AmbientSaturation [all replicated to clients] : These set the color of the ambient lighting for the zone, and work just like the corresponding properties of a light. Ambient light looks pretty awful no matter how you use it though, so you may want to avoid this except for testing purposes. :)<br />
; color FogColor [replicated to clients] : <br />
; float FogDistance : <br />
; const [[Legacy:Texture (UT)|Texture (UT)]] EnvironmentMap : <br />
; float TexUPanSpeed, TexVPanSpeed [both replicated to clients] : These give the panning speed for all surfaces in the zone whose U-Pan or V-Pan [[Legacy:Surface Flags (UT)|Surface Flags (UT)]] have been set.<br />
; vector ViewFlash : Obviously only the X component of this vector has an effect for fog calculation/rendering. ''Further research neccessary.''<br />
; vector ViewFog : Sets a tint on the player's viewport while in that zone. [[Legacy:PressureZone|PressureZone]] changes this value, to do the reddening effect seen in DM-Pressure.<br />It's worth mentioning the idiosyncasies of the ViewFog property here. I think is was me (Tarquin) and Elbundee who figured it out on the JailBreak forum: the vector is treated as XYZ = RGB, with the scale going from 0 to 1.<br />
<br />
===Reverb Group===<br />
<br />
(also see [[Legacy:Reverb|Reverb]])<br />
; bool bReverbZone [replicated to clients] : Whether this zone should use the reverb settings.<br />
; bool bRaytraceReverb : <br />
; float SpeedOfSound : <br />
; byte MasterGain : <br />
; int CutoffHz : <br />
; byte Delay[6] : <br />
; byte Gain[6] : <br />
<br />
===LensFlare Group===<br />
; [[Legacy:Texture (UT)|Texture (UT)]] LensFlare[12] : <br />
; float LensFlareOffset[12] : <br />
; float LensFlareScale[12] : <br />
<br />
===Script-only===<br />
; int ZonePlayerCount : Current number of players in this zone.<br />
; int NumCarcasses : Current number of [[Legacy:Carcass|Carcass]]es in this zone. This number is increased and decreased by the carcass classes.<br />
; [[Legacy:LocationID|LocationID]] LocationID : This is a reference to the first item in the [[Legacy:Linked List|linked list]] of [[Legacy:LocationID|LocationID]]s in this zone.<br />
; [[Legacy:SkyZoneInfo|SkyZoneInfo]] SkyZone : Optional sky zone containing this zone's sky.<br />
<br />
==Methods ==<br />
<br />
===Iterator Functions ===<br />
; ZoneActors (class<[[Legacy:Actor|Actor]]> BaseClass, out [[Legacy:Actor|Actor]] Actor) : Iterates through all actors in this zone.<br />
<br />
===Other Functions ===<br />
; LinkToSkybox ( ) [simulated] : This function is called from <tt>PreBeginPlay</tt> and initialises the link to the Sky Zone for this zone. The [[Legacy:SkyZoneInfo|SkyZoneInfo]] object linked to is determined by the detail settings on the client machine (if there is more than one).<br />
<br />
; ActorEntered ([[Legacy:Actor|Actor]] Other) : This event fires whenever an actor enters the zone. It is responsible for posting any event specified by the <tt>ZonePlayerEvent</tt> property by calling the <tt>Trigger</tt> function. The function also applies any zone physics to objects with physics of <tt>PHYS_Projectile</tt> or objects of type [[Legacy:Effects (UT)|Effects (UT)]].<br />
<br />
; ActorLeaving ([[Legacy:Actor|Actor]] Other) : This event fires whenever an actor leaves the zone. It is responsible for posting any event specified by the <tt>ZonePlayerEvent</tt> property by calling the <tt>UnTrigger()</tt> function.<br />
<br />
==Known Subclasses ==<br />
<br />
Some of these merely differ from ZoneInfo by their default properties, for instance [[Legacy:WaterZone|WaterZone]]. Others, such as [[Legacy:PressureZone|PressureZone]] add new scripted behavior.<br />
* [[Legacy:CloudZone|CloudZone]]<br />
* [[Legacy:MCloudZone|MCloudZone]] (custom class; fixes CTF flag bug)<br />
* CounterZone (custom: http://darendash.home.comcast.net/CounterZone.html )<br />
* [[Legacy:DuckingZone|DuckingZone]] (DM-DuckingZone) (custom)<br />
* [[Legacy:Jailbreak/Classes|JailZone]] ([[Legacy:Jailbreak|Jailbreak]])<br />
* [[Legacy:Jailbreak/Classes|JBArenaZone]] ([[Legacy:Jailbreak|Jailbreak]])<br />
* [[Legacy:Jumpzone|Jumpzone]] (custom)<br />
* [[Legacy:KillingField|KillingField]]<br />
* [[Legacy:LavaZone|LavaZone]]<br />
* [[Legacy:LevelInfo|LevelInfo]]<br />
* [[Legacy:NitrogenZone|NitrogenZone]]<br />
* [[Legacy:PressureZone|PressureZone]]<br />
* [[Legacy:SkyZoneInfo|SkyZoneInfo]]<br />
* [[Legacy:SlimeZone|SlimeZone]]<br />
* [[Legacy:TarZone|TarZone]]<br />
* [[Legacy:TeleporterZone|TeleporterZone]]<br />
* [[Legacy:VacuumZone|VacuumZone]]<br />
* [[Legacy:WarpZoneInfo|WarpZoneInfo]]<br />
* [[Legacy:WaterZone|WaterZone]]<br />
<br />
==Related Topics ==<br />
* [[Legacy:Iterator|Iterator]] functions<br />
<br />
See [[Legacy:NoTransloc|NoTransloc]] for more details on making a zone non-translocatable.<br />
<br />
==Comments ==<br />
<br />
Might be worth mentioning that ZoneInfo has an iterator function; - ''Probably - not found an example of use yet, but then I've not looked.''<br />
<br />
A thought: we could do a "Types of Zone" or something page.<br />
<br />
'''EntropicLqd:''' Isn't that already covered within the general Zones page? It might be worth linking the example map from the general zone page as well thinking about it.<br />
<br />
'''Tarquin:''' not sure. Zones / Zoning etc is on the list of topics that need refactoring. your idea sounds good to me.<br />
<br />
'''Wormbo:''' Is there any reason, why we should give '''event''' methods a special heading in class descriptions like this one?<br />
<br />
'''EntropicLqd:''' I did it to be consistent with the rest of the stuff I'd already done. Although the distinction between events and functions in UnrealScript is somewhat logical in nature it is a pleasant distinction.<br />
<br />
'''Mychaeel:''' Besides, events are customarily used for engine notifications (as opposed to "called from somewhere else in the available UnrealScript code"). I think making that distinction has its benefits.<br />
<br />
'''Evilmrfrank:''' What exactly is the reverb option for. I noticed that the zone info actor in frigate used this option. Just wondering if it offers any better quality sound or picture or what? Also one more thing, why are many of the lights in official maps invisible in the editor? IS there any purpose other then just keeping them out of the way or are they invisible for a good reason?</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Message_Placeholder?diff=46360Legacy:Message Placeholder2016-09-02T21:02:14Z<p>SeriousBarbie: Undo revision 46359 by SeriousBarbie (talk)</p>
<hr />
<div>'''Message placeholders''' are special escape codes that insert data from the game into strings. The most common example of these is the death messages, that say, for example:<br />
: ''The Great Zaganza got ripped into tiny pieces by Hortense.''<br />
<br />
Of course, the [[Legacy:Unreal Engine|Unreal Engine]] doesn't store that string, since it doesn't know the players will be called "The Great Zaganza" and "Hortense". It stores the string <br />
: ''%o got ripped into tiny pieces by %k''<br />
<br />
The %o and %k are placeholders, and when the string is used, they will be replaced with meaningful content: in this case, the names of players.<br />
<br />
==Death Messages in UT ==<br />
<br />
These can be used in the DeathMessage variable in the [[Legacy:Weapon (UT)|Weapon (UT)]] class and as SpecialDamageString of the [[Legacy:GameInfo (UT)|GameInfo (UT)]] when using 'SpecialDamage' as damage type. <br />
<br />
{|<br />
<br />
|-<br />
|'''Placeholder'''<br />
|'''Description''' <br />
|-<br />
| style="text-align: center" |<code>%k</code><br />
|Killer's name<br />
|-<br />
| style="text-align: center" |<code>%w</code><br />
|Weapon the killer was holding while the other player died.<br />
|-<br />
| style="text-align: center" |<code>%o</code><br />
|Victim's name<br />
|}<br />
<br />
Each placeholder may only appear once.<br />
<br />
===SpecialEvent ===<br />
<br />
Custom death messages for [[Legacy:SpecialEvent|SpecialEvent]] only work in the '''KillInstigator''' [[Legacy:InitialState|InitialState]]. Set DamageType to 'SpecialDamage'.<br />
<br />
Only <code>%o</code> is parsed but <code>%k</code> must be included for it to work, it will be removed with no replacement.<br />
<br />
===ZoneInfo ===<br />
<br />
Set DamageType to 'SpecialDamage'. <code>%k</code> must be included, otherwise the death message will be blank in the game.<br />
<br />
''They DO work without'' <code>%o</code>'', but it doesn't look nice. -GeniusDex''<br />
<br />
===Zones using death messages ===<br />
* [[Legacy:ZoneInfo|ZoneInfo]]<br />
** [[Legacy:PressureZone|PressureZone]]<br />
** [[Legacy:LavaZone|LavaZone]]<br />
** [[Legacy:SlimeZone|SlimeZone]]<br />
<br />
''The noted types of ZoneInfos are only examples, as far as i know every ZoneInfo can be killing. -GeniusDex''<br />
<br />
''Please add other triggers and zones that use death messages.''<br />
<br />
===Related UT Topics ===<br />
* [[Legacy:Weapon (UT)|Weapon (UT)]]<br />
* [[Legacy:ScrollingMessageTexture|ScrollingMessageTexture]]<br />
* [[Legacy:GameInfo (UT)|GameInfo (UT)]]<br />
* [[Legacy:Taking Damage|Taking Damage]]<br />
<br />
==Placeholders in UT2003 ==<br />
<br />
In UT2003 only the placeholders %k (killer) and %o (victim) are used in death messages.<br />
<br />
However, there are several placeholders usable in TeamSay messages. They only work in team games and only with the TeamSay, not the Say command. The placeholders are not case-sensitive.<br />
<br />
{|<br />
<br />
|-<br />
|'''Placeholder'''<br />
|'''Description''' <br />
|-<br />
| style="text-align: center" |<code>%A</code><br />
|amount of adrenaline ("xx Adrenaline")<br />
|-<br />
| style="text-align: center" |<code>%H</code><br />
|amount of health ("xx Health")<br />
|-<br />
| style="text-align: center" |<code>%L</code><br />
|current location (near game objectives or "pickups with inventory items on a pickup base", i.e. usually weapons, but not health, shield or double damage)<br />
|-<br />
| style="text-align: center" |<code>%S</code><br />
|amount of shield ("xx Shield")<br />
|-<br />
| style="text-align: center" |<code>%W</code><br />
|currently selected weapon<br />
|-<br />
| style="text-align: center" |<code>%%</code><br />
|the "%" character (used e.g. as "%%w" to display "%w" instead of the weapon name)<br />
|}<br />
<br />
With the TTM 2003 mod there are also "%P" and "%G" ("pickups" and "guns") to display nearby (non-)weapon pickups. Mods can add their own variables from their [[Legacy:Mutator|Mutator]], [[Legacy:GameInfo|GameInfo]] and/or [[Legacy:Controller|Controller]] classes via the <code>ParseChatPercVar()</code> function.<br />
<br />
===Related UT2003 Topics ===<br />
* [[Legacy:Controller|Controller]]<br />
* [[Legacy:GameInfo|GameInfo]]<br />
* [[Legacy:Mutator|Mutator]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Message_Placeholder?diff=46359Legacy:Message Placeholder2016-09-02T21:00:58Z<p>SeriousBarbie: created anchor</p>
<hr />
<div>'''Message placeholders''' are special escape codes that insert data from the game into strings. The most common example of these is the death messages, that say, for example:<br />
: ''The Great Zaganza got ripped into tiny pieces by Hortense.''<br />
<br />
Of course, the [[Legacy:Unreal Engine|Unreal Engine]] doesn't store that string, since it doesn't know the players will be called "The Great Zaganza" and "Hortense". It stores the string <br />
: ''%o got ripped into tiny pieces by %k''<br />
<br />
The %o and %k are placeholders, and when the string is used, they will be replaced with meaningful content: in this case, the names of players.<br />
<br />
==Death Messages in UT ==<br />
<br />
These can be used in the DeathMessage variable in the [[Legacy:Weapon (UT)|Weapon (UT)]] class and as SpecialDamageString of the [[Legacy:GameInfo (UT)|GameInfo (UT)]] when using 'SpecialDamage' as damage type. <br />
<br />
{|<br />
<br />
|-<br />
|'''Placeholder'''<br />
|'''Description''' <br />
|-<br />
| style="text-align: center" |<code>%k</code><br />
|Killer's name<br />
|-<br />
| style="text-align: center" |<code>%w</code><br />
|Weapon the killer was holding while the other player died.<br />
|-<br />
| style="text-align: center" |<code>%o</code><br />
|Victim's name<br />
|}<br />
<br />
Each placeholder may only appear once.<br />
<br />
===SpecialEvent ===<br />
<br />
Custom death messages for [[Legacy:SpecialEvent|SpecialEvent]] only work in the '''KillInstigator''' [[Legacy:InitialState|InitialState]]. Set DamageType to 'SpecialDamage'.<br />
<br />
Only <code>%o</code> is parsed but <code>%k</code> must be included for it to work, it will be removed with no replacement.<br />
<br />
=== <span ID="ZoneInfo"></span>ZoneInfo ===<br />
<br />
Set DamageType to 'SpecialDamage'. <code>%k</code> must be included, otherwise the death message will be blank in the game.<br />
<br />
''They DO work without'' <code>%o</code>'', but it doesn't look nice. -GeniusDex''<br />
<br />
===Zones using death messages ===<br />
* [[Legacy:ZoneInfo|ZoneInfo]]<br />
** [[Legacy:PressureZone|PressureZone]]<br />
** [[Legacy:LavaZone|LavaZone]]<br />
** [[Legacy:SlimeZone|SlimeZone]]<br />
<br />
''The noted types of ZoneInfos are only examples, as far as i know every ZoneInfo can be killing. -GeniusDex''<br />
<br />
''Please add other triggers and zones that use death messages.''<br />
<br />
===Related UT Topics ===<br />
* [[Legacy:Weapon (UT)|Weapon (UT)]]<br />
* [[Legacy:ScrollingMessageTexture|ScrollingMessageTexture]]<br />
* [[Legacy:GameInfo (UT)|GameInfo (UT)]]<br />
* [[Legacy:Taking Damage|Taking Damage]]<br />
<br />
==Placeholders in UT2003 ==<br />
<br />
In UT2003 only the placeholders %k (killer) and %o (victim) are used in death messages.<br />
<br />
However, there are several placeholders usable in TeamSay messages. They only work in team games and only with the TeamSay, not the Say command. The placeholders are not case-sensitive.<br />
<br />
{|<br />
<br />
|-<br />
|'''Placeholder'''<br />
|'''Description''' <br />
|-<br />
| style="text-align: center" |<code>%A</code><br />
|amount of adrenaline ("xx Adrenaline")<br />
|-<br />
| style="text-align: center" |<code>%H</code><br />
|amount of health ("xx Health")<br />
|-<br />
| style="text-align: center" |<code>%L</code><br />
|current location (near game objectives or "pickups with inventory items on a pickup base", i.e. usually weapons, but not health, shield or double damage)<br />
|-<br />
| style="text-align: center" |<code>%S</code><br />
|amount of shield ("xx Shield")<br />
|-<br />
| style="text-align: center" |<code>%W</code><br />
|currently selected weapon<br />
|-<br />
| style="text-align: center" |<code>%%</code><br />
|the "%" character (used e.g. as "%%w" to display "%w" instead of the weapon name)<br />
|}<br />
<br />
With the TTM 2003 mod there are also "%P" and "%G" ("pickups" and "guns") to display nearby (non-)weapon pickups. Mods can add their own variables from their [[Legacy:Mutator|Mutator]], [[Legacy:GameInfo|GameInfo]] and/or [[Legacy:Controller|Controller]] classes via the <code>ParseChatPercVar()</code> function.<br />
<br />
===Related UT2003 Topics ===<br />
* [[Legacy:Controller|Controller]]<br />
* [[Legacy:GameInfo|GameInfo]]<br />
* [[Legacy:Mutator|Mutator]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Compiler_directives?diff=46358Compiler directives2016-09-02T19:05:47Z<p>SeriousBarbie: "include" does not work with UE1 - moved to UE2 (I hope that it works there...)</p>
<hr />
<div>'''Compiler directives''' are lines in [[UnrealScript]] source files that affect compiler behavior and have no meaning at runtime. They are not really used anymore in [[Unreal Engine 3]], which comes with a powerful [[preprocessor]] instead.<br />
<br />
Directives are parsed during the compile process, not before that. This means they cannot be used in [[defaultproperties]] or [[cpptext]] sections. In fact, any directives in cpptext blocks will end up in exported header files for preprocessing by the C++ compiler.<br />
<br />
==Syntax==<br />
Compiler directives must be placed on a separate line. The syntax is as follows:<br />
'''#'''''directivename'' ''parameters''<br />
There must not be anything else before the '''#''' on that line and there shouldn't be anything after the directive name and parameters, except maybe a line comment. Directive names are case-insensitive, like any other part of UnrealScript syntax.<br />
<br />
==Unreal Engine 1/2==<br />
===call===<br />
Similar to the "exec" console command in the editor and the game. Loads a list of console commands from a text file and executes them.<br />
<br />
See [[exec commands]] for a useful selection of commands.<br />
<br />
===error===<br />
Immediately stops compiling with the message: "#Error directive encountered"<br />
<br />
Note that there is no built-in conditional compiling, so using this directive may be quite pointless without an external preprocessor tool like [[UCPP]].<br />
<br />
===exec===<br />
The most-used directive and probably the only one most UnrealScript programmers ever need to use. The '''#exec''' directive executes an editor console command in the context of the compiler.<br />
<br />
See [[exec commands]] for a useful selection of commands.<br />
<br />
==Unreal Engine 2==<br />
<br />
===include===<br />
Loads a text file and replaces the #include line with its content.<br />
<br />
There are several things to watch out for when using this directive:<br />
* Line numbers reported in errors and warnings after the #include line will reflect the source text with the included content, so they no longer match the original source line numbers.<br />
* If the included file contains a [[defaultproperties]] block, it is not included directly. Instead, its content is inserted into the class's defaultproperties block.<br />
<br />
==Unreal Engine 3==<br />
The only known directive in Unreal Engine 3 is '''#linenumber''', which is inserted by the preprocessor after an '''`include''' macro to make sure the compiler reports the line numbers the user expects.<br />
<br />
{{navbox unrealscript}}</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:T3D_File?diff=46357Legacy:T3D File2016-08-31T18:46:59Z<p>SeriousBarbie: link fix</p>
<hr />
<div>The '''T3D file format''' or '''Unreal Text File''' holds a text list of Unreal map objects. An entire map can be saved as this file format, or just a single actor or brush.<br />
<br />
Note that while brushes, their applied textures and light actors are saved, the [[Legacy:Unreal Geometry|Unreal Geometry]] itself is not saved: upon importing a T3D file the map must be built.<br />
<br />
Copying objects from UnrealEd and pasting into a text editor produces the same format.<br />
<br />
Unreal Text format <br />
<br />
Exported brushes and (other) actors. See [[Legacy:T3D File|T3D file]].<br />
* Created by:<br />
** UnrealEd's File -> Import command<br />
** UnrealEd's Brush -> Import command (see [[Legacy:Data Import And Export|Data Import and Export]] for more on both these commands).<br />
** is this created by external stuff too? <br />
<br />
===Exporting T3D ===<br />
* Export the whole map<br />
** File -> Export... (UnrealEd 1,2,3)<br />
** File -> Export -> All.. (UnrealEd 4 - UT3)<br />
* Export selected actors: File-> Export-> Selected Only ... (UnrealEd 4 only - UT3)<br />
* Export one brush: Brush -> Export ...<br />
* Copy/Paste: can copy paste any actor from any UnrealEd version to another one (Except for UnrealEd 4) or to any text editor such as notepad (Windows)<br />
<br />
===Importing T3D ===<br />
<br />
File -> Import...<br />
<br />
(note importing may take a LONG time)<br />
<br />
Overheard on #utjb... :-)<br />
<br />
<tarquin> t3d stores brushes & actors but not texturing, right?<br />
<Mychaeel> Texturing as well.<br />
(melds into the opening speech from Reservoir Dogs...)<br />
<DaveA>Stores links to textures, and texture transforms, but not the pixels themselves<br />
<br />
The T3D format is a text file which stores information about map actors. It's in fact identical to what can be copied from UnrealEd to a text editor. An exported map looks like this:<br />
<br />
<br />
<uscript><br />
Begin Map<br />
Begin Actor Class=LevelInfo Name=LevelInfo0<br />
TimeSeconds=17.008888<br />
Summary=LevelSummary'Entry.LevelSummary'<br />
DefaultGameType=Class'Botpack.UTIntro'<br />
AIProfile(0)=23784352<br />
AIProfile(1)=52<br />
AIProfile(2)=41<br />
AIProfile(3)=42<br />
AIProfile(4)=40<br />
AIProfile(5)=44<br />
AIProfile(6)=45<br />
AIProfile(7)=21846171<br />
AvgAITime=0.000000<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=LevelInfo<br />
Region=(Zone=LevelInfo'Entry.LevelInfo0',iLeaf=-1)<br />
Name=LevelInfo0<br />
End Actor<br />
Begin Actor Class=Brush Name=Brush0<br />
MainScale=(SheerAxis=SHEER_ZX)<br />
PostScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX)<br />
TempScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX)<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=Brush<br />
Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1)<br />
Location=(X=464.000000,Y=-16.000000,Z=64.000000)<br />
Begin Brush Name=Brush<br />
Begin PolyList<br />
Begin Polygon Item=OUTSIDE Texture=black1 Flags=4194304 Link=0<br />
Origin -00160.000000,+00000.000000,+00128.000000<br />
Normal +00000.000000,+00000.000000,+00001.000000<br />
TextureU +00004.000000,+00000.000000,+00000.000000<br />
TextureV +00000.000000,+00004.000000,+00000.000000<br />
Vertex -00128.000000,-00128.000000,+00128.000000<br />
Vertex +00128.000000,-00128.000000,+00128.000000<br />
Vertex +00128.000000,+00128.000000,+00128.000000<br />
Vertex -00128.000000,+00128.000000,+00128.000000<br />
End Polygon<br />
...<br />
End PolyList<br />
End Brush<br />
Brush=Model'Entry.Brush'<br />
Name=Brush0<br />
End Actor<br />
Begin Actor Class=PlayerStart Name=PlayerStart0<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=PlayerStart<br />
Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1)<br />
Location=(X=183.134430,Y=-987.334167,Z=33.978027)<br />
OldLocation=(X=-217.561523,Y=-44.538128,Z=-87.899948)<br />
Name=PlayerStart0<br />
End Actor<br />
...<br />
End Map</uscript><br />
<br />
<br />
External link: http://web.archive.org/web/20060710080159/http://unreal.jall.org/tutorials/t3d.html (new URL)<br />
<br />
=== T3D File Structure ===<br />
== Ux,UT,UT200x Maps ==<br />
<uscript><br />
Begin Map<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
...<br />
End Map<br />
</uscript><br />
<br />
== UT3 Maps ==<br />
<uscript><br />
Begin Map<br />
Begin Level NAME=PersistentLevel<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
...<br />
End Level<br />
Begin Surface<br />
End Surface<br />
End Map<br />
</uscript><br />
<br />
Note: as UT3 T3D files have different header, any other not-UT3 t3d file can't be imported into UT3 editor (UnrealEd 4)<br />
<br />
===T3D brush geometry===<br />
Information geometry is contained in the following actors:<br />
*Brush<br />
*Mover (only UT and U1 game)<br />
<br />
For more information about T3D brushes, see [[Legacy:T3D_Brush|T3D Brush]].<br />
<br />
==T3D Utilities ==<br />
* [[Legacy:MapScale|MapScale]] scales an entire .t3d file<br />
* [[Legacy:MeshMaker|MeshMaker]] converts a prefab in .t3d format to a [[Legacy:Decoration|decoration]]<br />
* [http://darendash.home.comcast.net/~darendash/Converter.html UnrealROC] converters: from 3DMF, to VRML/X3D/OBJ (including textures et al).<br />
<br />
==Related Topics ==<br />
* [[Legacy:Data Import And Export|Data Import and Export]]<br />
* [[Legacy:Brush Exporting And Importing|Brush Exporting And Importing]]<br />
* [[Legacy:Brush Hacking|Brush Hacking]]<br />
* [[Legacy:T3D Brush|T3D Brush]]<br />
<br />
'''Kefik:''' There can be also a tag 'CsgOper' which have one of two values ... 'CSG_Subtract' -> subtract the brush from space or 'CSG_Add' -> add this brush to shape.<br />
<br />
'''Sobiwan:''' New to WIKI editing, but not using it. I was searching for the actual format of T3D and found <!-- invalid URL "http://users.skynet.be/fa550206/Slug-Production/Data/OpenGL-Documents/T3D-File-Format/T3D-File-Format.htm" replaced, --SeriousBarbie (talk) 21:11, 11 August 2016 (EDT) --><br />
[http://web.archive.org/web/20050913035722/http://users.skynet.be/fa550206/Slug-Production/Data/OpenGL-Documents/T3D-File-Format/T3D-File-Format.htm Mongo's description] of [http://www.planetunreal.com Planetunreal] to be extremely helpful. I'll ask him (mongo@planetunreal.com) if we can use and/or edit his description here. The format is much more involved than described here. We can even supply examples of how to do particular hacks.<br />
<br />
'''MadNad:''' Interestingly, I was able to convert a [http://madnad.com/ut2k3/Screenshots/q3dm7.jpg?link Quake3_Level] into a unreal map. Quite interesting. First i converted a *.bsp to a *.map in quake, then I made a level that was just a huge cube and converted it to *.t3d. With an external app (i'll have to find the name of it ) I was able to merge these two together. After some scaling and switching additive brushes in quake to subtractive brushes in ued and subtractive to additive, I compiled and had q3dm7 geometry. I don't necessarily recommend doing this, as it will take more time to fix than create it from scratch, but I thought I would share a little experience I had with this.<br />
--[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 21:11, 11 August 2016 (EDT)</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:TriggeredTexture?diff=46356Legacy:TriggeredTexture2016-08-31T17:57:46Z<p>SeriousBarbie: +Legacy:Dynamic_Texture/+cat</p>
<hr />
<div>{{classbox|[[Legacy:Actor|Actor]] >> [[Legacy:Triggers (UT)|Triggers (UT)]] >> TriggeredTexture}}<br />
<br />
'''TriggeredTexture''' controls a [[Legacy:ScriptedTexture (UT)|ScriptedTexture (UT)]] and allows you to switch between different textures displayed on a [[Legacy:Brush|brush]] surface. Used, for instance, for the monitors in in AS-OceanFloor that initially display "Computer online" and switch to "Computer offline" as soon as a terminal has been destroyed.<br />
<br />
==Properties ==<br />
<br />
; DestinationTexture : The [[Legacy:ScriptedTexture (UT)|ScriptedTexture (UT)]] controlled by this TriggeredTexture actor. Note that although this property accepts a regular texture, the TriggeredTexture won't work if you don't really use a ScriptedTexture.<br />
<br />
; Textures : List of regular [[Legacy:Texture (UT)|Texture (UT)]]s that the TriggeredTexture will cycle through when triggered. Initially, the Texture in slot 0 (zero) is displayed; each time you trigger the TriggeredTexture, the display advances to the next slot. The first slot containing ''None'' marks the end of the list.<br />
<br />
; bTriggerOnceOnly : If set, goes through the list only once (rather than switching back to the first slot after the last has been reached).<br />
<br />
==How To Use ==<br />
<br />
# Apply a [[Legacy:ScriptedTexture (UT)|ScriptedTexture (UT)]] (for instance Monitor1 to Monitor8 from <tt>Indus7.utx</tt>) wherever you want the dynamic texture to appear. (It will look blank in UnrealEd.)<br />
# Place a TriggeredTexture actor somewhere in your map.<br />
# Open the TriggeredTexture's properties and set its DestinationTexture property to the ScriptedTexture you used in the first step.<br />
# Fill the Textures slots with the textures you want to display on the ScriptedTexture.<br />
# Add a [[Legacy:Trigger|Trigger]] that triggers the TriggeredTexture whenever the displayed texture should change. (To link the Trigger and the TriggeredTexture, set the Trigger's Event property to the same value as the TriggeredTexture's Tag property.)<br />
<br />
Note that the color palette isn't changed. So if your textures doesn't share the same palette, or have identical palettes(?), the other texture's colors will be messed up.<br />
<br />
==Related Pages ==<br />
<br />
* [[Legacy:Screen|Screen]] &ndash; Provides more control over ScriptedTextures than just cycling through regular textures<br />
* [[Legacy:Dynamic_Texture|Dynamic Texture]]<br />
<br />
[[Category:Legacy Mapping|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:FortStandard?diff=46355Legacy:FortStandard2016-08-13T02:58:40Z<p>SeriousBarbie: hint to other game types</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Pawn (UT)|Pawn (UT)]] >> [[Legacy:StationaryPawn|StationaryPawn]] >> FortStandard}}<br />
<br />
This actor marks objectives in an Assault type map. See [[Legacy:Mapping For AS (UT)|Mapping For AS (UT)]]. If game type is not Assault, this actor destroys itself before game starts.<br />
<br />
You need to make this in your assault levels to make them work.<br />
<br />
To make the time limit for your assault level you need to open the last FortStandard's properties and select defense time and put what ever you want the time limit to be for your level.<br />
<br />
You will need to plan and build your level before using this actor. Once you have built your level place a FortStandard VERY CLOSE to the objective, as there are two ways to trigger this actor: damage and touch. First a list of all the actor specific variables you will need to be familiar with:<br />
<br />
==Properties ==<br />
; bFinalFort : When this objective has been triggered, the mission will end. <br />
; bFlashing : When damage is taken, the fort standard will flash. Not sure what the damage threshold for this is. <br />
; bForceRadius : If true, bots will charge when they are within a specified radius. <br />
; bSayDestroyed : Bots will use a voicepack recording if they have accomplished this objective. <br />
; bSelfDisplayed : If true, the fort standard will be visible as a small flag in game. Almost always set false. <br />
; bTriggerOnly : Set to true if you want the objective to be triggered by touch instead of damage.<br />
; ChargeDist : This is the distance from which bots will begin charging if bForceRadius is set true. <br />
; DamageEvent : This has several slots for calling multiple events. Similar to a [[Legacy:Dispatcher|Dispatcher]]. <br />
; DmgEventThreshold : The amount of damage that is needed to trigger DamageEvent. Different damage amounts can be set for different events.<br />
; DefensePriority : In which order bots should defend the objectives. The higher the number, the higher the Priority. I have no idea if there is a limit to the amount of objectives, or how big a number to put here. I do know that you can only place seven objectives in the [[Legacy:AssaultInfo|AssaultInfo]] actor. (Explained later)<br />
; DefenseTime : Simply the amount of time in minutes that players have to complete the level. The default value is ten, meaning ten minutes. But I have found out by fiddling that if you have different values in this field for each FortStandard, the engine will take the highest value as the intended game time limit<br />
; DestroyedMessage : This is the message to be shown when objective is destroyed. Used in combination with the FortName value.<br />
; EndCamTag : Tag of the [[Legacy:SpectatorCam|SpectatorCam]] you are using as an end camera. I do not know if each standard needs this or if it is only the final.<br />
; FallBackFort : The tag of the fort which defenders should fall back to. I would recommend leaving this blank, and utilizing the DefensePriority property to indicate for the bots where to go.<br />
; FortName : Name of the objective. Will be shown with the destroyed message. <br />
; NearestPathNodeTag : The Tag of the nearest [[Legacy:PathNode|PathNode]] looking in the direction of the attackers (see [[Legacy:Match These Tags|Match These Tags]] for more information). Bots should reach this node ''before'' they reach the FortStandard.<br />
<br />
==Discussion ==<br />
<br />
[[Legacy:SabbathCat|SabbathCat]] : Hey Mango, nice work collating. Hope you stick around a while to add some more, definitely a pro already with WIKI mark-up. I added the pathnode tag thing. As observed from a fair few AS maps from Epic. :) <br />
<br />
'''Tarquin:''' Nice stuff, but should maybe be moved to [[Legacy:Mapping For AS (UT)|Mapping For AS (UT)]]? :)<br />
<br />
'''King Mango:''' Yup will do. New here, but am getting the hang of the method. Thanks guys :D!!<br />
<br />
'''Tarquin:''' the props list says set DefenseTime to the same value for each one, but the top paragraphs say you only need to set it for the final Standard. Which is true?<br />
<br />
'''MythOpus:''' I believe you only have to set the time in the AssaultInfo... or at least, thats how I remember it. I'ts been so long O_o<br />
<br />
'''King Mango''' I have found out by experimentation regarding the correct info for DefenseTime. Page reflects changes.<br />
<br />
'''SabbathKatze:''' Do the Damage Events actually work? I've tried linking them to both a Movers Tag and Event, and neither seems to fire them off. :S?<br />
<br />
'''King Mango''' My apologies, I misinformed as to defense priority. It has been fixed. Couldn't figure out why my bots kept trying to attack and defend from the second objective as I was playtesting. Then changed the values, and batta-boom, batta-bing, they are working fine.<br />
<br />
'''xX)(Xx'''<br />
<br />
Also, fortstandards in Assault maps are affected by ZEROPING weapons, the zeroping weapons just can't hit the fortstandards, it would be great to know why, see <br />
<br />
http://wiki.beyondunreal.com/wiki/Lag_Compensation <br />
<br />
for more info on ZeroPing<br />
<br />
'''tarnationsauce2''' It seems FortStandards are hard coded at a maximum of 16 (0-15).<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Color_Blending?diff=46354Legacy:Color Blending2016-08-12T23:11:19Z<p>SeriousBarbie: even more anchors, wikified</p>
<hr />
<div>'''Color blending''' modes (or rendering modes) specify how the color of an individual [[Legacy:Texture|texture]] pixel is merged with the color of the corresponding background pixel it is going to be drawn on.<br />
<br />
==Color Blending Modes==<br />
<br />
;None: Graphics are not drawn.<br />
<br />
;Normal: Every pixel is 100% opaque. If you #EXEC IMPORT it with FLAGS=2, then every pixel that uses the first entry in the pallette will be 100% transparent and the rest will be 100% opaque.<br />
<br />
;<span id="masked">Masked</span>: The first pixel in the [[Legacy:Palette|palette]] is 100% transparent; all others are 100% opaque.<br />There is a utility called "[[Legacy:Bright|Bright]]" distributed by Epic, that helps with this. It has a command line option "-pinkmask" that makes all pink pixels (R=255, G=0, B=255) transparent, and all others opaque.<br />In UT2003 this will only work with 8bit textures.<br />
;<span id="translucent">Translucent</span>: The brightness of the color determines it's opacity. i.e. <br />
;* white is 100% opaque<br />
;* a middle bright colour such as grey or medium yellow is partially transparent<br />
;* black is 100% translucent<br />
;:This doesn't work well in some configurations (possibly MacOS + Glide) unless the <tt>#EXEC IMPORT</tt> also has <tt>FLAGS=2</tt>. If you plan to draw <tt>STY_Translucent</tt>, always use <tt>FLAGS=2</tt>.<br />
;<span id="modulated">Modulated</span>: Multiplies the destination pixels by the source if the source is darker than 127,127,127. Screens the destination pixels if the source is brighter than 127,127,127. (like the Photoshop "Overlay" mode). This results in:<br />
;* color 0,0,0 = darken whatever is behind it<br />
;* color 127,127,127 = no change<br />
;* color 255, 255, 255 = brighten whatever is behind it<br />
<br />
=== Additional modes in new engine versions (e.g. UT2003) ===<br />
<br />
;Alpha: Uses an [[Legacy:Alpha Channel|alpha channel]] to determine the translucency of the texture's pixels.<br />
<br />
;Additive: Adds the color in the source pixels to the background. A red pixel painted onto a blue background will result in a purple pixel being shown. Additive differs from translucent in that translucent actors will can stack up on the screen and become more opaque, where additive actors will not. For example, if you had 100 red translucent clouds in a row, they would stack up and you would see just red if you looked through all of them at once. If it were additive clouds, they would add their red to the background but stop adding when the red was maxed out (R=255) so you could still see what was behind.<br />
<br />
;Subtractive: This is essentially the same as additive, but the source pixels color is subtracted from the background. This is not that useful of a drawtype, but it does have a strong application in making smoke (bluish-white particles set to subtractive make a nice brownish-black color.)<br />
<br />
; Particle: Only used for [[Legacy:Emitter|Emitter]]s. This causes the Emitter to draw its particles.<br />
<br />
; AlphaZ: ''what does this do?''<br />
<br />
Opaque is the opposite of translucent; you can't see through something opaque. If it's 75% opaque (or 25% translucent), it's slightly transparent; you can see through it a slightly. 0% opaque is 100% translucent; it's invisible and not drawn.<br />
<br />
<tt>#EXEC IMPORT with FLAGS=2</tt> is the same as having the texture property flag bTranslucent set within Ued/2. This makes first colour in the palette 100% transparent.<br />
<br />
==Usage==<br />
<br />
These rendering modes can apply to:<br />
<br />
===Canvas===<br />
<br />
In [[Legacy:UnrealScript|UnrealScript]], set <tt>[[Legacy:Canvas|Canvas]].Style</tt>.<br />
<br />
===Actor===<br />
<br />
For [[Legacy:Actor|Actor]]s, use Display -> Style <br />
<br />
==Styles ==<br />
<br />
Declared as an enum in the Actor class.<br />
<br />
===UT===<br />
<br />
<uscript><br />
// Style for rendering sprites, meshes.<br />
<br />
var(Display) enum ERenderStyle<br />
{<br />
STY_None,<br />
STY_Normal,<br />
STY_Masked,<br />
STY_Translucent,<br />
STY_Modulated,<br />
} Style;<br />
</uscript><br />
<br />
===UT2003===<br />
<br />
<uscript><br />
// Style for rendering sprites, meshes.<br />
var(Display) enum ERenderStyle<br />
{<br />
STY_None,<br />
STY_Normal,<br />
STY_Masked,<br />
STY_Translucent,<br />
STY_Modulated,<br />
STY_Alpha,<br />
STY_Additive,<br />
STY_Subtractive,<br />
STY_Particle,<br />
STY_AlphaZ,<br />
} Style;<br />
</uscript><br />
<br />
==Related Topics==<br />
* See [[Legacy:Unreal Coding FAQ|Unreal Coding FAQ]] for more information<br />
[[Category:Legacy Mapping|{{PAGENAME}}]]<br />
[[Category:Legacy To Do|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:PolyFlags?diff=46353Legacy:PolyFlags2016-08-12T23:07:07Z<p>SeriousBarbie: enhanced</p>
<hr />
<div>In the properties of a [[Legacy:Brush|Brush]], under ''Brush -> PolyFlags'' you can give all surfaces of the brush default properties that override the [[Legacy:Surface Flags (UT)|Surface Flags (UT)]] in the [[Legacy:Surface Properties Window|Surface Properties window]].<br />
<br />
In ''PolyFlags'' you have to enter a decimal number, what follows is a list of the meaning of all the numbers.<br />
<br />
To give a brush two or more properties at the same time, you need to make the sum of the numbers of both properties. For example if you want a Translucent + TwoSided brush, you have to use the number 4 + 256 = 260.<br />
<br />
After you entered the number you need to rebuild to see the change.<br />
<br />
Here's the list, mostly taken from ''Enum-Polyflags.h'':<br />
<br />
{|class="wikitable"<br />
!Bit<br />
!Value (dec)<br />
!Value (hex)<br />
!Name<br />
!Description<br />
|- style="background-color: lightgray"<br />
|<br />
|style="text-align: right"|0<br />
|style="text-align: right"|0x0<br />
|<br />
|Use settings from Surface Properties for each individual surface of the brush.<br />
|-<br />
|style="text-align: right"|0<br />
|style="text-align: right"|1<br />
|style="text-align: right"|0x1<br />
|PF_Invisible<br />
|Polygon is invisible.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|1<br />
|style="text-align: right"|2<br />
|style="text-align: right"|0x2<br />
|PF_Masked<br />
|Polygon should be drawn masked. Use for palettized textures to make the first color in the palette (in Paint Shop Pro at least) invisible, see [[Legacy:Color Blending#masked|Color Blending]].<br />
|-<br />
|style="text-align: right"|2<br />
|style="text-align: right"|4<br />
|style="text-align: right"|0x4<br />
|PF_Translucent<br />
|Darker parts of the texture become transparent, see [[Legacy:Color Blending#translucent|Color Blending]].<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|3<br />
|style="text-align: right"|8<br />
|style="text-align: right"|0x8<br />
|PF_NotSolid<br />
|Polygon is not solid doesn't block.<br />
|-<br />
|style="text-align: right"|4<br />
|style="text-align: right"|16<br />
|style="text-align: right"|0x10<br />
|PF_Environment<br />
|Polygon should be drawn environment mapped.<br />
|-<br />
|style="text-align: right"|4<br />
|style="text-align: right"|16<br />
|style="text-align: right"|0x10<br />
|PF_ForceViewZone<br />
|Force current iViewZone in OccludeBSP (reuse Environment flag).<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|5<br />
|style="text-align: right"|32<br />
|style="text-align: right"|0x20<br />
|PF_Semisolid<br />
|Polygon is semi-solid, collision solid CSG nonsolid.<br />
|-<br />
|style="text-align: right"|6<br />
|style="text-align: right"|64<br />
|style="text-align: right"|0x40<br />
|PF_Modulated<br />
|Greyer parts of the texture become transparent, see [[Legacy:Color Blending#modulated|Color Blending]].<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|7<br />
|style="text-align: right"|128<br />
|style="text-align: right"|0x80<br />
|PF_FakeBackdrop<br />
|Poly looks exactly like backdrop (parallax SkyBox visible through surface).<br />
|-<br />
|style="text-align: right"|8<br />
|style="text-align: right"|256<br />
|style="text-align: right"|0x100<br />
|PF_TwoSided<br />
|Poly is visible from both sides.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|9<br />
|style="text-align: right"|512<br />
|style="text-align: right"|0x200<br />
|PF_AutoUPan<br />
|Automatically pans in U direction; change speed in [[Legacy:ZoneInfo|ZoneInfo]] or [[Legacy:LevelInfo|LevelInfo]] -> ZoneLight.<br />
|-<br />
|style="text-align: right"|10<br />
|style="text-align: right"|1024<br />
|style="text-align: right"|0x400<br />
|PF_AutoVPan<br />
|Automatically pans in V direction; change speed in [[Legacy:ZoneInfo|ZoneInfo]] or [[Legacy:LevelInfo|LevelInfo]] -> ZoneLight.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|11<br />
|style="text-align: right"|2048<br />
|style="text-align: right"|0x800<br />
|PF_NoSmooth<br />
|Don't smooth textures.<br />
|-<br />
|style="text-align: right"|12<br />
|style="text-align: right"|4096<br />
|style="text-align: right"|0x1000<br />
|PF_BigWavy<br />
|Poly has a big wavy pattern in it.<br />
|-<br />
|style="text-align: right"|12<br />
|style="text-align: right"|4096<br />
|style="text-align: right"|0x1000<br />
|PF_SpecialPoly<br />
|Game-specific poly-level render control (reuse BigWavy flag).<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|13<br />
|style="text-align: right"|8192<br />
|style="text-align: right"|0x2000<br />
|PF_SmallWavy<br />
|Small wavy pattern (for water/enviro reflection).<br />
|-<br />
|style="text-align: right"|14<br />
|style="text-align: right"|16384<br />
|style="text-align: right"|0x4000<br />
|PF_Flat<br />
|Flat surface.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|15<br />
|style="text-align: right"|32768<br />
|style="text-align: right"|0x8000<br />
|PF_LowShadowDetail<br />
|Reduces shadow detail; in conjunction with High Shadow Detail (below), makes extra low shadow detail<br />
|-<br />
|style="text-align: right"|16<br />
|style="text-align: right"|65536<br />
|style="text-align: right"|0x10000<br />
|PF_NoMerge<br />
|Don't merge poly's nodes before lighting when rendering.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|17<br />
|style="text-align: right"|131072<br />
|style="text-align: right"|0x20000<br />
|PF_CloudWavy<br />
|Polygon appears wavy like clouds.<br />
|-<br />
|style="text-align: right"|18<br />
|style="text-align: right"|262144<br />
|style="text-align: right"|0x40000<br />
|PF_DirtyShadows<br />
|Dirty shadows.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|19<br />
|style="text-align: right"|524288<br />
|style="text-align: right"|0x80000<br />
|PF_BrightCorners<br />
|Brighten convex corners; no dark shadows at the edges of the surface.<br />
|-<br />
|style="text-align: right"|20<br />
|style="text-align: right"|1048576<br />
|style="text-align: right"|0x100000<br />
|PF_SpecialLit<br />
|Surface only gets light from [[Legacy:Special Lit|Special Lit]] lights.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|21<br />
|style="text-align: right"|2097152<br />
|style="text-align: right"|0x200000<br />
|PF_Gouraud<br />
|Gouraud shaded.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|21<br />
|style="text-align: right"|2097152<br />
|style="text-align: right"|0x200000<br />
|PF_NoBoundRejection<br />
|Disable bound rejection in OccludeBSP (reuse Gourard flag).<br />
|-<br />
|style="text-align: right"|22<br />
|style="text-align: right"|4194304<br />
|style="text-align: right"|0x400000<br />
|PF_Unlit<br />
|Surface ignores lighting and is full bright.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|23<br />
|style="text-align: right"|8388608<br />
|style="text-align: right"|0x800000<br />
|PF_HighShadowDetail<br />
|Enhances shadow detail.<br />
|-<br />
|style="text-align: right"|24<br />
|style="text-align: right"|16777216<br />
|style="text-align: right"|0x1000000<br />
|PF_Memorized<br />
|Editor: Poly is remembered.<br />
|-<br />
|style="text-align: right"|24<br />
|style="text-align: right"|16777216<br />
|style="text-align: right"|0x1000000<br />
|PF_RenderHint<br />
|Internal: Rendering optimization hint.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|25<br />
|style="text-align: right"|33554432<br />
|style="text-align: right"|0x2000000<br />
|PF_Selected<br />
|Editor: Poly is selected.<br />
|-<br />
|style="text-align: right"|26<br />
|style="text-align: right"|67108864<br />
|style="text-align: right"|0x4000000<br />
|PF_Portal<br />
|Portal between iZones.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|27<br />
|style="text-align: right"|134217728<br />
|style="text-align: right"|0x8000000<br />
|PF_Mirrored<br />
|Reflective surface.<br />
|-<br />
|style="text-align: right"|28<br />
|style="text-align: right"|268435456<br />
|style="text-align: right"|0x10000000<br />
|PF_Highlighted<br />
|Editor: Poly is highlighted.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|29<br />
|style="text-align: right"|536870912<br />
|style="text-align: right"|0x20000000<br />
|<br />
|(unused?)<br />
|-<br />
|style="text-align: right"|30<br />
|style="text-align: right"|1073741824<br />
|style="text-align: right"|0x40000000<br />
|PF_FlatShaded<br />
|FPoly has been split by SplitPolyWithPlane. <br />
|-<br />
|style="text-align: right"|30<br />
|style="text-align: right"|1073741824<br />
|style="text-align: right"|0x40000000<br />
|PF_EdProcessed<br />
|Internal: FPoly was already processed in editorBuildFPolys.<br />
|-<br />
|style="text-align: right"|30<br />
|style="text-align: right"|1073741824<br />
|style="text-align: right"|0x40000000<br />
|PF_RenderFog<br />
|Internal: Render with fogmapping.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|31<br />
|style="text-align: right"|2147483648<br />
|style="text-align: right"|0x80000000<br />
|PF_EdCut<br />
|Internal: FPoly has been split by SplitPolyWithPlane.<br />
|- style="background-color: lightgray"<br />
|style="text-align: right"|31<br />
|style="text-align: right"|2147483648<br />
|style="text-align: right"|0x80000000<br />
|PF_Occlude<br />
|Internal: Occludes even if PF_NoOcclude.<br />
|}<br />
<br />
== Named combinations of flags ==<br />
{|<br />
|-<br />
| PF_NoOcclude = || PF_Masked {{!}} PF_Translucent {{!}} PF_Invisible {{!}} PF_Modulated<br />
|-<br />
| PF_NoEdit = || PF_Memorized {{!}} PF_Selected {{!}} PF_EdProcessed {{!}} PF_NoMerge {{!}} PF_EdCut<br />
|-<br />
| PF_NoImport = || PF_NoEdit {{!}} PF_NoMerge {{!}} PF_Memorized {{!}} PF_Selected {{!}} PF_EdProcessed {{!}} PF_EdCut<br />
|-<br />
| PF_AddLast = || PF_Semisolid {{!}} PF_NotSolid<br />
|-<br />
| PF_NoAddToBSP = || PF_EdCut {{!}} PF_EdProcessed {{!}} PF_Selected {{!}} PF_Memorized<br />
|-<br />
| PF_NoShadows = || PF_Unlit {{!}} PF_Invisible {{!}} PF_Environment {{!}} PF_FakeBackdrop<br />
|-<br />
| PF_Transient = || PF_Highlighted<br />
|}<br />
<br />
<br />
[[Category:Legacy Mapping|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Masked_Texture?diff=46352Legacy:Masked Texture2016-08-12T20:59:04Z<p>SeriousBarbie: Redirected page to Legacy:Color Blending#masked</p>
<hr />
<div>#REDIRECT [[Legacy:Color_Blending#masked]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Color_Blending?diff=46351Legacy:Color Blending2016-08-12T20:56:38Z<p>SeriousBarbie: moved anchor</p>
<hr />
<div>'''Color blending''' modes (or rendering modes) specify how the color of an individual [[Legacy:Texture|texture]] pixel is merged with the color of the corresponding background pixel it is going to be drawn on.<br />
<br />
==Color Blending Modes==<br />
<br />
;None: Graphics are not drawn.<br />
<br />
;Normal: Every pixel is 100% opaque. If you #EXEC IMPORT it with FLAGS=2, then every pixel that uses the first entry in the pallette will be 100% transparent and the rest will be 100% opaque.<br />
<br />
;<span id="masked">Masked</span>: The first pixel in the [[Legacy:Palette|palette]] is 100% transparent; all others are 100% opaque.<br />
<br />
<br />
There is a utility called "[[Legacy:Bright|Bright]]" distributed by Epic, that helps with this. It has a command line option "-pinkmask" that makes all pink pixels (R=255, G=0, B=255) transparent, and all others opaque.<br />
<br />
In UT2003 this will only work with 8bit textures.<br />
<br />
<br />
;Translucent: The brightness of the color determines it's opacity. i.e. <br />
;* white is 100% opaque<br />
;* a middle bright colour such as grey or medium yellow is partially transparent<br />
;* black is 100% translucent<br />
;:This doesn't work well in some configurations (possibly MacOS + Glide) unless the <tt>#EXEC IMPORT</tt> also has <tt>FLAGS=2</tt>. If you plan to draw <tt>STY_Translucent</tt>, always use <tt>FLAGS=2</tt>.<br />
<br />
;Modulated: Multiplies the destination pixels by the source if the source is darker than 127,127,127. Screens the destination pixels if the source is brighter than 127,127,127. (like the Photoshop "Overlay" mode). This results in:<br />
;* color 0,0,0 = darken whatever is behind it<br />
;* color 127,127,127 = no change<br />
;* color 255, 255, 255 = brighten whatever is behind it<br />
<br />
Additional modes in new engine versions (e.g. UT2003):<br />
<br />
;Alpha: Uses an [[Legacy:Alpha Channel|alpha channel]] to determine the translucency of the texture's pixels.<br />
<br />
;Additive: Adds the color in the source pixels to the background. A red pixel painted onto a blue background will result in a purple pixel being shown. Additive differs from translucent in that translucent actors will can stack up on the screen and become more opaque, where additive actors will not. For example, if you had 100 red translucent clouds in a row, they would stack up and you would see just red if you looked through all of them at once. If it were additive clouds, they would add their red to the background but stop adding when the red was maxed out (R=255) so you could still see what was behind.<br />
<br />
;Subtractive: This is essentially the same as additive, but the source pixels color is subtracted from the background. This is not that useful of a drawtype, but it does have a strong application in making smoke (bluish-white particles set to subtractive make a nice brownish-black color.)<br />
<br />
; Particle: Only used for [[Legacy:Emitter|Emitter]]s. This causes the Emitter to draw its particles.<br />
<br />
; AlphaZ: ''what does this do?''<br />
<br />
Opaque is the opposite of translucent; you can't see through something opaque. If it's 75% opaque (or 25% translucent), it's slightly transparent; you can see through it a slightly. 0% opaque is 100% translucent; it's invisible and not drawn.<br />
<br />
<tt>#EXEC IMPORT with FLAGS=2</tt> is the same as having the texture property flag bTranslucent set within Ued/2. This makes first colour in the palette 100% transparent.<br />
<br />
==Usage==<br />
<br />
These rendering modes can apply to:<br />
<br />
===Canvas===<br />
<br />
In [[Legacy:UnrealScript|UnrealScript]], set <tt>[[Legacy:Canvas|Canvas]].Style</tt>.<br />
<br />
===Actor===<br />
<br />
For [[Legacy:Actor|Actor]]s, use Display -> Style <br />
<br />
==Styles ==<br />
<br />
Declared as an enum in the Actor class.<br />
<br />
===UT===<br />
<br />
<uscript><br />
// Style for rendering sprites, meshes.<br />
<br />
var(Display) enum ERenderStyle<br />
{<br />
STY_None,<br />
STY_Normal,<br />
STY_Masked,<br />
STY_Translucent,<br />
STY_Modulated,<br />
} Style;<br />
</uscript><br />
<br />
===UT2003===<br />
<br />
<uscript><br />
// Style for rendering sprites, meshes.<br />
var(Display) enum ERenderStyle<br />
{<br />
STY_None,<br />
STY_Normal,<br />
STY_Masked,<br />
STY_Translucent,<br />
STY_Modulated,<br />
STY_Alpha,<br />
STY_Additive,<br />
STY_Subtractive,<br />
STY_Particle,<br />
STY_AlphaZ,<br />
} Style;<br />
</uscript><br />
<br />
==Related Topics==<br />
* See [[Legacy:Unreal Coding FAQ|Unreal Coding FAQ]] for more information<br />
[[Category:Legacy Mapping|{{PAGENAME}}]]<br />
[[Category:Legacy To Do|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:Color_Blending?diff=46350Legacy:Color Blending2016-08-12T20:55:21Z<p>SeriousBarbie: added anchor</p>
<hr />
<div>'''Color blending''' modes (or rendering modes) specify how the color of an individual [[Legacy:Texture|texture]] pixel is merged with the color of the corresponding background pixel it is going to be drawn on.<br />
<br />
==Color Blending Modes==<br />
<br />
;None: Graphics are not drawn.<br />
<br />
;Normal: Every pixel is 100% opaque. If you #EXEC IMPORT it with FLAGS=2, then every pixel that uses the first entry in the pallette will be 100% transparent and the rest will be 100% opaque.<br />
<br />
;Masked: <span id="masked"></span>The first pixel in the [[Legacy:Palette|palette]] is 100% transparent; all others are 100% opaque.<br />
<br />
<br />
There is a utility called "[[Legacy:Bright|Bright]]" distributed by Epic, that helps with this. It has a command line option "-pinkmask" that makes all pink pixels (R=255, G=0, B=255) transparent, and all others opaque.<br />
<br />
In UT2003 this will only work with 8bit textures.<br />
<br />
<br />
;Translucent: The brightness of the color determines it's opacity. i.e. <br />
;* white is 100% opaque<br />
;* a middle bright colour such as grey or medium yellow is partially transparent<br />
;* black is 100% translucent<br />
;:This doesn't work well in some configurations (possibly MacOS + Glide) unless the <tt>#EXEC IMPORT</tt> also has <tt>FLAGS=2</tt>. If you plan to draw <tt>STY_Translucent</tt>, always use <tt>FLAGS=2</tt>.<br />
<br />
;Modulated: Multiplies the destination pixels by the source if the source is darker than 127,127,127. Screens the destination pixels if the source is brighter than 127,127,127. (like the Photoshop "Overlay" mode). This results in:<br />
;* color 0,0,0 = darken whatever is behind it<br />
;* color 127,127,127 = no change<br />
;* color 255, 255, 255 = brighten whatever is behind it<br />
<br />
Additional modes in new engine versions (e.g. UT2003):<br />
<br />
;Alpha: Uses an [[Legacy:Alpha Channel|alpha channel]] to determine the translucency of the texture's pixels.<br />
<br />
;Additive: Adds the color in the source pixels to the background. A red pixel painted onto a blue background will result in a purple pixel being shown. Additive differs from translucent in that translucent actors will can stack up on the screen and become more opaque, where additive actors will not. For example, if you had 100 red translucent clouds in a row, they would stack up and you would see just red if you looked through all of them at once. If it were additive clouds, they would add their red to the background but stop adding when the red was maxed out (R=255) so you could still see what was behind.<br />
<br />
;Subtractive: This is essentially the same as additive, but the source pixels color is subtracted from the background. This is not that useful of a drawtype, but it does have a strong application in making smoke (bluish-white particles set to subtractive make a nice brownish-black color.)<br />
<br />
; Particle: Only used for [[Legacy:Emitter|Emitter]]s. This causes the Emitter to draw its particles.<br />
<br />
; AlphaZ: ''what does this do?''<br />
<br />
Opaque is the opposite of translucent; you can't see through something opaque. If it's 75% opaque (or 25% translucent), it's slightly transparent; you can see through it a slightly. 0% opaque is 100% translucent; it's invisible and not drawn.<br />
<br />
<tt>#EXEC IMPORT with FLAGS=2</tt> is the same as having the texture property flag bTranslucent set within Ued/2. This makes first colour in the palette 100% transparent.<br />
<br />
==Usage==<br />
<br />
These rendering modes can apply to:<br />
<br />
===Canvas===<br />
<br />
In [[Legacy:UnrealScript|UnrealScript]], set <tt>[[Legacy:Canvas|Canvas]].Style</tt>.<br />
<br />
===Actor===<br />
<br />
For [[Legacy:Actor|Actor]]s, use Display -> Style <br />
<br />
==Styles ==<br />
<br />
Declared as an enum in the Actor class.<br />
<br />
===UT===<br />
<br />
<uscript><br />
// Style for rendering sprites, meshes.<br />
<br />
var(Display) enum ERenderStyle<br />
{<br />
STY_None,<br />
STY_Normal,<br />
STY_Masked,<br />
STY_Translucent,<br />
STY_Modulated,<br />
} Style;<br />
</uscript><br />
<br />
===UT2003===<br />
<br />
<uscript><br />
// Style for rendering sprites, meshes.<br />
var(Display) enum ERenderStyle<br />
{<br />
STY_None,<br />
STY_Normal,<br />
STY_Masked,<br />
STY_Translucent,<br />
STY_Modulated,<br />
STY_Alpha,<br />
STY_Additive,<br />
STY_Subtractive,<br />
STY_Particle,<br />
STY_AlphaZ,<br />
} Style;<br />
</uscript><br />
<br />
==Related Topics==<br />
* See [[Legacy:Unreal Coding FAQ|Unreal Coding FAQ]] for more information<br />
[[Category:Legacy Mapping|{{PAGENAME}}]]<br />
[[Category:Legacy To Do|{{PAGENAME}}]]</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:T3D_File?diff=46349Legacy:T3D File2016-08-12T01:11:53Z<p>SeriousBarbie: /* Related Topics */</p>
<hr />
<div>The '''T3D file format''' or '''Unreal Text File''' holds a text list of Unreal map objects. An entire map can be saved as this file format, or just a single actor or brush.<br />
<br />
Note that while brushes, their applied textures and light actors are saved, the [[Legacy:Unreal Geometry|Unreal Geometry]] itself is not saved: upon importing a T3D file the map must be built.<br />
<br />
Copying objects from UnrealEd and pasting into a text editor produces the same format.<br />
<br />
Unreal Text format <br />
<br />
Exported brushes and (other) actors. See [[Legacy:T3D File|T3D file]].<br />
* Created by:<br />
** UnrealEd's File -> Import command<br />
** UnrealEd's Brush -> Import command (see [[Legacy:Data Import And Export|Data Import and Export]] for more on both these commands).<br />
** is this created by external stuff too? <br />
<br />
===Exporting T3D ===<br />
* Export the whole map<br />
** File -> Export... (UnrealEd 1,2,3)<br />
** File -> Export -> All.. (UnrealEd 4 - UT3)<br />
* Export selected actors: File-> Export-> Selected Only ... (UnrealEd 4 only - UT3)<br />
* Export one brush: Brush -> Export ...<br />
* Copy/Paste: can copy paste any actor from any UnrealEd version to another one (Except for UnrealEd 4) or to any text editor such as notepad (Windows)<br />
<br />
===Importing T3D ===<br />
<br />
File -> Import...<br />
<br />
(note importing may take a LONG time)<br />
<br />
Overheard on #utjb... :-)<br />
<br />
<tarquin> t3d stores brushes & actors but not texturing, right?<br />
<Mychaeel> Texturing as well.<br />
(melds into the opening speech from Reservoir Dogs...)<br />
<DaveA>Stores links to textures, and texture transforms, but not the pixels themselves<br />
<br />
The T3D format is a text file which stores information about map actors. It's in fact identical to what can be copied from UnrealEd to a text editor. An exported map looks like this:<br />
<br />
<br />
<uscript><br />
Begin Map<br />
Begin Actor Class=LevelInfo Name=LevelInfo0<br />
TimeSeconds=17.008888<br />
Summary=LevelSummary'Entry.LevelSummary'<br />
DefaultGameType=Class'Botpack.UTIntro'<br />
AIProfile(0)=23784352<br />
AIProfile(1)=52<br />
AIProfile(2)=41<br />
AIProfile(3)=42<br />
AIProfile(4)=40<br />
AIProfile(5)=44<br />
AIProfile(6)=45<br />
AIProfile(7)=21846171<br />
AvgAITime=0.000000<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=LevelInfo<br />
Region=(Zone=LevelInfo'Entry.LevelInfo0',iLeaf=-1)<br />
Name=LevelInfo0<br />
End Actor<br />
Begin Actor Class=Brush Name=Brush0<br />
MainScale=(SheerAxis=SHEER_ZX)<br />
PostScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX)<br />
TempScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX)<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=Brush<br />
Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1)<br />
Location=(X=464.000000,Y=-16.000000,Z=64.000000)<br />
Begin Brush Name=Brush<br />
Begin PolyList<br />
Begin Polygon Item=OUTSIDE Texture=black1 Flags=4194304 Link=0<br />
Origin -00160.000000,+00000.000000,+00128.000000<br />
Normal +00000.000000,+00000.000000,+00001.000000<br />
TextureU +00004.000000,+00000.000000,+00000.000000<br />
TextureV +00000.000000,+00004.000000,+00000.000000<br />
Vertex -00128.000000,-00128.000000,+00128.000000<br />
Vertex +00128.000000,-00128.000000,+00128.000000<br />
Vertex +00128.000000,+00128.000000,+00128.000000<br />
Vertex -00128.000000,+00128.000000,+00128.000000<br />
End Polygon<br />
...<br />
End PolyList<br />
End Brush<br />
Brush=Model'Entry.Brush'<br />
Name=Brush0<br />
End Actor<br />
Begin Actor Class=PlayerStart Name=PlayerStart0<br />
Level=LevelInfo'Entry.LevelInfo0'<br />
Tag=PlayerStart<br />
Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1)<br />
Location=(X=183.134430,Y=-987.334167,Z=33.978027)<br />
OldLocation=(X=-217.561523,Y=-44.538128,Z=-87.899948)<br />
Name=PlayerStart0<br />
End Actor<br />
...<br />
End Map</uscript><br />
<br />
<br />
External link: http://web.archive.org/web/20060710080159/http://unreal.jall.org/tutorials/t3d.html (new URL)<br />
<br />
=== T3D File Structure ===<br />
== Ux,UT,UT200x Maps ==<br />
<uscript><br />
Begin Map<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
...<br />
End Map<br />
</uscript><br />
<br />
== UT3 Maps ==<br />
<uscript><br />
Begin Map<br />
Begin Level NAME=PersistentLevel<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
Begin Actor Class=<ClassName><br />
...<br />
End Actor<br />
...<br />
End Level<br />
Begin Surface<br />
End Surface<br />
End Map<br />
</uscript><br />
<br />
Note: as UT3 T3D files have different header, any other not-UT3 t3d file can't be imported into UT3 editor (UnrealEd 4)<br />
<br />
===T3D brush geometry===<br />
Information geometry is contained in the following actors:<br />
*Brush<br />
*Mover (only UT and U1 game)<br />
<br />
For more information about T3D brushes, see [http://wiki.beyondunreal.com/Legacy:T3D_Brush[T3D Brush]]<br />
<br />
<br />
==T3D Utilities ==<br />
* [[Legacy:MapScale|MapScale]] scales an entire .t3d file<br />
* [[Legacy:MeshMaker|MeshMaker]] converts a prefab in .t3d format to a [[Legacy:Decoration|decoration]]<br />
* [http://darendash.home.comcast.net/~darendash/Converter.html UnrealROC] converters: from 3DMF, to VRML/X3D/OBJ (including textures et al).<br />
<br />
==Related Topics ==<br />
* [[Legacy:Data Import And Export|Data Import and Export]]<br />
* [[Legacy:Brush Exporting And Importing|Brush Exporting And Importing]]<br />
* [[Legacy:Brush Hacking|Brush Hacking]]<br />
* [[Legacy:T3D Brush|T3D Brush]]<br />
<br />
'''Kefik:''' There can be also a tag 'CsgOper' which have one of two values ... 'CSG_Subtract' -> subtract the brush from space or 'CSG_Add' -> add this brush to shape.<br />
<br />
'''Sobiwan:''' New to WIKI editing, but not using it. I was searching for the actual format of T3D and found <!-- invalid URL "http://users.skynet.be/fa550206/Slug-Production/Data/OpenGL-Documents/T3D-File-Format/T3D-File-Format.htm" replaced, --SeriousBarbie (talk) 21:11, 11 August 2016 (EDT) --><br />
[http://web.archive.org/web/20050913035722/http://users.skynet.be/fa550206/Slug-Production/Data/OpenGL-Documents/T3D-File-Format/T3D-File-Format.htm Mongo's description] of [http://www.planetunreal.com Planetunreal] to be extremely helpful. I'll ask him (mongo@planetunreal.com) if we can use and/or edit his description here. The format is much more involved than described here. We can even supply examples of how to do particular hacks.<br />
<br />
'''MadNad:''' Interestingly, I was able to convert a [http://madnad.com/ut2k3/Screenshots/q3dm7.jpg?link Quake3_Level] into a unreal map. Quite interesting. First i converted a *.bsp to a *.map in quake, then I made a level that was just a huge cube and converted it to *.t3d. With an external app (i'll have to find the name of it ) I was able to merge these two together. After some scaling and switching additive brushes in quake to subtractive brushes in ued and subtractive to additive, I compiled and had q3dm7 geometry. I don't necessarily recommend doing this, as it will take more time to fix than create it from scratch, but I thought I would share a little experience I had with this.<br />
--[[User:SeriousBarbie|SeriousBarbie]] ([[User talk:SeriousBarbie|talk]]) 21:11, 11 August 2016 (EDT)</div>SeriousBarbiehttps://wiki.beyondunreal.com/Legacy:StatLog?diff=46348Legacy:StatLog2016-07-22T20:39:26Z<p>SeriousBarbie: +Known subclasses</p>
<hr />
<div>{{classbox| [[Legacy:UT|UT]] :: [[Legacy:Actor (UT)|Actor (UT)]] >> [[Legacy:Info (UT)|Info (UT)]] >> StatLog (Package: Botpack)}}<br />
<br />
''StatLog'', native UnrealScript class. Provides means to write [http://www.unicode.org Unicode]-encoded text to (log-)files. Apart from writing to fixed .ini files, this class is UnrealScript's only means to write data to disk.<br />
<br />
* StatLog's static BrowseRelativeLocalURL function is a handy way to create an in-game link to a locally saved HTML manual (of a mod, for instance). The ''start'' console command can only deal with actual network URLs.<br />
<br />
== Known subclasses ==<br />
*[[Legacy:StatLogFile (UT)|StatLogFile (UT)]]<br />
<br />
<br />
[[Category:Legacy Class (UT)|{{PAGENAME}}]]</div>SeriousBarbie