Some old DXEditing code I found

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Some old DXEditing code I found

Post by Morpheus »

I probably have more, and I'll look for it when I have a free moment, but thought this may be useful to someone. I found some old DXEditing stuff I saved on my external HDD when DXEditing was still going (this code is from 2005). This first one was by DDL and its code for random weapon damage between 20-70%
simulated function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
local float mult, randomiser;
local name damageType;
local DeusExPlayer dxPlayer;

if (Other != None)
{

// AugCombat increases our damage if hand to hand
mult = 1.0;
if (bHandToHand && (DeusExPlayer(Owner) != None))
{
mult = DeusExPlayer(Owner).AugmentationSystem.GetAugLevelValue(class'AugCombat');
if (mult == -1.0)
mult = 1.0;
}

// skill also affects our damage
// GetWeaponSkill returns 0.0 to -0.7 (max skill/aug)
mult += -2.0 * GetWeaponSkill();

//phaser damage is randomised, which for no good reason, we shall do
//after all the bonuses for skills etc
randomiser = frand();
randomiser = fclamp(randomiser, 0.2, 0.7); //gets a random value between 0.2 and 0.7
mult *= randomiser;




// Determine damage type
damageType = WeaponDamageType();

if (Other != None)
{
if (Other.bOwned)
{
dxPlayer = DeusExPlayer(Owner);
if (dxPlayer != None)
dxPlayer.AISendEvent('Futz', EAITYPE_Visual);
}
}
if ((Other == Level) || (Other.IsA('Mover')))
{
if ( Role == ROLE_Authority )
Other.TakeDamage(HitDamage * mult, Pawn(Owner), HitLocation, 1000.0*X, damageType);

SelectiveSpawnEffects( HitLocation, HitNormal, Other, HitDamage * mult);
}
else if ((Other != self) && (Other != Owner))
{
if ( Role == ROLE_Authority )
Other.TakeDamage(HitDamage * mult, Pawn(Owner), HitLocation, 1000.0*X, damageType);
if (bHandToHand)
SelectiveSpawnEffects( HitLocation, HitNormal, Other, HitDamage * mult);

if (bPenetrating && Other.IsA('Pawn') && !Other.IsA('Robot'))
SpawnBlood(HitLocation, HitNormal);
}
}
if (DeusExMPGame(Level.Game) != None)
{
if (DeusExPlayer(Other) != None)
DeusExMPGame(Level.Game).TrackWeapon(self,HitDamage * mult);
else
DeusExMPGame(Level.Game).TrackWeapon(self,0);
}
}
This one is from TheSheep and is a pawn you can control via an aug. I have not tried it to see if it works, but if anyone does, would be interesting to see how far you can get to controlling a pawn with this:

ControllablePawn.uc
I extended it from MJ12Troop, but it should work just as well from anything else, including Robots or Animals.
Code:
class ControllablePawn extends MJ12Troop;

var bool bControlled;
var name DefOrders;

function PostBeginPlay()
{
Super.PostBeginPlay();
DefOrders=Orders;
}

function Controlled(bool b)
{
b=bControlled;
if(b)
SetOrders('Idle',,True);
else
SetOrders(DefOrders,,True);
}

AugController
Code:
class AugController extends Augmentation;

var Name OrigOrders;

state Active
{
function BeginState()
{
local Actor a;
local Vector HitLoc,HitNorm;

a=Trace(HitLoc,HitNorm,Player.Location+Vector(Player.ViewRotation)*2048,Player.Location+Vector(Player.ViewRotation),True);
if(ControllablePawn(a)==None)
{
Player.ClientMessage("No target acquired.");
Deactivate();
return;
}
if(ControllerPlayer(Player)!=None)
{
ControllerPlayer(Player).Controlee=ControllablePawn(a);
ControllerPlayer(Player).Controlee.Controlled(True);
}
}
}

function Deactivate()
{
Super.Deactivate();

if(ControllerPlayer(Player)!=None)
{
if(ControllerPlayer(Player).Controlee!=None)
ControllerPlayer(Player).Controlee.Controlled(False);
ControllerPlayer(Player).Controlee=None;
}
}

defaultproperties
{
EnergyRate=40.000000
Icon=Texture'DeusExUI.UserInterface.AugIconDrone'
smallIcon=Texture'DeusExUI.UserInterface.AugIconDrone_Small'
AugmentationName="Controller"
Description="The controller augmentation can instantaneously and remotely take control of motor functions."
LevelValues(0)=1.000000
}
ControllerPlayer
Not 100% complete. Pawn will walk but can't jump, shoot, or frob things. This is a lot more complex and I may or may not do it. Don't hold your breath
Code:
class ControllerPlayer extends DeusExPlayer;

var ControllablePawn Controlee;

state PlayerWalking
{
function ProcessMove ( float DeltaTime, vector newAccel, eDodgeDir DodgeMove, rotator DeltaRot)
{
local Vector loc,acc;

if(Controlee!=None)
{
if(DodgeMove!=DODGE_Left && DodgeMove!=DODGE_Right)
{
acc=newAccel;
if(bool(bDuck) && acc.Z==0.0)
{
bDuck=0;
acc.Z=-256;
}
Controlee.Velocity=Normal((aUp*vect(0,0,1)+aForward*vect(1,0 ,0)+aStrafe*vect(0,1,0))>>ViewRotation)*1024;
Controlee.ViewRotation=viewRotation;
Controlee.SetRotation(Rotation);
}
Velocity=vect(0,0,0);
}
else
Super.ProcessMove(DeltaTime,newAccel,DodgeMove,DeltaRot) ;
}

function PlayerTick(float deltaTime)
{
if(Controlee!=None)
Controlee.ViewRotation=ViewRotation;
Super.PlayerTick(deltatime);
}
}

exec function ParseLeftClick()
{
if(Controlee!=None)
{
//make the pawn shoot - CODE ME!!!!!!!!!!!!!!!!!
}
else
Super.ParseLeftClick();
}

exec function Fire(optional float F)
{
if(Controlee==None)
Super.Fire(F);
}
You also need to create a new augmentation manager to allow the new aug. IIRC Tack has a tut on this. If it doesn't and you don't know how, I'll give you a copy of the relevant code which I have lying around.

Another from TheSheep, a thermal scope. You just put this in the weapon class you want to use the scope on. I think it needs slight modification to work or it won't compile right.
var byte ScopeMode;

const SM_NONE=0;
const SM_OPTICAL=1;
const SM_THERMAL=2;


replication
{
reliable if(Role==ROLE_Authority)
ThermalScopeOn,ThermalScopeOff;
reliable if(Role<ROLE_Authority)
FullScopeOff,OpticalScopeOn,ScopeMode,OpticalScop eOff;
}


simulated function ScopeOn() { } //does nothing!

simulated function OpticalScopeOn()
{
local DeusExPlayer p;

p=DeusExPlayer(owner);
if(p==None) return;

/* Removed this. It requires the separate class, BleaterScope view, and allows a full-screen scope in singleplayer.
if(Level.NetMode==NM_Standalone && DeusExRootWindow(p.rootWindow)!=None && DeusExRootWindow(p.rootWindow).scopeview.class!=class'BleaterScopeView')
{
DeusExRootWindow(p.rootWindow).scopeview.Destroy();
DeusExRootWindow(p.rootWindow).scopeView = BleaterScopeView(DeusExRootWindow(p.rootWindow).NewChild(Class'BleaterScopeView', False));
DeusExRootWindow(p.rootWindow).scopeView.SetWindowAlignments(HALIGN_Full, VALIGN_Full, 0, 0);
DeusExRootWindow(p.rootWindow).scopeView.Lower();
}*/

VisionOff();
RefreshScopeDisplay(DeusExPlayer(Owner), False, True);
}

simulated function ThermalScopeOn()
{
/* if(ScopeMode!=SM_THERMAL) //not replicated for ThermalScope, so removed
{
BroadcastMessage("Wrong scope mode - "$ScopeMode);
FullScopeOff();
return;
}*/

VisionOff();

RefreshScopeDisplay(DeusExPlayer(Owner), False, True);

DeusExRootWindow(DeusExPlayer(owner).rootWindow).hud.augDisplay.bVisionActive = True;
if(Level.NetMode==NM_Standalone)
{
DeusExRootWindow(DeusExPlayer(owner).rootWindow).hud.augDisplay.visionLevel = 4;
DeusExRootWindow(DeusExPlayer(owner).rootWindow).hud.augDisplay.visionLevelValue = 800.0;
}
else
{
DeusExRootWindow(DeusExPlayer(owner).rootWindow).hud.augDisplay.visionLevel = 3;
DeusExRootWindow(DeusExPlayer(owner).rootWindow).hud.augDisplay.visionLevelValue = 800.0;
}
}

simulated function ScopeOff()
{
FullScopeOff();
}

simulated function FullScopeOff()
{
OpticalScopeOff();
ThermalScopeOff();
}

simulated function OpticalScopeOff()
{
ScopeMode=SM_NONE; //if it's called from something other than ScopeToggle
RefreshScopeDisplay(DeusExPlayer(Owner), False, False);
}

simulated function ThermalScopeOff()
{
VisionOff();
DeusExRootWindow(DeusExPlayer(owner).rootWindow).hud.augDisplay.bVisionActive = False;
}

simulated function ScopeToggle()
{
if(!IsInState('Idle') || owner==None || !owner.IsA('DeusExPlayer') || !bHasScope) return;

//removed: HAW-specific
//if(DeusExPlayer(owner)!=None && ProjRocketTOW(DeusExPlayer(owner).ViewTarget)!=None) return;

ScopeMode++;
if(ScopeMode>SM_THERMAL) ScopeMode=SM_NONE;

switch(ScopeMode)
{
case SM_NONE:
FullScopeOff();
break;
case SM_OPTICAL:
OpticalScopeOn();
break;
case SM_THERMAL:
ThermalScopeOn();
break;
default:
Log("Error: bad scope mode "$ScopeMode$".");
}
}

simulated function VisionOff() //disabled vision aug
{
local DeusExPlayer player;
local AugmentationManager augSys;
local Augmentation anAug;

player=DeusExPlayer(owner);
if(player==None) return;
augSys=player.AugmentationSystem;
if(augSys==None) return;

anAug = augSys.FirstAug;

while(anAug != None)
{
if(anAug.IsA('AugVision'))
break;

anAug = anAug.next;
}

if (anAug == None)
return;

if (anAug.bIsActive)
anAug.Deactivate();
}
Last edited by Morpheus on Tue Aug 27, 2013 10:30 pm, edited 1 time in total.
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Re: Some old posted DXEditing code I found

Post by Morpheus »

Some more code here, this is also by TheSheep, its a light you can turn on and off (mainly for use on a weapon), but it works in place of a laser and to get it to work, you have to make sure you set on your custom weapon bhaslaser=true or it won't work:
var bool bTorchOn;

replication
{
reliable if(Role<ROLE_Authority)
bTorchOn,TorchToggle;
reliable if(Role==ROLE_Authority)
OnTorch,OffTorch;
}

simulated function LaserToggle()
{
TorchToggle();
}

simulated function LaserOff()
{
if(bTorchOn)
TorchToggle();
}

simulated function TorchToggle()
{
if (bTorchOn)
{
bTorchOn=False;
OffTorch();
}
else
{
bTorchOn=True;
OnTorch();
}
}

simulated function OnTorch()
{
owner.LightEffect=LE_Spotlight;
owner.LightBrightness=64;
owner.LightSaturation=255;
owner.LightRadius=64;
owner.LightPeriod=32;
owner.LightCone=64;
owner.LightType=LT_Steady;
}
This last one I can find (I am sure I have more somewhere), its also by TheSheep and is basically a zone which displays start up text when you enter it, so you can have a zone which is a hotel which can have text to read "The 'Ton" when you enter it, but have something different in the zone outside it like "Hell's Kitchen, Street". Its instead of only having start up text appear once when you start the map, so you can place different zones in the map and have text to show the player where they are if you want the player to enter two different areas in the same map without starting a new map:
class TextTrigger extends Trigger;

var() string TextString[4];

function Trigger(Actor other,Pawn instigator)
{
BeenTriggered(instigator);
if(bTriggerOnceOnly) Destroy();
}

function Touch(Actor other)
{
if(IsRelevant(other))
{
BeenTriggered(other);
if(bTriggerOnceOnly) Destroy();
}
}

function BeenTriggered(Actor instigator)
{
local int x;

if(DeusExPlayer(GetPlayerPawn())==None || DeusExRootWindow(DeusExPlayer(GetPlayerPawn()).rootWindow)==None)
return;

if(DeusExRootWindow(DeusExPlayer(GetPlayerPawn()).rootWindow).hud.startDisplay==None)
DeusExRootWindow(DeusExPlayer(GetPlayerPawn()).rootWindow).hud.startDisplay=HUDMissionStartTextDisplay(NewChild( Class'HUDMissionStartTextDisplay', False));

DeusExRootWindow(DeusExPlayer(GetPlayerPawn()).rootWindow).hud.startDisplay.message="";

for(x=0;x<4;++x)
if(TextString[x]!="")
DeusExRootWindow(DeusExPlayer(GetPlayerPawn()).rootWindow).hud.startDisplay.AddMessage(TextString[x]);
DeusExRootWindow(DeusExPlayer(GetPlayerPawn()).rootWindow).hud.startDisplay.StartMessage();
}
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: Some old DXEditing code I found

Post by G-Flex »

There's no way I'm reading all of that right now, but right off the bat I'm noticing something really wrong.

Code: Select all

randomiser = frand();
randomiser = fclamp(randomiser, 0.2, 0.7); //gets a random value between 0.2 and 0.7
This totally screws up the random distribution of values. Instead of getting a random value between 0.2 and 0.7, you're getting a random value between 0.0 and 1.0, and interpreting anything below 0.2 to be 0.2 and anything above 0.7 to be 0.7. In other words, you're going to get a flat distribution of results between 0.2 and 0.7, then a shitton of anomalous results that are exactly 0.2 and 0.7. Needless to say, it's pretty weird, and results in a distribution lopsided toward both ends of the scale.

Instead, do this, which is the proper way (or at least a proper way) to determine a random value within a range:

Code: Select all

randomiser = (frand() * 0.5) + 0.2;
Morpheus
X-51
Posts: 967
Joined: Thu Jan 27, 2005 9:56 am
Location: A planet near mars

Re: Some old DXEditing code I found

Post by Morpheus »

I found this bot code by TheSheep and DDL. I think I tested this a very long time ago. I think its a robot that is supposed to deflect incoming rockets. I also think its supposed to turn the rocket around and have it return towards the player who fired the rocket. I am not sure if its the same code or not, but I remember testing a robot NPC like this years ago and finding when rockets went towards the bot, they just went round and around in a circle and didn't hit anything or explode and sometimes crashed the game:
//=====================================================
// Code here by:
// TheSheep and Dr. Dumb_lunatic
//=====================================================
Class AugMilitaryBot expands MilitaryBot;

var() float HealRate;

function Tick(float deltaTime)
{
local Rocket r;

Super.Tick(deltaTime);

foreach VisibleActors(class'Rocket',r,2048)
{
if(r.owner!=self) //sets the rocket's owner as itself
{
r.Target=r.owner; //makes it target its old owner
r.SetOwner(self); //now the robot owns it
}
}

//healing
Health+=HealRate*deltaTime; //will this work??
}

function Tick(float deltaTime)
{
local Rocket r;

Super.Tick(deltaTime);

foreach VisibleActors(class'Rocket',r,2048)
{
if(r.owner!=self) //sets the rocket's owner as itself
{
r.Target=r.owner; //makes it target its old owner
r.SetOwner(self); //now the robot owns it
}
}
}


//my stuff
State AvoidingProjectiles
{

function BeginState()
{
StandUp();
GroundSpeed *= 2.00;
Disable('AnimEnd');
bCanJump = false;
SetReactions(true, true, true, true, false, true, true, true, true, true, true, true);
bStasis = False;
useLoc = Location + vect(0,0,1)*BaseEyeHeight + Vector(Rotation);
bCanConverse = False;
EnableCheckDestLoc(false);
}

function EndState()
{
EnableCheckDestLoc(false);
GroundSpeed = default.Groundspeed;
if (JumpZ > 0)
bCanJump = true;
ResetReactions();
bStasis = True;
bCanConverse = True;
}
}


defaultproperties
{
FamiliarName="Augmented Security Bot" //edit me
UnfamiliarName="Augmented Security Bot" //edit me
bHasCloak=True
CloakThreshold=50
HealRate=0.08 //points healed/second
This is code for a dart that if it its a NPC, it will change its alliance to allied to the Player. Not had time to see if it works or not:
//=============================================================================
// Alliance Projectile.
//=============================================================================
class AllianceProjectile extends Dart;

auto simulated state Flying
{
simulated function ProcessTouch (Actor Other, Vector HitLocation)
{

if (bStuck)
return;

if ((Other != instigator) && (DeusExProjectile(Other) == None) &&
(Other != Owner))
{
damagee = Other;

AISendEvent('LoudNoise', EAITYPE_Audio, 2.0, blastRadius*24);
if (damagee.IsA('ScriptedPawn') && !damagee.IsA('Robot') && !damagee.IsA('CyborgDog') && !damagee.IsA('AnnaNavarre')
&& !damagee.IsA('WaltonSimons') && !damagee.IsA('MaggieChow') && !damagee.IsA('UNATCOTroop'))
{
ScriptedPawn(damagee).SetAlliance('Player');
ScriptedPawn(damagee).ChangeAlly('Player',1.0,true);
PlaySound(ImpactSound, SLOT_None, 2.0,, 2048);
Destroy();
}
else
{
damagee.TakeDamage(damage, instigator,HitLocation,(MomentumTransfer * Normal(Velocity)), damagetype);
PlaySound(ImpactSound, SLOT_None, 2.0,, 2048);
Destroy();
}
}
}

simulated function HitWall(vector HitNormal, actor Wall)
{
if (bStickToWall)
{
Velocity = vect(0,0,0);
Acceleration = vect(0,0,0);
SetPhysics(PHYS_None);
bStuck = False;
destroy();

// MBCODE: Do this only on server side
if ( Role == ROLE_Authority )
{
if (Level.NetMode != NM_Standalone)
SetTimer(5.0,False);

if (Wall.IsA('Mover'))
{
SetBase(Wall);
Wall.TakeDamage(Damage, Pawn(Owner), Wall.Location, MomentumTransfer*Normal(Velocity), damageType);
}
}
}

if (Wall.IsA('BreakableGlass'))
bDebris = False;
AISendEvent('LoudNoise', EAITYPE_Audio, 2.0, blastRadius*24);
SpawnEffects(Location, HitNormal, Wall);

Super.HitWall(HitNormal, Wall);
}
}

defaultproperties
{
DamageType=Alliance
spawnAmmoClass=None
ItemName="Alliance Projectile"
Damage=5.000000
}
This is code by DDL that is basically a NPC that you can see its breath coming out of its mouth. Useful for maps that are supposed to be cold or icy areas:
//=============================================================================
// ColdAreaPawns.
// If these pawns are in a cold area, they will show cold, icy breath.
//=============================================================================
class ColdAreaPawns expands ScriptedPawns;

var particlegenerator breathgen;
var float breathtimer;
var float breathtime;

function tick(float deltatime)
{
super.tick(deltatime);

if(breathgen != none)
Updatebreathgen(deltatime);
}


function ZoneChange(ZoneInfo newZone)
{
if (!bInWorld)
return;

if(!Newzone.bWaterZone && newzone.DesiredRotation.Yaw > 0 && breathgen == none)
{
spawnBreathgen();
}
else if((newzone.bWaterZone || newzone.DesiredRotation.Yaw == 0) && breathgen != none)
{
breathgen.LifeSpan = 1 + frand();
}

super.ZoneChange(newzone);
}

function HeadZoneChange(ZoneInfo newZone)
{
if (!bInWorld)
return;

if(!Newzone.bWaterZone && newzone.DesiredRotation.Yaw > 0 && breathgen == none)
{
spawnBreathgen();
}
else if((newzone.bWaterZone || newzone.DesiredRotation.Yaw == 0) && breathgen != none)
{
breathgen.LifeSpan = 1 + frand();
}
super.HeadZoneChange(newzone);
}



function spawnbreathgen()
{
local vector loc;

if(bIsFemale)
{
loc.X += CollisionRadius * 0.25;
loc.Z += BaseEyeHeight*0.9;
}
else
{
loc.X += collisionradius * 0.5;
loc.Z += BaseEyeHeight*0.925;
}
loc = loc >> rotation;
loc += location;

//log("spawning breathgen", name);

breathgen = spawn(Class'particlegenerator',self,,loc,rotation);
if(breathgen != none)
{
breathgen.particleTexture=texture'effects.smoke.smokepuff1';
breathgen.checkTime = 0.1;
breathgen.riseRate = 3.0;
breathgen.ejectSpeed = 10.0;
breathgen.bRandomEject = true;
breathgen.particleLifeSpan = 0.75;
breathgen.SetBase(self);
}
if(AnimSequence == 'BreathLight' || AnimSequence == 'BreathLight2H' || AnimSequence == 'SitBreath')
{
//about halfway through is full inhale
breathtimer = breathtime * self.animframe;
}
else
breathtimer = frand() * breathtime;
}


function updatebreathgen(float dt)
{
local float mod;
local vector loc;

if(bIsFemale)
{
loc.X += CollisionRadius * 0.25; //the way the female meshes stand make a HUGE difference in mouthposition: it's really weird.
loc.Z += BaseEyeHeight*0.9;
}
else
{
loc.X += collisionradius * 0.5;
loc.Z += BaseEyeHeight*0.925;
}
loc = loc >> rotation;
loc += location;
breathgen.SetLocation(loc);
breathgen.setrotation(rotation);

//log("updating breathgen", name);

breathtimer += dt;

if(breathtimer > breathtime)
breathtimer = 0.0;

if(breathtimer < breathtime * 0.5 && breathgen.bSpewing)
{
breathgen.bSpewing = false;
breathgen.particleTexture = none;
}
else
{
if(breathtimer < breathtime * 0.75)
{
mod = (breathtimer - (breathtime * 0.5))/(breathtime * 0.25);
}
else
{
mod = (breathtime - breathtimer)/(breathtime * 0.25);
}
if(mod < 0)
mod = 0;
breathgen.bSpewing = true;
breathgen.particleTexture=texture'effects.smoke.smokepuff1';
breathgen.ejectSpeed = 10.0 * mod;
}
}

function beginplay()
{
if (bInWorld && !Region.zone.bWaterZone && Region.zone.DesiredRotation.Yaw > 0 && breathgen == none)
{
spawnBreathgen(); //zonechange wasn't spotting it at startup, for some reason
}

super.beginplay();
}

function destroyed()
{
if(breathgen != none)
breathgen.delayeddestroy();

super.destroyed();
}

defaultproperties
{
}
My nature videos: http://www.youtube.com/user/DynamixWarePro
My whistle/flute videos (and some other videos): http://www.youtube.com/user/DXMorpheus
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Some old DXEditing code I found

Post by DDL »

G-Flex wrote:There's no way I'm reading all of that right now, but right off the bat I'm noticing something really wrong.
First thing I noticed, too. It was a long time ago, in my defense. :P
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: Some old DXEditing code I found

Post by G-Flex »

It's also worth noting that the LE_Spotlight light effect applied to the weapon-flashlight does not work the way you'd probably think it does.

According to my limited experimentation, light effects only affect the way the light is rendered. AI, for example, will still treat a spotlight as a totally normal light of the same radius, so they don't care if it's not pointed anywhere near them. This is why I never bothered changing the light aug to simply put a spotlight in front of the player's eyes, and probably why the devs didn't do the same.
DDL
Traditional Evil Scientist
Traditional Evil Scientist
Posts: 3791
Joined: Mon Oct 17, 2005 10:03 am

Re: Some old DXEditing code I found

Post by DDL »

Also, LE_spotlight would probably do things like "shine straight through a wall", since it's a dynamic light. By using beams placed at trace locations, they still potentially shine through walls (since the beam is a dynamic light) but only the first wall: they don't go any further.
G-Flex
Silhouette
Posts: 621
Joined: Mon Jul 11, 2011 10:16 pm

Re: Some old DXEditing code I found

Post by G-Flex »

I think the only real problems I noticed with using LE_Spotlight are the aforementioned problem with the AI treating it as a normal 360-degree light, and also a potential problem where actors were getting lit without respect to the spotlight's direction.

It's really unfortunate, because aside from that it works and looks so much better than the game's normal method of placing a standard light at the end of a trace, which just gives flat-out bizarre results more often than not.
Zireael
NSF
Posts: 58
Joined: Tue Feb 05, 2013 1:21 pm

Re: Some old DXEditing code I found

Post by Zireael »

This old code sounds really exciting!
Post Reply