PDA

View Full Version : Remove item from game.



legacy-nickelplate
08-31-2003, 03:02 AM
Hi all,

I want to remove all ammunition pickups from the game by the means of a mutator. Is there a better way to do it than this one below?



// Remove all ammunition
function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
bSuperRelevant = 0;

if (Ammo(Other) != None)
{
Other = None;
return false;
}

return true;
}


Cheers.

legacy-CyberTao
08-31-2003, 03:28 AM
Originally posted by nickelplate
Hi all,

I want to remove all ammunition pickups from the game by the means of a mutator. Is there a better way to do it than this one below?



// Remove all ammunition
function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
{
bSuperRelevant = 0;

if (Ammo(Other) != None)
{
Other = None;
return false;
}

return true;
}


Cheers.

a-you must always keep compatibility with other mutators at the end of these functions (see mutator code)
b-its better to modify it from the isrelevant() function

this should be more like


function bool IsRelevant(Actor Other, out byte bSuperRelevant)
{
if (Ammo(Other) != None)
{
bSuperRelevant = 0;
return false;
}
return Super.IsRelevant(Other, bSuperRelevant);
}



use checkreplacement() when you want to replace the actor

Sir_Brizz
08-31-2003, 11:35 PM
CheckReplacement removes them with return false like you did, only don't set Other to none. It screws everything up.