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

Can you block a player's fire command?

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
Post Reply
User avatar
gopostal
OldUnreal Member
Posts: 1005
Joined: Thu Jul 31, 2008 9:29 pm

Can you block a player's fire command?

Post by gopostal »

I've made a 'Kill Cam' for the final frag in my gametype. Time slows down and the camera goes to the person getting killed. It works like I want even online.

My only issue is that I need to prevent the winner from firing during the stretched time of the killl shot. I set bMovable to stop rotation and movement but the player can still fire the weapon.

Ferali mentioned a dummy weapon given to the player that assumes the held weapon's mesh, tex, etc. but with no ability to fire. That's a neat answer but it seems more complex an answer than this needs. I also thought of destroying all the other inventory the winner has then setting the held weapon to no ammo but is there something simpler I'm just missing?
I don't want to give the end away
but we're all going to die one day
User avatar
Masterkent
OldUnreal Member
Posts: 1469
Joined: Fri Apr 05, 2013 12:41 pm

Re: Can you block a player's fire command?

Post by Masterkent »

What game? Solutions for U1 and UT may differ. Anyway, I doubt that there is an easy and reliable way to disable weapon switching and firing without dirty hacks.

You could try to execute

Code: Select all

if (Player.Weapon != none)
{
      Player.Weapon.GotoState('Idle2');
      Player.Weapon.PlayIdleAnim();
}
else
      Player.Weapon = SomeDummyWeapon; // invisible weapon that cannot be changed
when freezing the player.
Last edited by Masterkent on Sun Nov 25, 2018 4:49 pm, edited 1 time in total.
User avatar
gopostal
OldUnreal Member
Posts: 1005
Joined: Thu Jul 31, 2008 9:29 pm

Re: Can you block a player's fire command?

Post by gopostal »

This is for UT but I have my own gametype so I can hack it up as I need to. I was going to create a dummy weapon but honestly I think that's overkill for a minor thing like this. I tried removing the ammo from all the weapons but it has enough time to switchweapon. That leaves the final winner holding a translocator or impact hammer.

I'll try the forcing of the animation, maybe loop the check for a bit until the proper endgame is called. Thanks for the advice.
I don't want to give the end away
but we're all going to die one day
Post Reply

Return to “UScript Board”