Announcement

Collapse
No announcement yet.

[Idea] [Mutator] Bullet Cam?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Idea] [Mutator] Bullet Cam?

    I was thinking of a bullet cam mod like in Stranglehold where it follows the bullet and shows it hitting the target. Not very practical for online play, but something fun for offline.

    Or an idea I had that was similar to the slo-mo after you kill someone, where it goes into slo-mo after you kill the guy, except you go to like a 3rd person perspective that focuses on the guy you just killed so you can see all the blood and gore in slo-mo after every kill. Maybe like the camera can switch to spectator mode after the kill and show the guy you killed, something along those lines.

    #2
    For the sniper rifle? #1 I mean.
    I think it could be done by taking a leaf out of the remote redeemer's code, except not letting you steer it, just change the position of the camera.

    Comment


      #3
      Yeah, it's cool to see some of the gore and stuff with the slo-mo mutator, but I really want to see all that detail up close. Especially headshots.

      Comment


        #4
        Ok, well I had a quick play with it, this is the code I've bodgied up:
        Code:
        class BCamProj extends UTRemoteRedeemer_Content;
        
        event TakeDamage(int Damage, Controller InstigatedBy, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser){}
        
        auto state Flying
        {
        	simulated function Tick(float DeltaTime)
        	{
        		SetRotation(rotator(Velocity));
        	}
        }
        simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
        {
        	GetActorEyesViewPoint(out_CamLoc, out_CamRot);
        	return false;
        }
        defaultproperties;
        {
        	Begin Object Name=WRocketMesh
        		StaticMesh=StaticMesh'WP_AVRiL.Mesh.S_WP_AVRiL_Missile'
        		CullDistance=20000
        		Scale=1.0
        		Translation=(X=32.0)
        		CollideActors=false
        		BlockRigidBody=false
        		BlockActors=false
        		bOwnerNoSee=true
        		bUseAsOccluder=FALSE
        	End Object
        	Components.Add(WRocketMesh)
        
        	AirSpeed=20000.0
        	AccelRate=40000.0
        	BaseEyeHeight=5.0
        	EyeHeight=5.0
        }
        That's the projectile, and:
        Code:
        class BCamRifle extends UTWeap_SniperRifle;
        
        var class<BCamProj> BCamClass;
        
        simulated function Projectile ProjectileFire()
        {
        	local BCamProj BCP;
        
        	if (CurrentFireMode == 1 || Role<ROLE_Authority)
        	{
        		return super.ProjectileFire();
        	}
        
        	//@warning: remote redeemer can't have Instigator in its owner chain, because Instigator will be set to be owned by the redeemer when
        	//		Instigator enters it - otherwise it would be disallowed due to creating an Owner loop, breaking clients
        	BCP = Spawn(BCamClass,,, GetPhysicalFireStartLoc(), Instigator.GetViewRotation());
        	if (BCP != None)
        	{
        		BCP.TryToDrive(Instigator);
        	}
        
        	IncrementFlashCount();
        
        	return None;
        }
        
        defaultproperties;
        {
        	WeaponFireTypes(0)=EWFT_Projectile
        	WeaponProjectiles(0)=class'UTProj_Tankshell'
        	bInstantHit=false
        	BCamClass=class'BCamProj'
        }
        That's the weapon code.
        It is a quick and dirty play I'll admit, and there are a couple of improvements that could be made.
        One is the speed of the projectile, 20,000 is extremely quick(and 40,000 acceleration may be overdoing it), especially in CTF-Hydrosis, but I was going for a projectile going at a bullet's speed, and just plucked that out of the air. Second is the camera, you seem like you are shooting yourself at a target, meaning you can't see the projectile, but since you're going so fast, I may have actually missed it.

        The problem I can see with slowing the projectile down, is then it's not an instant hit weapon, so leading the target is necessary. Although it is at the moment also.
        Also, and this may be a biggie, I've extended from the UTRemoteRedeemer, so BIG explosions here we come. Oh, the main reason why I extended from the UTRR is it extends from Engine.Vehicle, not UTGame.UTVehicle though.

        However, you may be able to extend from UTProjectile and add a camera, thus not having to worry about the steering (which I removed), and the reason I didn't is that, it sounded like a cool idea, so I did it quickly, it seems to work, and I guess this is more a proof of concept for anyone else who wants to take it further.
        Oh yeah, this code does compile and work, you don't need anything else for it, if anyone wants to use it, go for it, well, I can't say no really since this is epic's code that I've used.

        Comment


          #5
          What I'd have done, is do the normal fire, and if the target is killed, call the camera function and slow the gamespeed down

          It's a very good base though.

          Comment


            #6
            Sweetness. So...what do I do with all this coding?

            Comment


              #7
              sounds amazing! would it be possible for a ps3 cook?

              Comment


                #8
                Originally posted by ambershee View Post
                What I'd have done, is do the normal fire, and if the target is killed, call the camera function and slow the gamespeed down

                It's a very good base though.
                That's what I was thinking, though that would be nothing but hitscan.

                Comment


                  #9
                  And slowing the game down wouldnt work in online...

                  Comment


                    #10
                    im with allice 40, ps3 cook for this mutator would be bad-***

                    Comment


                      #11
                      Originally posted by apoisonedgift View Post
                      And slowing the game down wouldnt work in online...
                      It's not a problem to make it work

                      Comment


                        #12
                        This is an amazing idea, i would fire a mass of stinger bullets and rotate my cam around them all HAHA!

                        Comment

                        Working...
                        X