Help with my gun
Help with my gun
My gun is going well but i need help with the HUD display icon when its selected.
I have created my icon and put it in a utx and saved.
I set the default properties icon and status icon to the my icon and saved.
But when i play it and select the gun the icon is just blank.
I have created my icon and put it in a utx and saved.
I set the default properties icon and status icon to the my icon and saved.
But when i play it and select the gun the icon is just blank.
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Help with my gun
ok I've got the gun working and i have made a second gun using the same ammo and bullets.
I've got a gun replacement so it swaps the shock rifle with my god rifle and sniper rifle with my god sniper.
I don't know how to swap the bullet box with the god core and the shock core with the god core.
I've got a gun replacement so it swaps the shock rifle with my god rifle and sniper rifle with my god sniper.
I don't know how to swap the bullet box with the god core and the shock core with the god core.
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Help with my gun
So you mean, you want both weapons using your "godcore" instead of the shockcore and bulletbox, is that it?mmdanggg2 wrote:ok I've got the gun working and i have made a second gun using the same ammo and bullets.
I've got a gun replacement so it swaps the shock rifle with my god rifle and sniper rifle with my god sniper.
I don't know how to swap the bullet box with the god core and the shock core with the god core.
Well, first off I suppose you already created your ammo class named "godcore".
Then, if you look closelly in the Weapon properties section, you will see AmmoName.
Just set that default property (AmmoName) to the "godcore" class, and done.
Re: Help with my gun
You've misunderstood I have done that but I want to swap the ammo in the map with a mutator like I said I've done that with the weapons using a mutator but I can't do it with ammo
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Help with my gun
Oh, replace both with the mutator. Basically is the exact same way with weapons: you use those replace functions instead to replace ammo.mmdanggg2 wrote:You've misunderstood I have done that but I want to swap the ammo in the map with a mutator like I said I've done that with the weapons using a mutator but I can't do it with ammo
Re: Help with my gun
I'm not sure what you mean I copied the replacing script from a pckage called samauri I tried to change it to work with ammo but it's not working so
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Help with my gun
Post here the replacing code, and tell me what class does your ammo expands from.mmdanggg2 wrote:I'm not sure what you mean I copied the replacing script from a pckage called samauri I tried to change it to work with ammo but it's not working so
Re: Help with my gun
here is the code for replacing the shock rifle with the god rifle:
//=============================================================================
// GodRifleMutator.
//=============================================================================
class GodrifleMutator expands Mutator;
function bool alwaysKeep(Actor o)
{
if (o.IsA('GodRifle') || o.IsA('ShockCore'))
{
return true;
}
if (NextMutator != None)
{
return (NextMutator.AlwaysKeep(o));
}
return false;
}
function bool checkReplacement(Actor o, out byte bSuperRelevant)
{
if (o.isA('ShockRifle') && !o.isA('GodRifle'))
{
replaceWith(o, "MyPackage.GodRifle");
return false;
}
bSuperRelevant = 0;
return true;
}
and the god core extends from the shock core
//=============================================================================
// GodRifleMutator.
//=============================================================================
class GodrifleMutator expands Mutator;
function bool alwaysKeep(Actor o)
{
if (o.IsA('GodRifle') || o.IsA('ShockCore'))
{
return true;
}
if (NextMutator != None)
{
return (NextMutator.AlwaysKeep(o));
}
return false;
}
function bool checkReplacement(Actor o, out byte bSuperRelevant)
{
if (o.isA('ShockRifle') && !o.isA('GodRifle'))
{
replaceWith(o, "MyPackage.GodRifle");
return false;
}
bSuperRelevant = 0;
return true;
}
and the god core extends from the shock core
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Help with my gun
Then it will be like this (as you will see, is as easy as the weapon replacement):
function bool checkReplacement(Actor o, out byte bSuperRelevant)
{
if (o.isA('ShockRifle') && !o.isA('GodRifle'))
{
replaceWith(o, "MyPackage.GodRifle");
return false;
}
//This replaces both Shock Core and Bullet Box for a God Core
if ((o.isA('ShockCore') && !o.isA('GodCore')) || o.isA('BulletBox'))
{
replaceWith(o, "MyPackage.GodCore");
return false;
}
bSuperRelevant = 0;
return true;
}
function bool checkReplacement(Actor o, out byte bSuperRelevant)
{
if (o.isA('ShockRifle') && !o.isA('GodRifle'))
{
replaceWith(o, "MyPackage.GodRifle");
return false;
}
//This replaces both Shock Core and Bullet Box for a God Core
if ((o.isA('ShockCore') && !o.isA('GodCore')) || o.isA('BulletBox'))
{
replaceWith(o, "MyPackage.GodCore");
return false;
}
bSuperRelevant = 0;
return true;
}
Re: Help with my gun
I have copied your script into my mutator and it's not compiling with the error '||':bad command or expression
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Help with my gun
WTF? || stands for logical condition "or", like && stands for "and"... it should compile.mmdanggg2 wrote:I have copied your script into my mutator and it's not compiling with the error '||':bad command or expression
Try to copy like it is to a notepad first, and then copy from the notepad to the code itself, and see what happens, because that shoudn't happen.
- Feralidragon
- Godlike
- Posts: 5493
- Joined: Wed Feb 27, 2008 6:24 pm
- Personal rank: Work In Progress
- Location: Liandri
Re: Help with my gun
hmm, PM me your files, to see if I can make those compile and see what's wrong (either by me or you).mmdanggg2 wrote:I've tried that and it's not working same error