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

Fire guns and stuff in UDSDemo

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
Post Reply
User avatar
dustinechoes849
OldUnreal Member
Posts: 480
Joined: Sat Feb 28, 2015 1:56 am

Fire guns and stuff in UDSDemo

Post by dustinechoes849 »

Hiya,

I'm working on a map that's using the CSSinglePlayer gametype from the UDSDemo package (the one that came with RTNP). It's all going well, but there's one problem..

When I try to fire my weapon, I get warped into the RTNP variant of the castle flyby sequence!

I've messed around with the code for a good while, but I can't figure out how to get it NOT to do that. Could someone help me out?

Thanks! :)
Last edited by dustinechoes849 on Fri Jun 16, 2017 4:29 am, edited 1 time in total.
Image
Image
Image
Image
Image
User avatar
dustinechoes849
OldUnreal Member
Posts: 480
Joined: Sat Feb 28, 2015 1:56 am

Re: UDSDemo!?

Post by dustinechoes849 »

NYA HE HE!


I FIXED IT!!!


This pesky block of code in CSPlayer was messing with the 'fire' key:

Code: Select all

// The player wants to fire.
exec function Fire( optional float F )
{
      if( Level.Title=="Intro1" )
      {
            Level.Game.SendPlayer( Self, "Intro2" );
      }
      else if( Level.Title != "Intro2" )
      {
            Level.Game.SendPlayer( Self, "UPack?game=upak.upakintro" );
      }
      else
      {
            Level.Game.SendPlayer( Self, "InterIntro?game=upak.upaktransitioninfo?class=UPak."$AdjustPlayer() );
      }
}
There was another block of code messing with the AltFire as well!



Make a subclass of CSPlayer, with these lines of code to fix it!!!

Code: Select all

// The player wants to fire. WHAT SHOULD HAPPEN!!!
exec function Fire( optional float F )
{
      bJustFired = true;
      if ( bShowMenu || Len(Level.Pauser)>0 || (Role < ROLE_Authority) )
            return;
      if ( Weapon!=None )
      {
            Weapon.bPointing = true;
            PlayFiring();
            Weapon.Fire(F);
      }
}
// The player wants to alternate-fire.
exec function AltFire( optional float F )
{
      bJustAltFired = true;
      if ( bShowMenu || Len(Level.Pauser)>0 || (Role < ROLE_Authority) )
            return;
      if ( Weapon!=None )
      {
            Weapon.bPointing = true;
            PlayFiring();
            Weapon.AltFire(F);
      }
}
Last edited by dustinechoes849 on Fri Jun 16, 2017 3:32 am, edited 1 time in total.
Image
Image
Image
Image
Image
Post Reply

Return to “UScript Board”