Main

Forums

Wiki

Downloads

Tutorials

Walkthrough

Unreal-netiquette

Links

Submit-News

Oldunreal's hosted:
UnrealReference

Usermaps

Real-CTF

Donate for Oldunreal:

Oldunreal Donation
Oldunreallogo
  Welcome, Guest. Please Login or Register
 
  HomeHelpSearchLoginRegister  
 
 
Pages: 1 2 
Hello ALL from the {oToD}UT99 Clan!!! (Read 3258 times)
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Hello ALL from the {oToD}UT99 Clan!!!
05/24/09 at 03:53:55
 
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....
Back to top
 
 
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #1 - 05/24/09 at 10:50:55
 
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.
Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #2 - 05/24/09 at 19:30:19
 
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.
Back to top
 
 
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #3 - 05/24/09 at 21:01:05
 
It's these default properties that make ShockProj collide:
Code:
     CollisionRadius=12.000000
     CollisionHeight=12.000000
     bProjTarget=True
 

Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #4 - 05/24/09 at 22:31:13
 
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.

Back to top
 
 
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #5 - 05/24/09 at 22:35:33
 
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

Back to top
 
 
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #6 - 05/25/09 at 13:02:56
 
The code responsible for combos is in Shock Rifle's Weapon class, namely the function:
Code:
function ProcessTraceHit(Actor Other, Vector HitLocation, Vector HitNormal, Vector X, Vector Y, Vector Z) 


Specifically, this bit of code in it:
Code:
    if ( ShockProj(Other)!=None )
    {
	  AmmoType.UseAmmo(2);
	  ShockProj(Other).SuperExplosion();
    } 


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):
Code:
singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation,
				vector momentum, name damageType ) 


Just combine the two. Make it so it checks DamageTypes - if they match, it would call SuperExplosion().
Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
[§Ŕ] ŤhěxĐâŕkśîđěŕ
Oldunreal MasterPoster
******
Offline


「エレクトロマスター」

Posts: 4444
Out of space-time continuum
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #7 - 05/25/09 at 18:19:28
 
I've done these things. Like GreatEmerald said, you have to check it in ProcessTraceHit.

Code:
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));
	}
} 



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". Smiley
Back to top
 

WWW WWW [§Ŕ] ŤhěxĐâŕkśîđěŕ  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #8 - 05/25/09 at 19:23:36
 
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.
Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #9 - 05/25/09 at 19:58:46
 
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 <=0 )
       return -2;

    P = Pawn(Owner);
    if ( (P.Enemy == None) || (Owner.IsA('Bot') && Bot(Owner).bQuickFire) )
    {
       bUseMode = 0;
       return AIRating;
    }

    if ( P.Enemy.IsA('StationaryPawn') )
    {
       bUseMode = 0;
       return (AIRating + 0.4);
    }
    else
       bUseMode = int( 700 > 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) )
       {
           GotoState('');
       }
       else if ( !bCanClientFire )
           GotoState('');
       else if ( Pawn(Owner) == None )
       {
           GotoState('');
       }
       else if ( Pawn(Owner).bFire != 0 )
           Global.ClientFire(0);
       else if ( Pawn(Owner).bAltFire != 0 )
           Global.ClientAltFire(0);
       else
       {
           GotoState('');
       }
    }
}
state ClientAltFiring
{
    simulated function AnimEnd()
    {
       if ( AmmoType.AmmoAmount <= 0 )
       {
           PlayIdleAnim();
           GotoState('');
       }
       else if ( !bCanClientFire )
           GotoState('');
       else if ( Pawn(Owner) == None )
       {
           PlayIdleAnim();
           GotoState('');
       }
       else if ( Pawn(Owner).bAltFire != 0 )
           LoopAnim('BoltLoop');
       else if ( Pawn(Owner).bFire != 0 )
           Global.ClientFire(0);
       else
       {
           PlayIdleAnim();
           GotoState('');
       }
    }
}
state Firing
{
    ignores AnimEnd;

    function Tick(float DeltaTime)
    {
       local Pawn P;

       P = Pawn(Owner);
       if ( P == None )
       {
           GotoState('Pickup');
           return;
       }
       if ( (P.bFire == 0) || (P.IsA('Bot')
       && ((P.Enemy == None) || (Level.TimeSeconds - Bot(P).LastSeenTime > 5))) )
       {
           P.bFire = 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 ( 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<=0) )
       Pawn(Owner).SwitchToBestWeapon();
    if ( Pawn(Owner).bFire!=0 ) Fire(5.0);
    if ( Pawn(Owner).bAltFire!=0 ) AltFire(0.0);

    Disable('AnimEnd');
    PlayIdleAnim();
}

simulated function PlayIdleAnim()
{
    if ( Mesh == PickupViewMesh )
       return;

    if ( (AnimSequence == 'BoltLoop') || (AnimSequence == 'BoltStart') )
       PlayAnim('BoltEnd');
    else if ( AnimSequence != 'SpinDown' )
       TweenAnim('Idle', 0.1);
}

simulated function TweenDown()
{
    if ( IsAnimating() && (AnimSequence != '') && (GetAnimGroup(AnimSequence) == 'Select') )
       TweenAnim( AnimSequence, AnimFrame * 0.4 );
    else
       TweenAnim('Down', 0.26);
}
defaultproperties
{
     AmmoName=Class'LaserAmmo'
     PickupAmmoCount=500
     bRapidFire=True
     FireOffset=(X=15.000000,Y=-15.000000,Z=2.000000)
     ProjectileClass=Class'BlueBeam'
     AltProjectileClass=Class'RedBeam'
     shakemag=0.000000
     shakevert=0.000000
     AIRating=0.700000
     RefireRate=0.950000
     AltRefireRate=0.990000
     FireSound=Sound'PrimFire'
     AltFireSound=Sound'LaserFire'
     MessageNoAmmo=" has no laser."
     DeathMessage="%k turned %o into crispy bacon with the {oToD}LaserGun."
     AutoSwitchPriority=5
     InventoryGroup=5
     PickupMessage="You found another Laser Gun"
     ItemName="Pulse Gun"
     PlayerViewOffset=(X=1.500000,Z=-2.000000)
     PlayerViewMesh=LodMesh'PulseGunR'
     PickupViewMesh=LodMesh'PulsePickup'
     ThirdPersonMesh=LodMesh'PulseGun3rd'
     ThirdPersonScale=0.400000
     StatusIcon=Texture'UsePulse'
     PickupSound=Sound'LaserPickup'
     SelectSound=Sound'LaserPickup'
     Icon=Texture'UsePulse'
     Mesh=LodMesh'PulsePickup'
     bNoSmooth=False
     SoundRadius=64
     MultiSkins(1)=Texture'LaserGun3rd'
     MultiSkins(2)=Texture'LaserGun_01'
     SoundVolume=255
     CollisionRadius=32.0
     WeaponDescription="LaserGun"
     NameColor=(R=255,G=0,B=0)
}
==========================
////////////////////////////////////////////////////////////////////////////////

///{oToD}LaserGun: Created by {oToD}Dentures. Special Thanks to -=CON=-Strych9.
////////////////////////////////////////////////////////////////////////////////

class RedBolt extends projectile;

var() texture SpriteAnim[5];
var int SpriteFrame;
var RedBolt RedBeam;
var LaserCap WallEffect;
var int Position;
var vector FireOffset;
var float BeamSize;
var bool bRight, bCenter;
var float AccumulatedDamage, LastHitTime;
var Actor DamagedActor;

replication
{
     unreliable if( Role==ROLE_Authority )
           bRight, bCenter;
}

simulated function Destroyed()
{
     Super.Destroyed();
     if ( RedBeam != None )
           RedBeam.Destroy();
     if ( WallEffect != None )
           WallEffect.Destroy();
}

simulated function CheckBeam(vector X, float DeltaTime)
{
     local actor HitActor, Projectile Touch;
     local vector HitLocation, HitNormal;
     HitActor = Trace(HitLocation, HitNormal, Location + BeamSize * X, Location, true);
     if ( (HitActor != None)      && (HitActor != Instigator)
           && (HitActor.bProjTarget || (HitActor == Level) || (HitActor.bBlockActors && HitActor.bBlockPlayers))
           && ((Pawn(HitActor) == None) || Pawn(HitActor).AdjustHitLocation(HitLocation, Velocity)) )
     {
           if ( Level.Netmode != NM_Client )
           {
                 if ( DamagedActor == None )
                 {
                       AccumulatedDamage = FMin(0.5 * (Level.TimeSeconds - LastHitTime), 0.1);
                       HitActor.TakeDamage(damage * AccumulatedDamage, instigator,HitLocation,
                             (MomentumTransfer * X * AccumulatedDamage), MyDamageType);
                       AccumulatedDamage = 15;
                 }
                 else if ( DamagedActor != HitActor )
                 {
                       DamagedActor.TakeDamage(damage * AccumulatedDamage, instigator,HitLocation,
                             (MomentumTransfer * X * AccumulatedDamage), MyDamageType);
                       AccumulatedDamage = 15;
                 }
                 LastHitTime = Level.TimeSeconds;
                 DamagedActor = HitActor;
                 AccumulatedDamage += DeltaTime;
                 if ( AccumulatedDamage > 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
}
Back to top
« Last Edit: 05/25/09 at 20:48:56 by oToD_Dentures »  
 
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #10 - 05/25/09 at 21:17:40
 
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
Code:
singular function TakeDamage( int NDamage, Pawn instigatedBy, Vector hitlocation,
				vector momentum, name damageType )  


In which add this:
Code:
if (NDamage > 50 && damageType == MyDamageType)
    SuperExplosion();
else
    Explode(HitLocation, HitNormal); 


You'll need to get HitNormal from somewhere, though, and set the MyDamageType in the function Explode:
Code:
HurtRadius(Damage, BeamSize, MyDamageType, MomentumTransfer, Location ); 

Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #11 - 05/25/09 at 21:44:17
 
Thanks For the reply I will try what you said.
Back to top
 
 
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #12 - 05/25/09 at 22:17:46
 
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.
Back to top
 
 
IP Logged
 
[§Ŕ] ŤhěxĐâŕkśîđěŕ
Oldunreal MasterPoster
******
Offline


「エレクトロマスター」

Posts: 4444
Out of space-time continuum
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #13 - 05/25/09 at 23:36:11
 
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!!
Back to top
 

WWW WWW [§Ŕ] ŤhěxĐâŕkśîđěŕ  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #14 - 05/26/09 at 13:18:04
 
Yea, if you have CollisionRadius, you must also have CollisionHeight, because 32*0=0.
Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #15 - 05/26/09 at 21:03:43
 
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.
Back to top
 
 
IP Logged
 
[§Ŕ] ŤhěxĐâŕkśîđěŕ
Oldunreal MasterPoster
******
Offline


「エレクトロマスター」

Posts: 4444
Out of space-time continuum
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #16 - 05/27/09 at 07:35:56
 
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).
Back to top
 

WWW WWW [§Ŕ] ŤhěxĐâŕkśîđěŕ  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #17 - 05/27/09 at 11:17:58
 
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.
Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
oToD_Dentures
YaBB Newbies
*
Offline


Oldunreal member

Posts: 10
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #18 - 05/27/09 at 15:35:30
 
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
Back to top
 
 
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
******
Offline


The Great Emerald

Posts: 5184
Vilnius, Lithuania
Gender: male
Re: Hello ALL from the {oToD}UT99 Clan!!!
Reply #19 - 05/27/09 at 16:46:35
 
Hmm... You don't need to. What's wrong with the TakeDamage method?
Back to top
 

... - Unreal II Combat Assault Rifle
My own website (GreatEmerald's Domain)!
...
WWW WWW  
IP Logged
 
Pages: 1 2 
(Moderator: Smirftsch)