For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
Hello ALL from the {oToD}UT99 Clan!!!
Moderator: Buggie
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Hello ALL from the {oToD}UT99 Clan!!!
Hello guyz,
im a member of the {oToD} clan, it's good to see UT99 stuff still out there..I was hopeing to find a CODE pro cuz i got a problem....I modified a Pulse gun awhile back, re wrote the code and changed it into a lasger gun (only one on UT99) the current version workz fine, but i want to add one more effect. When the laser beam from your gun, and the laser beam from another dude's gun touch or cross it creats a huge explosion...Now im no dummy, i understand that i need to look into Projectiles and such....Is there any one out there who can show me how to make one projectile touch another projectile, and then do this (effect)....I appreciate any one who can help, and plus if you guys got a copy of version 436 GOTY or UT Anthology Edition come to 206.222.3.167 and check out the laser, and you'll then see what effect im talking about..untill then, thanks again and frag on!..
-{oToD}Dentures....
im a member of the {oToD} clan, it's good to see UT99 stuff still out there..I was hopeing to find a CODE pro cuz i got a problem....I modified a Pulse gun awhile back, re wrote the code and changed it into a lasger gun (only one on UT99) the current version workz fine, but i want to add one more effect. When the laser beam from your gun, and the laser beam from another dude's gun touch or cross it creats a huge explosion...Now im no dummy, i understand that i need to look into Projectiles and such....Is there any one out there who can show me how to make one projectile touch another projectile, and then do this (effect)....I appreciate any one who can help, and plus if you guys got a copy of version 436 GOTY or UT Anthology Edition come to 206.222.3.167 and check out the laser, and you'll then see what effect im talking about..untill then, thanks again and frag on!..
-{oToD}Dentures....
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
That's easy. Make your projectiles with collision (look at Shock Rifle), and make a check that if one projectile is damaged by the damage type of the laser itself (or anything else, if you like to create explosions from non-laser collides), and then when a hit is detected, create a huge explosion.
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
Thanks for the Reply Emerald!! I appreciate that. I have looked into the shock rifle, and the Translocator Target classes to see if i can find how to make projectiles touch. I would appreciate a code example of what u are talking about, as i have played with it for over a month.. i know i missing somthing. I am learning a great bit as i go and this project is my 7th gun ive made, mostly though i copy, paste and really dont know as uch as a real programmer would. again thanks.
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
It's these default properties that make ShockProj collide:
Code: Select all
CollisionRadius=12.000000
CollisionHeight=12.000000
bProjTarget=True
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
Thanks for the responce..no disrepect intended but i realize that Collision radius and Height, and the bProjTarget do have something to do with touching, i have played with those settings LOTS, actually what i needed was an example of inside the actual code, not default properties..Such as, do i need to define stuff in a Function..Simulated Function...or a State? If so what do you suggest?.
Thanks Again.
Thanks Again.
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
Also lemme clarify that this gun shoots two straight beams , primary shoots a long blue beam with less damage.....the Alt shoots a shorter red Instant kill beam.....
-{oToD}Dentures
-{oToD}Dentures
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
The code responsible for combos is in Shock Rifle's Weapon class, namely the function:
Specifically, this bit of code in it:
So, to make a combo when two projectiles collide, you'll have to look a little at Redeemer's code (you can shoot it down, remember?) (Botpack.WarShell):
Just combine the two. Make it so it checks DamageTypes - if they match, it would call SuperExplosion().
Code: Select all
function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)Code: Select all
if ( ShockProj(Other)!=None )
{
AmmoType.UseAmmo(2);
ShockProj(Other).SuperExplosion();
}Code: Select all
singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation,
vector momentum, name damageType )-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
I've done these things. Like GreatEmerald said, you have to check it in ProcessTraceHit.
Of course, that's what it'd be if your beam's class is LaserBeam, the laser's wall hit effect is LaserHitWallEffect, desired damage on direct hit is 10, momentum 30000 and damage type "laz0red". 
Code: Select all
function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z)
{
if ( LaserBeam(Other)!=None )
{
Other.Instigator = Pawn(Owner);
LaserBeam(Other).SuperExplosion();
}
else if ( Other!=None && Other!=Self )
{
Other.TakeDamage(10, Pawn(Owner), HitLocation, 30000.0*X, 'laz0red');
Spawn(class'LaserHitWallEffect',,, HitLocation+HitNormal*9, Rotator(HitNormal));
}
}☆
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
No Darksider, that way the laser must be a hitscan weapon. And it's a projectile one. ProcessTraceHit will never be called, instead, the projectile's TakeDamage will.
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
Here is my code.... Which has NOT be altered...well, what alterations I did, i erased so you guys could see the original. I tried the code examples you guys gave me, no luck, maybe itd make more sence to you guys if ya see it full blown. The first is from Class'LasergunV5', and the second is Class'ReBolt', which of course is the projectile...there is another class which is called RedBeam which extends RedBolt...lemme know if you guys need to look at it.
Appreciate this..
=========================
////////////////////////////////////////////////////////////////////////////////
///{oToD}LaserGun: Created by {oToD}Dentures. Special Thanks to -=CON=-Strych9.
////////////////////////////////////////////////////////////////////////////////
class LaserGunV5 extends TournamentWeapon;
var float Angle, Count;
var BlueBolt BLaser;
var() sound DownSound;
var RedBolt RLaser;
simulated event RenderOverlays( canvas Canvas )
{
Texture'Ammoled'.NotifyActor = Self;
Super.RenderOverlays(Canvas);
Texture'Ammoled'.NotifyActor = None;
}
simulated function Destroyed()
{
if ( BLaser != None )
BLaser.Destroy();
if ( RLaser != None )
RLaser.Destroy();
Super.Destroyed();
}
simulated function AnimEnd()
{
if ( (Level.NetMode == NM_Client) && (Mesh != PickupViewMesh) )
{
if ( AnimSequence == 'SpinDown' )
AnimSequence = 'Idle';
PlayIdleAnim();
}
}
function setHand(float Hand)
{
Super.SetHand(Hand);
if( Hand == 1 );
mesh = mesh(DynamicLoadObject("Botpack.PulseGunR", class'Mesh'));
}
function float SuggestAttackStyle()
{
local float EnemyDist;
EnemyDist = VSize(Pawn(Owner).Enemy.Location - Owner.Location);
if ( EnemyDist < 800 )
return 0.4;
else
return 0;
}
function float RateSelf( out int bUseMode )
{
local Pawn P;
if ( AmmoType.AmmoAmount VSize(P.Enemy.Location - Owner.Location) );
AIRating *= FMin(Pawn(Owner).DamageScaling, 1.5);
return AIRating;
}
simulated function PlayFiring()
{
AmbientSound = FireSound;
if ( (AnimSequence == 'BoltLoop') || (AnimSequence == 'BoltStart') )
PlayAnim( 'boltloop');
else
PlayAnim( 'boltstart' );
}
simulated function PlayAltFiring()
{
AmbientSound = AltFireSound;
if ( (AnimSequence == 'BoltLoop') || (AnimSequence == 'BoltStart') )
PlayAnim( 'boltloop');
else
PlayAnim( 'boltstart' );
}
function Fire( float Value )
{
if ( AmmoType == None )
{
GiveAmmo(Pawn(Owner));
}
if (AmmoType.UseAmmo(1))
{
GotoState('Firing');
bCanClientFire = true;
bPointing=True;
Pawn(Owner).PlayRecoil(FiringSpeed);
ClientFire(value);
if ( BLaser == None )
{
BLaser = BlueBolt(ProjectileFire(ProjectileClass, AltProjectileSpeed, bAltWarnTarget));
if ( FireOffset.Y == 0 )
BLaser.bCenter = true;
else if ( Mesh == mesh'PulseGunR' )
BLaser.bRight = false;
}
}
}
function AltFire( float Value )
{
if ( AmmoType == None )
{
GiveAmmo(Pawn(Owner));
}
if (AmmoType.UseAmmo(1))
{
GotoState('AltFiring');
bCanClientFire = true;
bPointing=True;
Pawn(Owner).PlayRecoil(FiringSpeed);
ClientAltFire(value);
if ( RLaser == None )
{
RLaser = RedBolt(ProjectileFire(AltProjectileClass, AltProjectileSpeed, bAltWarnTarget));
if ( FireOffset.Y == 0 )
RLaser.bCenter = true;
else if ( Mesh == mesh'PulseGunR' )
RLaser.bRight = false;
}
}
}
state ClientFiring
{
simulated function Tick( float DeltaTime )
{
if ( (Pawn(Owner) != None) && (Pawn(Owner).bFire != 0) )
AmbientSound = FireSound;
else
AmbientSound = None;
}
simulated function AnimEnd()
{
if ( (AmmoType != None) && (AmmoType.AmmoAmount 0.24 )
{
if ( Owner.IsA('PlayerPawn') )
PlayerPawn(Owner).ClientInstantFlash( InstFlash,InstFog);
if ( Affector != None )
Affector.FireEffect();
Count -= 0.24;
if ( !AmmoType.UseAmmo(1) )
Finish();
}
}
function EndState()
{
AmbientGlow = 0;
AmbientSound = None;
if ( BLaser != None )
{
BLaser.Destroy();
BLaser = None;
}
Super.EndState();
}
Begin:
AmbientGlow = 200;
FinishAnim();
LoopAnim( 'boltloop');
}
state AltFiring
{
ignores AnimEnd;
function Tick(float DeltaTime)
{
local Pawn P;
local Redbeam i;
P = Pawn(Owner);
if ( P == None )
{
GotoState('Pickup');
return;
}
if ( (P.bAltFire == 0) || (P.IsA('Bot')
&& ((P.Enemy == None) || (Level.TimeSeconds - Bot(P).LastSeenTime > 5))) )
{
P.bAltFire = 0;
Finish();
return;
}
Count += Deltatime;
if ( Count > 0.24 )
{
if ( Owner.IsA('PlayerPawn') )
PlayerPawn(Owner).ClientInstantFlash( InstFlash,InstFog);
if ( Affector != None )
Affector.FireEffect();
Count -= 0.24;
if ( !AmmoType.UseAmmo(1) )
Finish();
}
}
function EndState()
{
AmbientGlow = 0;
AmbientSound = None;
if ( RLaser != None )
{
RLaser.Destroy();
RLaser = None;
}
Super.EndState();
}
Begin:
AmbientGlow = 200;
FinishAnim();
LoopAnim( 'boltloop');
}
state Idle
{
Begin:
bPointing=False;
if ( (AmmoType != None) && (AmmoType.AmmoAmount 15.0 )
{
if ( DamagedActor.IsA('Carcass') && (FRand() < 0.09) )
AccumulatedDamage = 35/damage;
DamagedActor.TakeDamage(damage * AccumulatedDamage, instigator,HitLocation,
(MomentumTransfer * X * AccumulatedDamage), MyDamageType);
AccumulatedDamage = 15;
}
}
if ( HitActor.bIsPawn && Pawn(HitActor).bIsPlayer )
{
if ( WallEffect != None )
WallEffect.Destroy();
}
else if ( (WallEffect == None) || WallEffect.bDeleteMe )
WallEffect = Spawn(class'LaserHit',,, HitLocation - 5 * X);
else if ( !WallEffect.IsA('LaserHit') )
{
WallEffect.Destroy();
WallEffect = Spawn(class'LaserHit',,, HitLocation - 5 * X);
}
else
WallEffect.SetLocation(HitLocation - 5 * X);
if ( (WallEffect != None) && (Level.NetMode != NM_DedicatedServer) )
Spawn(ExplosionDecal,,,HitLocation,rotator(HitNormal));
if ( RedBeam != None )
{
AccumulatedDamage += RedBeam.AccumulatedDamage;
RedBeam.Destroy();
RedBeam = None;
}
return;
}
else if ( (Level.Netmode != NM_Client) && (DamagedActor != None) )
{
DamagedActor.TakeDamage(damage * AccumulatedDamage, instigator, DamagedActor.Location - X * 1.2 * DamagedActor.CollisionRadius,
(MomentumTransfer * X * AccumulatedDamage), MyDamageType);
AccumulatedDamage = 15;
DamagedActor = None;
}
if ( Position >= 9 )
{
if ( (WallEffect == None) || WallEffect.bDeleteMe )
WallEffect = Spawn(class'LaserCap',,, Location + (BeamSize - 0) * X);
else if ( WallEffect.IsA('LaserCap') )
{
WallEffect.Destroy();
WallEffect = Spawn(class'LaserCap',,, Location + (BeamSize - 0) * X);
}
else
WallEffect.SetLocation(Location + (BeamSize - 0) * X);
}
else
{
if ( WallEffect != None )
{
WallEffect.Destroy();
WallEffect = None;
}
if ( RedBeam == None )
{
RedBeam = Spawn(class'RedBolt',,, Location + BeamSize * X);
RedBeam.Position = Position + 1;
}
else
RedBeam.UpdateBeam(self, X, DeltaTime);
}
}
simulated function UpdateBeam(RedBolt ParentBolt, vector Dir, float DeltaTime)
{
local actor HitActor;
local vector HitLocation, HitNormal;
SpriteFrame = ParentBolt.SpriteFrame;
Skin = SpriteAnim[SpriteFrame];
SetLocation(ParentBolt.Location + BeamSize * Dir);
SetRotation(ParentBolt.Rotation);
CheckBeam(Dir, DeltaTime);
}
defaultproperties
{
ExplosionDecal=class'LaserScorch'
SpriteAnim(0)=Texture'beam0'
SpriteAnim(1)=Texture'beam1'
SpriteAnim(2)=Texture'beam2'
SpriteAnim(3)=Texture'beam3'
SpriteAnim(4)=Texture'beam4'
Skin=Texture'beam0'
Texture=Texture'beam0'
BeamSize=50.00
bUnlit=true
FireOffset=(X=16.000000,Y=-14.000000,Z=-8.00000)
DrawType=DT_Mesh
Mesh=lbeam
Style=STY_Translucent
RemoteRole=ROLE_None
MaxSpeed=+20000.000000
SoundVolume=0
CollisionRadius=+0.000000
CollisionHeight=+0.000000
bCollideActors=False
bCollideWorld=False
bNetTemporary=False
bGameRelevant=true
Physics=PHYS_None
LifeSpan=+60.000000
Damage=+90.000
MomentumTransfer=8500
bRight=True
SoundVolume=255
}
Appreciate this..
=========================
////////////////////////////////////////////////////////////////////////////////
///{oToD}LaserGun: Created by {oToD}Dentures. Special Thanks to -=CON=-Strych9.
////////////////////////////////////////////////////////////////////////////////
class LaserGunV5 extends TournamentWeapon;
var float Angle, Count;
var BlueBolt BLaser;
var() sound DownSound;
var RedBolt RLaser;
simulated event RenderOverlays( canvas Canvas )
{
Texture'Ammoled'.NotifyActor = Self;
Super.RenderOverlays(Canvas);
Texture'Ammoled'.NotifyActor = None;
}
simulated function Destroyed()
{
if ( BLaser != None )
BLaser.Destroy();
if ( RLaser != None )
RLaser.Destroy();
Super.Destroyed();
}
simulated function AnimEnd()
{
if ( (Level.NetMode == NM_Client) && (Mesh != PickupViewMesh) )
{
if ( AnimSequence == 'SpinDown' )
AnimSequence = 'Idle';
PlayIdleAnim();
}
}
function setHand(float Hand)
{
Super.SetHand(Hand);
if( Hand == 1 );
mesh = mesh(DynamicLoadObject("Botpack.PulseGunR", class'Mesh'));
}
function float SuggestAttackStyle()
{
local float EnemyDist;
EnemyDist = VSize(Pawn(Owner).Enemy.Location - Owner.Location);
if ( EnemyDist < 800 )
return 0.4;
else
return 0;
}
function float RateSelf( out int bUseMode )
{
local Pawn P;
if ( AmmoType.AmmoAmount VSize(P.Enemy.Location - Owner.Location) );
AIRating *= FMin(Pawn(Owner).DamageScaling, 1.5);
return AIRating;
}
simulated function PlayFiring()
{
AmbientSound = FireSound;
if ( (AnimSequence == 'BoltLoop') || (AnimSequence == 'BoltStart') )
PlayAnim( 'boltloop');
else
PlayAnim( 'boltstart' );
}
simulated function PlayAltFiring()
{
AmbientSound = AltFireSound;
if ( (AnimSequence == 'BoltLoop') || (AnimSequence == 'BoltStart') )
PlayAnim( 'boltloop');
else
PlayAnim( 'boltstart' );
}
function Fire( float Value )
{
if ( AmmoType == None )
{
GiveAmmo(Pawn(Owner));
}
if (AmmoType.UseAmmo(1))
{
GotoState('Firing');
bCanClientFire = true;
bPointing=True;
Pawn(Owner).PlayRecoil(FiringSpeed);
ClientFire(value);
if ( BLaser == None )
{
BLaser = BlueBolt(ProjectileFire(ProjectileClass, AltProjectileSpeed, bAltWarnTarget));
if ( FireOffset.Y == 0 )
BLaser.bCenter = true;
else if ( Mesh == mesh'PulseGunR' )
BLaser.bRight = false;
}
}
}
function AltFire( float Value )
{
if ( AmmoType == None )
{
GiveAmmo(Pawn(Owner));
}
if (AmmoType.UseAmmo(1))
{
GotoState('AltFiring');
bCanClientFire = true;
bPointing=True;
Pawn(Owner).PlayRecoil(FiringSpeed);
ClientAltFire(value);
if ( RLaser == None )
{
RLaser = RedBolt(ProjectileFire(AltProjectileClass, AltProjectileSpeed, bAltWarnTarget));
if ( FireOffset.Y == 0 )
RLaser.bCenter = true;
else if ( Mesh == mesh'PulseGunR' )
RLaser.bRight = false;
}
}
}
state ClientFiring
{
simulated function Tick( float DeltaTime )
{
if ( (Pawn(Owner) != None) && (Pawn(Owner).bFire != 0) )
AmbientSound = FireSound;
else
AmbientSound = None;
}
simulated function AnimEnd()
{
if ( (AmmoType != None) && (AmmoType.AmmoAmount 0.24 )
{
if ( Owner.IsA('PlayerPawn') )
PlayerPawn(Owner).ClientInstantFlash( InstFlash,InstFog);
if ( Affector != None )
Affector.FireEffect();
Count -= 0.24;
if ( !AmmoType.UseAmmo(1) )
Finish();
}
}
function EndState()
{
AmbientGlow = 0;
AmbientSound = None;
if ( BLaser != None )
{
BLaser.Destroy();
BLaser = None;
}
Super.EndState();
}
Begin:
AmbientGlow = 200;
FinishAnim();
LoopAnim( 'boltloop');
}
state AltFiring
{
ignores AnimEnd;
function Tick(float DeltaTime)
{
local Pawn P;
local Redbeam i;
P = Pawn(Owner);
if ( P == None )
{
GotoState('Pickup');
return;
}
if ( (P.bAltFire == 0) || (P.IsA('Bot')
&& ((P.Enemy == None) || (Level.TimeSeconds - Bot(P).LastSeenTime > 5))) )
{
P.bAltFire = 0;
Finish();
return;
}
Count += Deltatime;
if ( Count > 0.24 )
{
if ( Owner.IsA('PlayerPawn') )
PlayerPawn(Owner).ClientInstantFlash( InstFlash,InstFog);
if ( Affector != None )
Affector.FireEffect();
Count -= 0.24;
if ( !AmmoType.UseAmmo(1) )
Finish();
}
}
function EndState()
{
AmbientGlow = 0;
AmbientSound = None;
if ( RLaser != None )
{
RLaser.Destroy();
RLaser = None;
}
Super.EndState();
}
Begin:
AmbientGlow = 200;
FinishAnim();
LoopAnim( 'boltloop');
}
state Idle
{
Begin:
bPointing=False;
if ( (AmmoType != None) && (AmmoType.AmmoAmount 15.0 )
{
if ( DamagedActor.IsA('Carcass') && (FRand() < 0.09) )
AccumulatedDamage = 35/damage;
DamagedActor.TakeDamage(damage * AccumulatedDamage, instigator,HitLocation,
(MomentumTransfer * X * AccumulatedDamage), MyDamageType);
AccumulatedDamage = 15;
}
}
if ( HitActor.bIsPawn && Pawn(HitActor).bIsPlayer )
{
if ( WallEffect != None )
WallEffect.Destroy();
}
else if ( (WallEffect == None) || WallEffect.bDeleteMe )
WallEffect = Spawn(class'LaserHit',,, HitLocation - 5 * X);
else if ( !WallEffect.IsA('LaserHit') )
{
WallEffect.Destroy();
WallEffect = Spawn(class'LaserHit',,, HitLocation - 5 * X);
}
else
WallEffect.SetLocation(HitLocation - 5 * X);
if ( (WallEffect != None) && (Level.NetMode != NM_DedicatedServer) )
Spawn(ExplosionDecal,,,HitLocation,rotator(HitNormal));
if ( RedBeam != None )
{
AccumulatedDamage += RedBeam.AccumulatedDamage;
RedBeam.Destroy();
RedBeam = None;
}
return;
}
else if ( (Level.Netmode != NM_Client) && (DamagedActor != None) )
{
DamagedActor.TakeDamage(damage * AccumulatedDamage, instigator, DamagedActor.Location - X * 1.2 * DamagedActor.CollisionRadius,
(MomentumTransfer * X * AccumulatedDamage), MyDamageType);
AccumulatedDamage = 15;
DamagedActor = None;
}
if ( Position >= 9 )
{
if ( (WallEffect == None) || WallEffect.bDeleteMe )
WallEffect = Spawn(class'LaserCap',,, Location + (BeamSize - 0) * X);
else if ( WallEffect.IsA('LaserCap') )
{
WallEffect.Destroy();
WallEffect = Spawn(class'LaserCap',,, Location + (BeamSize - 0) * X);
}
else
WallEffect.SetLocation(Location + (BeamSize - 0) * X);
}
else
{
if ( WallEffect != None )
{
WallEffect.Destroy();
WallEffect = None;
}
if ( RedBeam == None )
{
RedBeam = Spawn(class'RedBolt',,, Location + BeamSize * X);
RedBeam.Position = Position + 1;
}
else
RedBeam.UpdateBeam(self, X, DeltaTime);
}
}
simulated function UpdateBeam(RedBolt ParentBolt, vector Dir, float DeltaTime)
{
local actor HitActor;
local vector HitLocation, HitNormal;
SpriteFrame = ParentBolt.SpriteFrame;
Skin = SpriteAnim[SpriteFrame];
SetLocation(ParentBolt.Location + BeamSize * Dir);
SetRotation(ParentBolt.Rotation);
CheckBeam(Dir, DeltaTime);
}
defaultproperties
{
ExplosionDecal=class'LaserScorch'
SpriteAnim(0)=Texture'beam0'
SpriteAnim(1)=Texture'beam1'
SpriteAnim(2)=Texture'beam2'
SpriteAnim(3)=Texture'beam3'
SpriteAnim(4)=Texture'beam4'
Skin=Texture'beam0'
Texture=Texture'beam0'
BeamSize=50.00
bUnlit=true
FireOffset=(X=16.000000,Y=-14.000000,Z=-8.00000)
DrawType=DT_Mesh
Mesh=lbeam
Style=STY_Translucent
RemoteRole=ROLE_None
MaxSpeed=+20000.000000
SoundVolume=0
CollisionRadius=+0.000000
CollisionHeight=+0.000000
bCollideActors=False
bCollideWorld=False
bNetTemporary=False
bGameRelevant=true
Physics=PHYS_None
LifeSpan=+60.000000
Damage=+90.000
MomentumTransfer=8500
bRight=True
SoundVolume=255
}
Last edited by oToD_Dentures on Mon May 25, 2009 7:48 pm, edited 1 time in total.
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
Set your proj's collision to something real, and enable bProjTarget. Also add a DamageType (how the hell does the projectile cause damage anyway?) Then add
In which add this:
You'll need to get HitNormal from somewhere, though, and set the MyDamageType in the function Explode:
Code: Select all
singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation,
vector momentum, name damageType ) Code: Select all
if (NDamage > 50 && damageType == MyDamageType)
SuperExplosion();
else
Explode(HitLocation, HitNormal);Code: Select all
HurtRadius(Damage, BeamSize, MyDamageType, MomentumTransfer, Location );-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
Thanks For the reply I will try what you said.
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
Well I added This:
CollisionRadius=32.00
bProjTarget=True
and inserted the code in the "class RedBolt extends projectile;" file, compiled it up, and still nothing happens when i try to shoot my red beam at a bots red beam..I still feel im missing somthing.
I can send you the un altered original source of the lasergun code if you wanna play with it, other wise i'll keep tryin.
Thanks.
CollisionRadius=32.00
bProjTarget=True
and inserted the code in the "class RedBolt extends projectile;" file, compiled it up, and still nothing happens when i try to shoot my red beam at a bots red beam..I still feel im missing somthing.
I can send you the un altered original source of the lasergun code if you wanna play with it, other wise i'll keep tryin.
Thanks.
-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
It's collision RADIUS, which is a circle... I'd still stick with TraceFire which spawns colliding parts of the beam from start to end (like ASMD does, but in its case, it's not colliding) and check is that actor hit by another lazer beam, resulting in an enormous KABOOM!!
☆
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
Yea, if you have CollisionRadius, you must also have CollisionHeight, because 32*0=0.
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
So when you define a collision radius and height, and add bProjTarget=true to the default properties, in theory it makes the projectile a hittable target? (i.e. Shock Rfile's Blue Ball?)...Could "RemoteRole", and "Physics" have anything to do with prohibiting the beam being a "solid" or hittable target?...Cuz in my mind, in order for something to be hittable it has to be solid...Just curious.
-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
I dunno, this is beyond me... Mind you, I started scripting about a month ago and I made few weapons and it took me about an hour yesterday to make a sound play when you say something (ask Casey about this, lol).
☆
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
Yes Dentures.
RemoteRole only affects online games. If something doesn't work online, then usually that's the problem. Physics control how the projectile moves, that is, if it stays in place, flies straight, is affected by gravity, can climb walls etc.
RemoteRole only affects online games. If something doesn't work online, then usually that's the problem. Physics control how the projectile moves, that is, if it stays in place, flies straight, is affected by gravity, can climb walls etc.
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
I have been coding about three months now in UT so i know how you feel darksider. Im not new to OOP but this stuff is rough to deal with and get it the way you want it. I will continue on this project till i get it, and i thank all who have posted here in responce to my issue. Ive got one more clue, see if you guys think it'll help me, i found this tib-bit of code in the UT Impact Hammer...(note the "ForEach VisibleCollidingActors" inside.)
/////////////////////////////
function TraceAltFire()
{
local vector HitLocation, HitNormal, StartTrace, EndTrace, X, Y, Z;
local actor Other;
local Projectile P;
local float speed;
Owner.MakeNoise(Pawn(Owner).SoundDampening);
GetAxes(Pawn(owner).ViewRotation, X, Y, Z);
StartTrace = Owner.Location + CalcDrawOffset() + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
AdjustedAim = pawn(owner).AdjustAim(1000000, StartTrace, AimError, False, False);
EndTrace = StartTrace + 180 * vector(AdjustedAim);
Other = Pawn(Owner).TraceShot(HitLocation, HitNormal, EndTrace, StartTrace);
ProcessAltTraceHit(Other, HitLocation, HitNormal, vector(AdjustedAim), Y, Z);
// push aside projectiles
ForEach VisibleCollidingActors(class'Projectile', P, 550, Owner.Location)
if ( ((P.Physics == PHYS_Projectile) || (P.Physics == PHYS_Falling))
&& (Normal(P.Location - Owner.Location) Dot X) > 0.9 )
{
P.speed = VSize(P.Velocity);
if ( P.Velocity Dot Y > 0 )
P.Velocity = P.Speed * Normal(P.Velocity + (750 - VSize(P.Location - Owner.Location)) * Y);
else
P.Velocity = P.Speed * Normal(P.Velocity - (750 - VSize(P.Location - Owner.Location)) * Y);
}
}
////////////////////////////////////
think this could be something i could use?
-Thanks
/////////////////////////////
function TraceAltFire()
{
local vector HitLocation, HitNormal, StartTrace, EndTrace, X, Y, Z;
local actor Other;
local Projectile P;
local float speed;
Owner.MakeNoise(Pawn(Owner).SoundDampening);
GetAxes(Pawn(owner).ViewRotation, X, Y, Z);
StartTrace = Owner.Location + CalcDrawOffset() + FireOffset.X * X + FireOffset.Y * Y + FireOffset.Z * Z;
AdjustedAim = pawn(owner).AdjustAim(1000000, StartTrace, AimError, False, False);
EndTrace = StartTrace + 180 * vector(AdjustedAim);
Other = Pawn(Owner).TraceShot(HitLocation, HitNormal, EndTrace, StartTrace);
ProcessAltTraceHit(Other, HitLocation, HitNormal, vector(AdjustedAim), Y, Z);
// push aside projectiles
ForEach VisibleCollidingActors(class'Projectile', P, 550, Owner.Location)
if ( ((P.Physics == PHYS_Projectile) || (P.Physics == PHYS_Falling))
&& (Normal(P.Location - Owner.Location) Dot X) > 0.9 )
{
P.speed = VSize(P.Velocity);
if ( P.Velocity Dot Y > 0 )
P.Velocity = P.Speed * Normal(P.Velocity + (750 - VSize(P.Location - Owner.Location)) * Y);
else
P.Velocity = P.Speed * Normal(P.Velocity - (750 - VSize(P.Location - Owner.Location)) * Y);
}
}
////////////////////////////////////
think this could be something i could use?
-Thanks
-
GreatEmerald
- OldUnreal Member
- Posts: 5347
- Joined: Mon May 21, 2007 2:30 pm
Re: Hello ALL from the {oToD}UT99 Clan!!!
Hmm... You don't need to. What's wrong with the TakeDamage method?
-
[§Ŕ] ŤhěxĐâŕkśîđěŕ
- OldUnreal Member
- Posts: 4425
- Joined: Wed Sep 03, 2008 8:19 am
-
oToD_Dentures
- OldUnreal Member
- Posts: 10
- Joined: Sun May 24, 2009 1:46 am
Re: Hello ALL from the {oToD}UT99 Clan!!!
I really dont know what to try...i may go back to the drawing board on the gun, to see if i missed something, it seems what I need to do is give the beam(s) TakeDamage Properties...which again i dont know how to do that....
