If 'poisonpickup' is a subclass of the healthvial-pickup you're replacing ... then you simply make sure you're not replacing a poison-pickup ...
Code:
if ( (MiniHealthPickup(Other) != None) AND (frand()<=0.1) AND (PoisonPickup(Other) == None))
ReplaceWith( Other, "PoisonPickup.PoisonPickup");
else
return true;
Or maybe you need '(Other.Isa("PoisonPickup.PoisonPickup") == False)
That's for you to decide.
I have slightly more complicated code in my powerpills-mutator.
I replace 1 in X adrenaline pills with my powerpills and eliminate the rest ...
Bookmarks