Hey all... I've just gotten back into UT again and I'm trying to polish up a custom game mode I usually play with some friends. The problem is, one of the mutators involved is NoWeaponWithFlag (NWWF) by Crokx. It's pretty basic: you grab the flag, your weapon lowers and you're unable to fire. It works fairly well... if you're a human player. BOTS, however, completely ignore it and can fire all they want. The obvious solution is "only play with humans" but that's just not possible for the 8-16 player games that this mode requires.
It also has an odd glitch online. Any human player who isn't hosting the game, when they collect the flag, their weapon will lower, then snap back to raised, lower, raise, etc until they release the flag. They're still unable to fire as intended, but it just looks odd.
The code for this mutator is as follows:
A friend and I noticed there are no brackets around that 'else' statement - I modified it to add them and it didn't seem to fix the issue.
I don't know too much about coding, and I'm basically looking for someone to fix it for me (or pointing out a working replacement mutator that does the same thing). Telling me what's wrong with it probably won't enable me to fix it (though it might help my friend fix it, he knows considerably more than I).
Thanks a bunch in advance. I've had this problem for years, and never managed to get it fixed =x
PS: Anyone know of a mutator or setting that shows the remaining game time in CTF matches that have a time limit? I've seen them online before, but can't for the life of me find any results on google or in the game settings. All my searches only give me 2K4/UT3 results. A timer is the only thing I need from it (preferably with some sort of configuration for where it shows up, but I can't be too picky for an 11 year old game hehe).
PS again: (And an UnrealEd JumpPad tutorial? Only finding those for 2K3/4/UT3 also)
It also has an odd glitch online. Any human player who isn't hosting the game, when they collect the flag, their weapon will lower, then snap back to raised, lower, raise, etc until they release the flag. They're still unable to fire as intended, but it just looks odd.
The code for this mutator is as follows:
Code:
class NWWF expands Mutator;
var Pawn P;
function Tick(float deltaTime)
{
Super.Tick(deltaTime);
for(P = Level.PawnList; P != None; P = P.NextPawn)
{
if(P.PlayerReplicationInfo.HasFlag != None)
{
P.Weapon.SelectSound = None;
P.Weapon.bOwnsCrossHair = True;
P.Weapon.PutDown();
P.PendingWeapon = None;
if(P.Weapon.IsA('Translocator')
|| P.Weapon.IsA('ImpactHammer')
|| P.Weapon.IsA('WarHeadLauncher'))
{
P.Weapon.DrawType = DT_None;
}
}
else
P.Weapon.SelectSound = P.Weapon.Default.SelectSound;
P.Weapon.bOwnsCrossHair = P.Weapon.Default.bOwnsCrossHair;
if(P.Weapon.IsA('Translocator')
|| P.Weapon.IsA('ImpactHammer')
|| P.Weapon.IsA('WarHeadLauncher'))
{
P.Weapon.DrawType = P.Weapon.Default.DrawType;
}
}
}
A friend and I noticed there are no brackets around that 'else' statement - I modified it to add them and it didn't seem to fix the issue.
I don't know too much about coding, and I'm basically looking for someone to fix it for me (or pointing out a working replacement mutator that does the same thing). Telling me what's wrong with it probably won't enable me to fix it (though it might help my friend fix it, he knows considerably more than I).
Thanks a bunch in advance. I've had this problem for years, and never managed to get it fixed =x
PS: Anyone know of a mutator or setting that shows the remaining game time in CTF matches that have a time limit? I've seen them online before, but can't for the life of me find any results on google or in the game settings. All my searches only give me 2K4/UT3 results. A timer is the only thing I need from it (preferably with some sort of configuration for where it shows up, but I can't be too picky for an 11 year old game hehe).
PS again: (And an UnrealEd JumpPad tutorial? Only finding those for 2K3/4/UT3 also)