![]() |
|
|
#1 |
|
[UT2004] Mutator Modifying Adrenaline
I am trying to randomly set the amount of points a pill gives you to a negative amount. Here is the code:
Code:
var() float chanceOfDowner;
function bool CheckReplacement(Actor Other, out byte bSuperRelevant)
{
local AdrenalinePickup P;
if( AdrenalinePickup(Other)!=NONE )
{
if( FRand() <= chanceOfDowner )
P = AdrenalinePickup(Other);
P.AdrenalineAmount = - P.AdrenalineAmount; //invert adrenaline amount
}
return false; //don't replace
}
defaultproperties
{
chanceOfDowner = 0.5;
}
Code:
P.default.AdrenalineAmount = - P.default.AdrenalineAmount; Code:
P.default.PickupMessage = "Downer "; Anyone know what I am doing wrong?
__________________
![]() Code:
__ , _ __ ,
| | / \_/ \_|/ \_/ \_/ \_
\_/|/\__/ \/ |__/ \__/ \/
/| /|
\| \|
|
|
|
|
|
| Thread Tools | |
| Display Modes | |
|
|