News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 5th Feb 2004, 04:53 PM   #1
CVROY
Registered User
 
Join Date: Mar. 8th, 2003
Posts: 202
Ut2003 StrangeLove

I have code for the Ut2003 strangelove, but it need a bit of final tweaking.

I want it to go to 3rd person view automatically when you fire it in secondary fire mode. anyone know what lines of code I would add, or maybe could look at the classes for me?
__________________
http://gameoverserver.com/

Last edited by CVROY; 5th Feb 2004 at 04:58 PM.
CVROY is offline   Reply With Quote
Old 5th Feb 2004, 11:35 PM   #2
[SAS]Solid Snake
Registered User
 
[SAS]Solid Snake's Avatar
 
Join Date: Jun. 7th, 2002
Location: New Zealand
Posts: 2,633
Set bBehindView to true.
__________________
I make the impossible possible ... ... ... to some extent.

Digital Confectioners
[SAS]Solid Snake is offline   Reply With Quote
Old 6th Feb 2004, 08:01 AM   #3
CVROY
Registered User
 
Join Date: Mar. 8th, 2003
Posts: 202
Quote:
Originally Posted by [SAS]Solid Snake
Set bBehindView to true.

Right on I'll try that

Thanks!
__________________
http://gameoverserver.com/
CVROY is offline   Reply With Quote
Old 6th Feb 2004, 08:20 AM   #4
CVROY
Registered User
 
Join Date: Mar. 8th, 2003
Posts: 202
Quote:
Originally Posted by [SAS]Solid Snake
Set bBehindView to true.
When I add that to the default properties it gets a compile error

Here is the class
-----------------------------------------------------------------------
Code:
class SLFire  extends RedeemerFire;


//SLProjectile
function Projectile SpawnProjectile(Vector Start, Rotator Dir)
{
        local Projectile p;

	local vector newloc;

	//if (ShouldJumpOff())
	//	return none;

	p = Super.SpawnProjectile(Start,Dir);
	if ( p == None )
		p = Super.SpawnProjectile(Instigator.Location,Dir);

	if ( p == None )
	{
	 	Spawn(class'SmallRedeemerExplosion');
		HurtRadius(500, 400, class'DamTypeRedeemer', 100000, Instigator.Location);
		return none;
	}
	else
	{
		BoomStick(Weapon).SLProjectile=SLProjectile(p);
		SLProjectile(p).ShootingInstigator=SLProjectile(p).instigator;

		instigator.SetPhysics(PHYS_Trailer);

		p.Attach( instigator);

		instigator.SetBase(p);


		newloc=vect(0.00,0.00,0.00);
		newloc.Z += 15;
		instigator.SetRelativeLocation(newloc);


		instigator.Velocity=SLProjectile(p).Velocity;
		instigator.Velocity=SLProjectile(p).Acceleration;



	}

	bIsFiring = false;
    StopFiring();

   return p;
}

simulated function bool ShouldJumpOff()
{
	if (BoomStick(Weapon).SLProjectile!=None
	//	&& BoomStick(Weapon).SLProjectile.bFlyingSL
		)
	{

		BoomStick(Weapon).SLProjectile.bFlyingSL=false;
	//	instigator.SetPhysics(PHYS_Falling);
		BoomStick(Weapon).SLProjectile.ShootingInstigator=None;


	//BoomStick(Weapon).SLProjectile.Detach( instigator );


		BoomStick(Weapon).SLProjectile=none;
		Weapon.Owner.SetBase(none);

	//	PlayerController(Pawn(Weapon.Owner).Controller).Gotostate('PlayerWalking');
		Weapon.Owner.SetPhysics(PHYS_Falling);


		Pawn(Weapon.Owner).JumpOffPawn();

		return true;
	}
	return false;
}

simulated function bool AllowFire()
{
	if (BoomStick(Weapon).SLProjectile!=None)
		return true;

	return Super.AllowFire();
}


event ModeDoFire()
{

	if (BoomStick(Weapon).SLProjectile!=None)
		if (ShouldJumpOff())
		{
			bIsFiring = false;
			Weapon.PutDown();
			return;
		}
	Weapon.SetOverlayMaterial(FinalBlend'XEffectMat.InvisOverlayFB', 60.0, true);
	Super.ModeDoFire();

}

defaultproperties
{
     bWaitForRelease=True
     AmmoClass=Class'wgsstrangelove.SLAmmo'
     ProjectileClass=Class'wgsstrangelove.SLProjectile'
}
__________________
http://gameoverserver.com/

Last edited by CVROY; 6th Feb 2004 at 03:39 PM.
CVROY is offline   Reply With Quote
Old 6th Feb 2004, 08:44 AM   #5
Radiosity
Minty Fresh!
 
Radiosity's Avatar
 
Join Date: Jan. 3rd, 2003
Location: UK
Posts: 2,217
You've forgotten to use those [code] tags
Radiosity is offline   Reply With Quote
Old 6th Feb 2004, 09:40 AM   #6
CVROY
Registered User
 
Join Date: Mar. 8th, 2003
Posts: 202
Quote:
Originally Posted by Radiosity
You've forgotten to use those [code] tags
I added bBehindView=True to the default properties and no go

I am lost... these simple things always elude me... I make small things into big projects without trying...lol
__________________
http://gameoverserver.com/
CVROY is offline   Reply With Quote
Old 6th Feb 2004, 11:02 AM   #7
Payback
Ive got a big stick
 
Payback's Avatar
 
Join Date: Nov. 21st, 2002
Posts: 94
When Solid Snake said set bBehindview to true he didnt mean just set it. He meant when you start the secondary fire, change bBehindview to true, and reset it to false after you are finished firing.

NB. bBehindview is a variable in the PlayerController so you'll have to reference the controller when you set it.
Payback is offline   Reply With Quote
Old 6th Feb 2004, 03:21 PM   #8
Radiosity
Minty Fresh!
 
Radiosity's Avatar
 
Join Date: Jan. 3rd, 2003
Location: UK
Posts: 2,217
I meant when you posted the code above. Use the [code] [ /code] tags to preserve the formatting and stop the moderators bugging you
Radiosity is offline   Reply With Quote
Old 6th Feb 2004, 03:34 PM   #9
CVROY
Registered User
 
Join Date: Mar. 8th, 2003
Posts: 202
Ooohhhhh!

Sorry bout that, will change it
__________________
http://gameoverserver.com/
CVROY is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 08:37 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer