I’m working on a mold braking “laser sight” style aiming system mutator, it uses code based on the Agent X laser code and the “Laser sight” mutator by Glen Sharman that I downloaded from ModSquad.
So far it looks really sweet and works beautifully. Though there are several features that still need added before it’s finished
I need it to change to a different texture when it hits a target/pawn, and the draw scale needs to also increase, basically I’m having a small dot crosshairs turn into a large circle to encircle the target pawn.
Can “simulated” be used to modify the function so only the owners will be able to see their own “laser aimer” and if so, which function should be the simulated one?
If this would not affect it then how can I make it so only the owner can see it???
If it does not hit anything in between, then the laser dot needs to spawn at a fixed distance to hang in the air. Which part of the “start trace” “end trace” needs to be modified to get this rang limit???
Below is the original unmodified class so you can see what I’m talking about.
So far it looks really sweet and works beautifully. Though there are several features that still need added before it’s finished
I need it to change to a different texture when it hits a target/pawn, and the draw scale needs to also increase, basically I’m having a small dot crosshairs turn into a large circle to encircle the target pawn.
Can “simulated” be used to modify the function so only the owners will be able to see their own “laser aimer” and if so, which function should be the simulated one?
If this would not affect it then how can I make it so only the owner can see it???
If it does not hit anything in between, then the laser dot needs to spawn at a fixed distance to hang in the air. Which part of the “start trace” “end trace” needs to be modified to get this rang limit???
Below is the original unmodified class so you can see what I’m talking about.
class LSight expands TournamentPickup;
//Laser sight object for Laser Sights mutator - Glen Sharman, 2001
//Texture, sound and original concept - Jon Bartram (aka Mr White)
var ldot LD;
#exec TEXTURE IMPORT FILE=Textures\pdot.pcx NAME=LaserDot
function Activate()
{
GoToState('Activated');
}
state Activated
{
function BeginState()
{
LD = Spawn(Class'LDot', Owner);
bActive = true;
}
function Tick(float DeltaTime)
{
local vector X, Y, Z, StartTrace, EndTrace, HitLocation, HitNormal;
if ( Pawn(Owner).IsInState('FeigningDeath') && bActive )
{
LD.Destroy();
bActive = false;
}
if ( !bActive && !Pawn(Owner).Weapon.bMeleeWeapon && !Pawn(Owner).IsInState('FeigningDeath') )
{
LD = Spawn(Class'LDot', Owner);
bActive = true;
}
GetAxes(Pawn(Owner).ViewRotation, X, Y, Z);
StartTrace = Pawn(Owner).Location + CalcDrawOffset();
EndTrace = StartTrace + vector(Pawn(Owner).ViewRotation) * 10000;
Trace(HitLocation, HitNormal, EndTrace, StartTrace, True);
LD.SetLocation(HitLocation);
}
function EndState() //destroy laser dot if player dies
{
LD.Destroy();
bActive = false;
}
function Activate()
{
GoToState('DeActivated');
}
}